#include <map>
#include "../debug/Logger.h"
#include "Serialize.h"
#include "MarshalSerialize.h"
Go to the source code of this file.
Namespaces | |
namespace | oasys |
namespace | oasys::TypeCollectionErr |
Classes | |
class | oasys::TypeCollectionHelper |
Generic base class needed to stuff the templated class into a map. More... | |
class | oasys::TypeCollection |
Generic base class for templated type collections. More... | |
class | oasys::TypeCollectionInstance< _Collection > |
This templated type collection accomplishes severals things:. More... | |
class | oasys::TypeCollectionDispatch< _Collection, _Class > |
Instantiate a template with the specific class and create a static instance of this to register the class. More... | |
Defines | |
#define | TYPE_COLLECTION_DEFINE(_collection, _class, _typecode) |
Macro to use to define a class to be used by the typecollection. | |
#define | TYPE_COLLECTION_DECLARE(_Collection, _Class, _code) |
Define the typecollection C++ type -> typecode converter. | |
#define | TYPE_COLLECTION_GROUP(_Collection, _Class, _low, _high) |
Define an aggregate supertype, e.g. | |
#define | TYPE_COLLECTION_INSTANTIATE(_Collection) |
Macro to wrap the annoyingly finicky template static instantiation. | |
Enumerations | |
enum | { oasys::TypeCollectionErr::TYPECODE = 1, oasys::TypeCollectionErr::MEMORY } |
#define TYPE_COLLECTION_DECLARE | ( | _Collection, | |||
_Class, | |||||
_code | ) |
Value:
namespace oasys { \ template<> \ struct TypeCollectionCode<_Collection, _Class> { \ enum { \ TYPECODE_LOW = _code, \ TYPECODE_HIGH = _code \ }; \ enum { \ TYPECODE = _code \ }; \ }; \ }
Definition at line 240 of file TypeCollection.h.
#define TYPE_COLLECTION_DEFINE | ( | _collection, | |||
_class, | |||||
_typecode | ) |
Value:
oasys::TypeCollectionDispatch<_collection, _class> \ _class ## TypeCollectionInstance(_typecode, #_collection "::" #_class);
Definition at line 233 of file TypeCollection.h.
#define TYPE_COLLECTION_GROUP | ( | _Collection, | |||
_Class, | |||||
_low, | |||||
_high | ) |
Value:
namespace oasys { \ template<> \ struct TypeCollectionCode<_Collection, _Class> { \ enum { \ TYPECODE_LOW = _low, \ TYPECODE_HIGH = _high, \ }; \ }; \ }
if a range of type codes {1, 2, 3} are assigned to classes A, B, C and they have a common abstract serializable supertype S, then to unserialize an S object (which could potentially be of concrete types A, B, C), you need to use this macro in the type codes header:
TYPE_COLLECTION_GROUP(Collection, S, 1, 3);
Definition at line 264 of file TypeCollection.h.
#define TYPE_COLLECTION_INSTANTIATE | ( | _Collection | ) |
Value:
template<> class oasys::TypeCollectionInstance<_Collection>* \ oasys::TypeCollectionInstance<_Collection>::instance_ = 0
Definition at line 278 of file TypeCollection.h.