The Vish Visualization Shell 0.3
Vish
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

class  MemCore::Loader< X >
 Abstract base class for object loaders, which are used by the LoaderRegistry. More...
 
class  MemCore::LoaderBase
 Base class for Loaders. More...
 
class  MemCore::LoaderParameters
 Parameters for the loading process. More...
 
class  MemCore::LoaderProgress
 A base class for callbacks during the load process. More...
 
class  MemCore::LoaderRegistry< X >
 Database for routines that may create objects of type X. More...
 
class  MemCore::LoaderRequest
 Control structure that describes a network connection to a certain URL. More...
 
class  MemCore::SaveInterfaceCreator< X >
 Abstract base class for objects that may equip a certain class object X with an interface to write this structure into a file. More...
 
class  MemCore::SaveInterfaceCreatorBase
 
class  MemCore::SaveParameters
 
class  MemCore::SaveRegistry< X >
 Database for routines saving a certain class to disk. More...
 
class  MemCore::SaveRegistryBase
 

Typedefs

typedef int MemCore::socket_t
 The identifier type for socked connection ID's, usually just an integer.
 
typedef int MemCore::socketID_t
 The identifier type for socked connection ID's, usually just an integer.
 
typedef std::vector< socket_tMemCore::sockets_t
 Storage type for a set of socket connection descriptors.
 

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

◆ socket_t

typedef int MemCore::socket_t

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

SOCKET

◆ socketID_t

typedef int MemCore::socketID_t

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

SOCKET