Hi ALL,
I'm looking for different ways to do persistant objects... at least I hope
that's the correct term. Basically, I just want objects that can load and
save themselves. The saving bit's easy, but doing
Object *loaded = load_Object(fname);
isn't that easy. Best system I can think of is writing ObjTypeID tags before
the actual object data in a file, registering each Object's ObjTypeID on
startup,
and then letting load_Object search a list or table for the right loader and
constructor!! %-&
Has anyone thought of a better way??? Plu-weeze ????
Later,
- Lee
---
Lee Braiden
FIDO: 2:443/777.3 EMail: lee.braiden@coole.piglets.com
--- FIPS/32 v0.98 W95/NT [Unreg]
---------------
* Origin: Oppression is nine tenths of the law (2:443/777.3)
|