|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D - ClassInfo question.
Is the .classinfo property not implemented or partially implemented at
this point? It seems that it provides no useful information right now.
Since there isn't any documentation on it, I don't know that I'm using
it correctly.
below is the test program that I wrote to take a look at it, but all
that it outputs is:
4
Object 004140A0
4
4
Object 008A2EE0
which isn't amazingly helpful, since print()'ing a class object seems
to do very little, honestly. (I'm assuming that the number is a pointer
or reference to some static value for the class?
What state is classinfo at? What are your goals for it? I can think of
some useful things to do with it, but in it's current, undocumented
state, it seems like more of a placeholder. Please let me know if I'm
missing something.
Evan
////////////////////////////////////////////////////////////////
class TestClass
{
private:
int testInt;
TestClass* next, parent;
public:
int GetTestInt()
{
return testInt;
}
}
int main (char[][] args)
{
TestClass test = new TestClass;
ClassInfo ci = TestClass.classinfo;
printf("%d\n", ci.size);
ci.print();
printf("%d\n", test.size);
printf("%d\n", TestClass.size);
test.print();
return 0;
}
Dec 05 2002
ClassInfo will eventually be expanded to support complete information about the class, but at the moment it has just enough in it too keep the runtime working, you can see the members in object.d. "Evan McClanahan" <evan dontSPAMaltarinteractive.com> wrote in message news:asnhup$2qo1$1 digitaldaemon.com... Dec 14 2002
Walter wrote:ClassInfo will eventually be expanded to support complete information about the class, but at the moment it has just enough in it too keep the runtime working, you can see the members in object.d. Dec 15 2002
"Evan McClanahan" <evan dontSPAMaltarinteractive.com> wrote in message news:ati7eb$26ju$1 digitaldaemon.com...So, something like a list of all of the types of the classes? Dec 15 2002
Walter wrote:"Evan McClanahan" <evan dontSPAMaltarinteractive.com> wrote in message news:ati7eb$26ju$1 digitaldaemon.com...So, something like a list of all of the types of the classes? Dec 16 2002
"Evan McClanahan" <evan dontSPAMaltarinteractive.com> wrote in message news:atkanj$18ho$1 digitaldaemon.com...I'd offer to help professionally (HAH!) this coming summer, but I don't really have the skills to do any sort of low level compiler work. You're doing a great great job, and doing an amazing amount of work, considering that you're just one person. Since naysayers and complaints generally dominate online forums, just thought that I'd offer and explicit word of support. Dec 16 2002
|