#include <cstdio>
#include <cassert>
#include <string>
#include <SimData/HashUtility.h>
#include <SimData/BaseType.h>
#include <SimData/Export.h>
#include <SimData/Ref.h>
Go to the source code of this file.
Compounds | |
| class | Object |
| Base class for all classes representing packable data objects. More... | |
Defines | |
| #define | __SIMDATA_LEAKCHECK(a) |
| #define | __SIMDATA_GETCLASSNAME(a) |
| #define | __SIMDATA_GETCLASSVERSION(major, minor) |
| #define | __SIMDATA_GETCLASSHASH(a, major) |
| #define | __SIMDATA_ISSTATIC(static_) |
| #define | __SIMDATA_CLASSDEF(a, major, minor) |
| #define | __SIMDATA_NEW(a) virtual SIMDATA(Object)* _new() const { return new a(); } |
| #define | SIMDATA_OBJECT(a, major, minor) |
| Declare a SimData Object subclass. | |
| #define | SIMDATA_STATIC_OBJECT(a, major, minor) |
| Declare a SimData Object static subclass. | |
| #define | SIMDATA_REGISTER(a) SIMDATA(ObjectProxy)<a> proxy##a; |
|
|
Value: __SIMDATA_GETCLASSNAME(a) \ __SIMDATA_GETCLASSHASH(a, major) \ __SIMDATA_GETCLASSVERSION(major, minor) \ |
|
|
Value: |
|
|
Value: static const char* _getClassName() { return #a; } \ virtual const char* getClassName() const { return _getClassName(); } |
|
|
Value: static const char* _getClassVersion() { return #major "." #minor; } \ virtual const char* getClassVersion() const { return _getClassVersion(); } |
|
|
Value: static bool _isClassStatic() { return static_; } \ static bool isClassStatic() { return _isClassStatic(); } |
|
|
Value: a() { printf(#a " %p\n", this); } \
~a() { printf("~" #a " %p\n", this); } |
|
|
|
|
|
Value: __SIMDATA_CLASSDEF(a, major, minor) \ __SIMDATA_ISSTATIC(false) \ __SIMDATA_NEW(a) This macro adds standard boilerplate code to object classes. The first parameter is the object class, while the second and third are major and minor version numbers. The class name and version numbers are used to test binary compatibility during object deserialization. This version of the macro declares a non-static object, meaning that new instances will be created each time a particular object of this class is loaded from an archive. To share one instance, see SIMDATA_STATIC_OBJECT. |
|
|
|
|
|
Value: __SIMDATA_CLASSDEF(a, major, minor) \ __SIMDATA_ISSTATIC(true) \ __SIMDATA_NEW(a) This macro is similar to SIMDATA_OBJECT, but declares this object class to be "static". Static object classes are cached by the archive loader, so that at most one instance of the object exists. Multiple attempts to load a static object from an archive will result in references pointing to a shared object instance. This is particularly useful for object classes that do not contain dynamic data. |
|
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage. Generated on Tue Oct 14 12:06:40 2003, using Doxygen 1.2.18. |