 |
AGXDynamics
2.35.0.2
|
Go to the documentation of this file.
89 OutputArchive( std::ostream& outputStream, ObjectToIdMapContext& cache );
92 std::ostream&
getStream() {
return m_outputStream; }
97 void open(
const std::string& appName);
103 return m_numObjectsWritten;
110 return m_numObjectsSkipped;
117 static void setUseCurrentDate(
bool flag);
123 bool getUseCurrentDate();
125 virtual void write(
char val);
126 virtual void write(
bool val);
143 virtual void write(
float val);
144 virtual void write(
double val);
146 virtual void write(
const std::string& val);
179 virtual void addAttribute(
const char *name,
bool value);
180 virtual void addAttribute(
const char *name,
const char* value);
181 virtual void addAttribute(
const char *name,
char value);
182 virtual void addAttribute(
const char *name,
agx::Int8 value);
183 virtual void addAttribute(
const char *name,
agx::UInt8 value);
184 virtual void addAttribute(
const char *name,
agx::UInt16 value);
185 virtual void addAttribute(
const char *name,
agx::Int32 value);
186 virtual void addAttribute(
const char *name,
agx::UInt32 value);
187 virtual void addAttribute(
const char *name,
agx::UInt64 value);
188 virtual void addAttribute(
const char *name,
float value);
189 virtual void addAttribute(
const char *name,
double value);
190 virtual void addAttribute(
const char *name,
const agx::Uuid& value);
193 virtual void addAttribute(
const char *name,
size_t value) { addAttribute(name, (
agx::UInt64)value); }
197 return m_endianMatch == 1;
214 virtual void write(
const void* buf,
size_t len);
220 void close()
override;
236 bool addModification(
const char *str);
241 bool hasModification(
const agx::String& modification)
const;
248 template<
typename VECTOR_TYPE>
263 const std::string& appName,
268 const std::string& revision,
271 virtual void writeArchiveHeader(
const std::string& appName,
276 const std::string& revision,
279 virtual void writeObjectHeader(
StorageMode mode, StorageAgent* agent);
280 virtual void writeTypeHeader(StorageAgent* agent);
304 void addModifications();
305 void writeModificationData();
306 bool m_hasAddedModifications;
307 static bool s_useCurrentDate;
314 template <
typename T>
347 template <
typename T>
359 #define DECLARE_OUTPUT_BASIC_TYPE(TYPE) \
360 AGXCORE_EXPORT inline agxStream::OutputArchive& operator<<( OutputArchive& out, OutputVal<TYPE> val ) \
362 out.beginSection(val.m_name); \
363 out.write( val.m_obj ); \
364 out.endSection(val.m_name); \
367 AGXCORE_EXPORT inline OutputVal<TYPE> out(const char *name, TYPE obj) { return OutputVal<TYPE>(name, obj); }
423 template <
typename T>
427 template <
typename T>
436 template <
typename T>
OutputRef(const char *name, const T *obj, StorageMode mode)
OutputRef(const char *name, const T &obj, StorageMode mode)
Abstract base class for input/output storage of Serializable classes.
agx::ref_ptr< OutputArchive > OutputArchiveRef
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.
OutputVal(const char *name, const T obj)
int getNumObjectsSkipped() const
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
agx::HashTable< StorageAgent *, agx::UInt32 > StorageAgentToIdMap
OutputVal & operator=(const OutputVal &other)
virtual void beginSection(const char *) override
Matrix class for rigid transformations (translation, rotation).
A class holding 4 dimensional vectors and providing basic arithmetic.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
This struct is used to handle id-collisions when using incremental journal.
OutputRef< T > out_val(const char *name, const T &obj)
Return an object that contain the name and the object that should be serialized to an archive.
agx::HashTable< const Serializable *, IdEntry > ObjectToIdMap
IdEntry(agx::UInt32 _id=agx::InvalidIndex)
virtual void endSection(const char *) override
int getNumObjectsWritten() const
std::ostream & getStream()
Return a reference to the output stream.
#define DECLARE_OUTPUT_BASIC_TYPE(TYPE)
OutputArchive & operator<<(OutputArchive &out, OutputRef< T > val)
Inheritance with partial specialization due to bug with ref_ptr containers.
Representation of a name string.
bool AGXPHYSICS_EXPORT write(const std::string &filename, const agxStream::Serializable *data)
Write a Serializable object to a file.
Class for writing serialized data in binary format to a stream.
Specialized type of matrices for holding symmetric positive definite matrices.
Inheritance with partial specialization due to bug with ref_ptr containers.
bool getEndianMatch() const
OutputRef & operator=(const OutputRef &other)
ObjectToIdMapContext m_defaultCache
ObjectToIdMapContext & m_objectToIdMap
virtual void write(const agx::Name &val)
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
std::ostream & m_outputStream
const AGXCORE_EXPORT InvalidIndexStruct InvalidIndex
A UUID, or Universally unique identifier, is intended to uniquely identify information in a distribut...
StorageAgentToIdMap m_storageAgentToIdMap
agx::Event2< const Serializable *, agx::UInt32 > StoreEvent