www.digitalmars.com         C & C++   DMDScript  

D - ClassInfo

reply "Pavel Minayev" <evilone omen.ru> writes:
A few questions about subj.

First of all, I declared three different classes, but they
seem to share one common classinfo (I printf'ed the pointer).

Why isn't ClassInfo.name there, not even pointing to
a valid memory location ("access violation").

And finally, what is ClassInfo.init? I saw it being used
in OutOfMemory class, but didn't get the idea... is it
a pointer to the constructor, or a pointer to static
members of the class, or what?

Also, it would be really cool to add pointer to constructor
to ClassInfo if it's not already there, and form some
globally accessible list of ClassInfo's - array, or
linked list, or whatever else. This could be used to
implement object serialization, for example.
Jan 07 2002
parent "Walter" <walter digitalmars.com> writes:
I'll check into the bugs. -Walter

"Pavel Minayev" <evilone omen.ru> wrote in message
news:a1cjog$1acn$1 digitaldaemon.com...
 A few questions about subj.

 First of all, I declared three different classes, but they
 seem to share one common classinfo (I printf'ed the pointer).

 Why isn't ClassInfo.name there, not even pointing to
 a valid memory location ("access violation").

 And finally, what is ClassInfo.init? I saw it being used
 in OutOfMemory class, but didn't get the idea... is it
 a pointer to the constructor, or a pointer to static
 members of the class, or what?

 Also, it would be really cool to add pointer to constructor
 to ClassInfo if it's not already there, and form some
 globally accessible list of ClassInfo's - array, or
 linked list, or whatever else. This could be used to
 implement object serialization, for example.
Jan 11 2002