[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [LC++]enum, #define, const, static const, or member const???



Title: RE: [LC++]enum, #define, const, static const, or member const???

> I want to define a certain class type.  Objects of this
> type will have an attribute called "kind", indicating what
> kind of object it is.  There will be a finite collection of
> different kinds of object.

Have you thought of RTTI (that's standard C++).
It's a bit slower, though, as it works off a chain of inheritance
rather than vtable calls.
Basically, it adds a new entry in the vtable that points to a
structure describing the type of an object.

--
Vincent Penquerc'h