class PSerialRegistration |
Registration class for persistent object serialisation/unserialisation.
![]() | (*CreatorFunction) (PUnSerialiser* serial) This type is a pointer to a function to create objects during the un-serialisation operation |
![]() | PSerialRegistration ( const char* clsNam, CreatorFunction func ) Create a serialiser class registration. |
![]() | GetCreator ( const char* clsNam ) Get the creator function for the class name specified. |
![]() | className This serialiser registrations class |
![]() | creator This serialiser registrations creator function - the function that will make a new object of the classes type and construct it with an instance of the PSerialiser class |
![]() | clash Pointer to next registration when a hash clash occurs |
![]() | creatorHashTable [HashTableSize] A static dictionary of class names to creator functions |
![]() | HashFunction ( const char* className ) Calculate the bucket for the hash table lookup. |
Registration class for persistent object serialisation/unserialisation. This class is for registration of object classes that will be serialised and un-serialised.As objects are un-serialised, the objects need to be constructed. For the PUnSerialiser instance to know what constructor to call, a registration of functions that call the appropriate constructor.
The PDECLARE_SERIAL macro creates a single instance of this class to register the class with the serialiser.
Even though this class implements a hash table it does not use the standard PHashTable or PDictionary classes due to recursive definition problems. Those classes need to register themselves with this class before they can be used!
Alphabetic index HTML hierarchy of classes or Java