16 #ifndef AGXSTREAM_INPUT_ARCHIVE_H
17 #define AGXSTREAM_INPUT_ARCHIVE_H
20 # pragma warning(push)
21 # pragma warning( disable : 4290 )
131 virtual void read(std::string& val);
135 virtual void read(
double& val);
138 virtual void read(
size_t& val );
170 virtual void read(
void* buf,
size_t len);
184 sObj = readObjectByRef();
186 *obj =
dynamic_cast<T*
>(sObj);
187 if (sObj != 0 && *obj == 0) {
190 T::getConstructClassId());
222 DEFAULT = TRY_BY_REFERENCE
245 virtual void getAttribute(
const char *name,
size_t& value);
267 template<
typename VECTOR_TYPE>
286 friend class StorageAgent;
322 void readCorrectNumBytes(T& val);
334 agx::UInt8 m_generationVersion, m_majorVersion, m_minorVersion, m_patchVersion;
338 size_t m_numBytesRead;
339 int m_numObjectsRead;
350 void readModificationData();
366 template <
typename T>
379 template <
typename T>
399 template <
typename T>
410 template <
typename T>
414 #define DECLARE_INPUT_BASIC_TYPE(TYPE) \
415 AGXCORE_EXPORT inline agxStream::InputArchive& operator>>( InputArchive& in, InputVal<TYPE> val ) \
417 in.beginSection(val.m_name); \
418 in.read( val.m_obj ); \
419 in.endSection(val.m_name); \
422 inline InputVal<TYPE> in(const char *name, TYPE& obj) { return InputVal<TYPE>(name, obj); }
461 template <
typename T>
469 template <
typename T>
493 observerPtr = object;
499 # pragma warning(pop)
Abstract base class for input/output storage of Serializable classes.
Class for listening to the restore of Serializable objects.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
virtual const char * getClassName() const
Matrix class for rigid transformations (translation, rotation).
static AgXString format(const char *format,...)
C printf formatting of a string.
Inheritance with partial specialization due to bug with ref_ptr containers.
Inheritance with partial specialization due to bug with ref_ptr containers.
Representation of a name string.
Specialized type of matrices for holding symmetric positive definite matrices.
A UUID, or Universally unique identifier, is intended to uniquely identify information in a distribut...
A class holding 4 dimensional vectors and providing basic arithmetic.
Smart pointer for observed objects, that automatically set pointers to them to null when they deleted...
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
InputArchive & operator>>(InputArchive &in, InputVal< T > val)
void restoreObserverPtr(agxStream::InputArchive &in, const char *name, agx::observer_ptr< T > &observerPtr)
void restoreRefPtr(agxStream::InputArchive &in, const char *name, agx::ref_ptr< T > &refPtr)
InputVal< T > in_val(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored.
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...
bool AGXPHYSICS_EXPORT read(const std::string &filename, agxStream::SerializablePtrVector &readObjects)
Open and read serializable objects from a file on disk with previously stored objects.
agx::ref_ptr< InputArchive > InputArchiveRef