VISH  0.2
Classes | Typedefs
Database structures for adding I/O layers to classes

These classes built a framework that allows to equip existing classes with I/O methods for creating them from some persistent storage system or to save them to these. More...

Classes

Typedefs


Detailed Description

These classes built a framework that allows to equip existing classes with I/O methods for creating them from some persistent storage system or to save them to these.

The data classes do not have to be modified when adding new load/save routines, as such routines can be added at runtime. Also, the data classes can be compiled without any knowledge of the I/O methods that may operate on them. As a shared library, the data class library is linked without I/O functionality, but another object-specific I/O library is linked with the primary data library plus the I/O library. The main application needs to call the object-specific I/O library to make use of these functions.

The two cases of loading and saving objects are treated differently. In the first case, no object does exist yet, so we need a global database that allows to create objects upon some creation parameters. For saving objects, we face the task to operate on an existing object. So here the task is to equip existing objects with save() functions.

Saving is done through the classes SaveParameters, SaveInterfaceCreatorBase with derived template SaveInterfaceCreator<> and SaveRegistryBase with derived template SaveRegistry<>. I/O code must register an object derived from SaveInterfaceCreator<> via the SaveRegistry<>. The virtual member function SaveInterfaceCreator::addSaveInterface() will then be called for newly created objects. Data class objects must call the SaveRegistry::addInterfaces() function after construction to get all the required save interfaces.

Loading is done through LoaderParameters, Loader<> and the template class LoaderRegistry<>. A load/object creation routine must be derived from the Loader<> class and registered with the LoaderRegistry<> class. See the respective classes for detailed documentation.


Typedef Documentation

typedef int MemCore::socket_t

The identifier type for socked connection ID's, usually just an integer.

SOCKET

typedef int MemCore::socketID_t

The identifier type for socked connection ID's, usually just an integer.

SOCKET