Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!radar!cadillac!dsouza From: dsouza@gwen.cad.mcc.com (Desmond Dsouza) Newsgroups: comp.std.c++ Subject: Re: type/member tags (was Re: asking an object for its type) Message-ID: Date: 7 Mar 91 19:13:06 GMT References: <27C2D973.3C1B@tct.uucp> <70877@microsoft.UUCP> <10721@dog.ee.lbl.gov> Sender: news@cadillac.CAD.MCC.COM Distribution: na Organization: MCC CAD Program, Austin, Texas Lines: 21 In-reply-to: beard@ux5.lbl.gov's message of 7 Mar 91 07:47:36 GMT In article <10721@dog.ee.lbl.gov> beard@ux5.lbl.gov (Patrick C Beard) writes: > The information about what class an object is can be easily obtained by using > the pointer to the object's virtual function table as the class id, which > whill always be unique for every class. This could be quite easy to add > to the language and easy to implement. Class relationships would be easy > to implement by putting a link field in the vtable which points to a > class's super-class. Unfortunately, most current compilers do not guarantee a single vtable for each class, given separate compilation in a traditional compile-link-load environment. Desmond. -- ------------------------------------------------------------------------------- Desmond D'Souza, MCC CAD Program | ARPA: dsouza@mcc.com | Phone: [512] 338-3324 Box 200195, Austin, TX 78720 | UUCP: {uunet,harvard,gatech,pyramid}!cs.utexas.edu!milano!cadillac!dsouza