61 bool isFinished()
const;
85 void setEnableSerialization(
bool flag );
90 bool getEnableSerialization( )
const;
96 virtual StorageAgent* getStorageAgent()
const = 0;
99 virtual const char* getClassName()
const;
103 static void setEnableUuidGeneration(
bool flag );
106 bool getEnableUuidGeneration( );
143 void setDynamicallyAllocated();
145 bool isDynamicallyAllocated()
const;
165 static StorageAgent* s_storageAgent;
169 DYNAMICALLY_ALLOCATED = 2
185 bool m_serializationEnabled;
186 static bool s_uuidGeneration_enabled;
189 #define AGXSTREAM_CLASS_NAME(T) \ 192 inline const char* getClassName() const override { return #T; } \ 195 #define AGXSTREAM_DECLARE_SERIALIZABLE_BASE( T ) \ 196 inline agxStream::StorageAgent* getStorageAgent() const override { return agxStream::StorageManager::instance()->find( #T ); } \ 197 inline static const char* getConstructClassId() { return #T; } \ 198 friend class agxStream::DefStorageAgent<T>; \ 199 AGXSTREAM_CLASS_NAME(T) \ 200 static agxStream::Serializable *create() { return new T(); } \ 201 virtual void store( agxStream::OutputArchive& out ) const override;\ 202 virtual void restore( agxStream::InputArchive& in ) override 207 #define AGXSTREAM_DECLARE_SERIALIZABLE( T ) \ 208 AGXSTREAM_DECLARE_SERIALIZABLE_BASE(T); \ 209 static agxStream::Serializable *create(agxStream::InputArchive& ) { return new T(); } 214 #define AGXSTREAM_DECLARE_SERIALIZABLE_CUSTOM_CREATE( T ) \ 215 AGXSTREAM_DECLARE_SERIALIZABLE_BASE(T); \ 216 static agxStream::Serializable *create(agxStream::InputArchive& in) 221 #define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE( T ) \ 222 inline agxStream::StorageAgent* getStorageAgent() const override { return agxStream::StorageManager::instance()->find(#T); } \ 223 inline static const char* getConstructClassId() { return #T; } \ 224 AGXSTREAM_CLASS_NAME(T) 227 #define AGXSTREAM_INSTANTIATE_STORAGE( C ) \ 228 static agxStream::Storage<C> storage ## C; 231 #define AGXSTREAM_INSTANTIATE_STORAGE_VARIABLE( V,C ) \ 232 static agxStream::Storage<C> storage ## V; 235 #define AGXARCHIVE_MODIFICATIONS(...) {__VA_ARGS__} 244 #define AGXSTREAM_INSTANTIATE_STORAGE_DEPRECATION_CHECK_VARIABLE( V, DEFAULT_CLASS, DEPRECATED_CLASS, MODIFICATION_LIST ) \ 245 static agxStream::DeprecatedStorage<DEFAULT_CLASS, DEPRECATED_CLASS> V(MODIFICATION_LIST); 255 return (m_flags & FINISHED) != 0;
260 return (m_flags & DYNAMICALLY_ALLOCATED) != 0;
276 return m_serializationEnabled;
282 #define AGXSTREAM_DECLARE_SERIALIZABLE( T ) 283 #define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE( T ) 284 #define AGXSTREAM_DECLARE_SERIALIZABLE_CUSTOM_CREATE( T ) InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive...
agx::UInt32 getIndex() const
This index is given at creation of this object.
bool getEnableSerialization() const
agx::Uuid getUuid() const
Abstract base class for storing/restoring a line/drums with version control.
A UUID, or Universally unique identifier, is intended to uniquely identify information in a distribut...
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Class for writing serialized data in binary format to a stream.
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()