Newsgroups: comp.lang.c++ Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!ox.com!hela!widener!news.cs.indiana.edu!nstn.ns.ca!cs.dal.ca!ug.cs.dal.ca!kelly From: kelly@ug.cs.dal.ca (Michael Kelly) Subject: Retrieving Objects? Message-ID: <1991Apr12.154547.9732@cs.dal.ca> Sender: news@cs.dal.ca (USENET News) Nntp-Posting-Host: ug.cs.dal.ca Organization: Math, Stats & CS, Dalhousie University, Halifax, NS, Canada Distribution: dal Date: Fri, 12 Apr 91 15:45:47 GMT This is really a two part question: 1) if PERSON is a class and EMPLOYEE is a subclass of PERSON and TOM is an instance of EMPLOYEE then TOM is a PERSON right? 2) ok, now assuming TOM is a PERSON, but is really an instance of EMPLOYEE, how is TOM stored so that when I ask for all instances of PERSON I will get TOM? ie. is TOM's object ID somehow associated with the class PERSON? I am looking for an answer in terms of persistent storage, ie. if I want to save the state of the system to disk and then retrieve bits and pieces later how will I know TOM is a PERSON and an EMPLOYEE without retrieving everything in the class hierarchy? Please e-mail any help, kelly@ug.cs.dal.ca PS. Please excuse any obvious demonstrations of ignorance.