A note on const

4/19/98


Click here to start


Table of Contents

A note on const

Class objects and const

Member functions can be const

Declaration and definition must match

The type of this

Type propagation

Changing members in const objects

Overloading on const

Handles and use counts
(part 2)

Review--class hierarchy

Review--where we are now

Review--the data structure

The Expr destructor

Expr copy and assignment

Implementing copy and assignment

The other two constructors are simple

What about those other three classes?

Class IntExpr definition

IntExpr implementation

Class UnaryExpr definition

Implementation note

UnaryExpr implementation

BinaryExpr definition

BinaryExpr implementation

Compiling the program

Typical dependencies

An ordering that works

An alternative ordering

What about garbage collection?

Discussion

Discussion (continued)

Author: Andrew Koenig

Email: ark@research.att.com

Home Page: http://www.research.att.com/info/ark