LB> I'm looking for different ways to do persistant objects... at least
LB> that's the correct term. Basically, I just want objects that can lo
LB> save themselves. The saving bit's easy, but doing
Yes, the term is correct. From a language-independent view, persistent
objects are objects whose lifetime isn't tightly coupled to the
runtime of an application.
LB> isn't that easy. Best system I can think of is writing ObjTypeID ta
LB> the actual object data in a file, registering each Object's ObjTypeI
LB> startup,
LB> and then letting load_Object search a list or table for the right lo
LB> constructor!! %-&
Yes, that's a frequently used method. It's an application of the
Prototype Design Pattern in the GoF book.
Thomas
PS: GoF means the "gang of four", the authors Erich Gamma, Richard
Helm, Ralph Johnson and John Vlissides of "Design Patterns - Elements
of Reusable Object-Oriented Software".
---
þ MM 1.0 #0113 þ I'm a little tagline. When I grow up I wanna be a novel.
---------------
* Origin: McMeier & Son BBS (2:301/138)
|