AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agxData::FileJournal Class Referenceabstract

The FileJournal provides a way to inspect and manipulate a journal created by the FileFrameWriter and stored on disk. More...

#include <FileJournal.h>

+ Inheritance diagram for agxData::FileJournal:

Public Types

typedef agxNet::StructuredMessage PlotData
 
typedef agx::ref_ptr< PlotData > PlotDataRef
 
typedef agx::Vector< PlotDataRef > PlotDataRefVector
 
typedef agx::observer_ptr
< const Session > 
SessionConstObserver
 
typedef agx::ref_ptr< const
Session > 
SessionConstRef
 
typedef agx::observer_ptr
< Session > 
SessionObserver
 
typedef agx::ref_ptr< Session > SessionRef
 
typedef agx::HashTable
< agx::Name,
agxData::JournalArchive::SessionRef > 
SessionTable
 

Public Member Functions

 FileJournal (const agx::String &diskPath)
 Open a journal on disk. More...
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
bool copySession (agxData::JournalArchive::Session *session, agxData::JournalArchive *target)
 Copy the given session from this journal into the given target journal. More...
 
bool copyTo (agxData::JournalArchive *target)
 Copy the session to another JournalArchive. More...
 
virtual DiskFrameReader * createFrameReader (JournalArchive::Session *session) override
 
virtual DiskFrameReader * createFrameReader (agxData::JournalArchive::Session *session)=0
 
virtual DiskFrameWriter * createFrameWriter (JournalArchive::Session *session) override
 
virtual DiskFrameWriter * createFrameWriter (agxData::JournalArchive::Session *session)=0
 
virtual JournalArchive::Session * createNewSession (const agx::Name &name) override
 Create a new session within the journal. More...
 
virtual void finalizeHeader ()=0
 
agx::UInt32 getAgxVersionNumber () const
 
const agx::String & getAgxVersionString () const
 
virtual void getAllPlots (PlotDataRefVector &result)=0
 
agx::Real64 getComputationTime () const
 
virtual agx::String getCustomFilesPath (bool create=true) const override
 
virtual agx::String getCustomFilesPath (const agx::Name &sessionName, bool create=true) const override
 
const agx::Date * getDate () const
 
agxData::FileJournal::Session * getFileSession (const agx::Name &name)
 
agx::UInt64 getFirstFrameIndex () const
 
agx::Real64 getFirstFrameTimeStamp () const
 
virtual agxData::Frame::Header getFrameHeader (agx::UInt frameIndex) const =0
 Load the header data for a particular frame. More...
 
agxData::FrameIO * getFrameIO ()
 
agx::UInt64 getFrameStride () const
 
SerializedFrame::HeaderFormat getHeaderFormat () const
 
agxData::JournalArchive * getJournal ()
 
const agxData::JournalArchive * getJournal () const
 
agx::UInt64 getLastFrameIndex () const
 
agx::Real64 getLastFrameTimeStamp () const
 
const agx::Name & getName () const
 
const agx::Name & getName () const
 
virtual agx::UInt getNextFrameIndex (agx::UInt currentFrameIndex, agx::Int offset) const =0
 
agx::UInt64 getNumFrames () const
 
size_t getNumSessions () const
 
const agx::String & getPath () const
 
virtual agx::String getPath () const =0
 Returns a format specific string that identifies the location of this session within a journal. More...
 
virtual PlotData * getPlot (const agx::String &plotName)=0
 
virtual void getPlotList (agx::StringVector &result)=0
 
int getReferenceCount () const
 
virtual agx::String getScenePath (bool create=true) const =0
 Get the path on disk where the .agx file, called the scene file, containing the initial state of the simulation may be stored. More...
 
agxData::JournalArchive::Session * getSession (const agx::Name &name)
 
const
agxData::JournalArchive::Session * 
getSession (const agx::Name &name) const
 
const SessionTable & getSessions () const
 
agx::Component * getSimulationHeader ()
 
agx::Real64 getTimeStep () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
bool is64BitArchitecture () const
 
bool is64BitReal () const
 
bool isLittleEndian () const
 
bool isOwnerOf (const agxData::JournalArchive::Session *session) const
 
void listSessionNames (agx::Vector< agx::Name > &result) const
 Add to the end of the given Vector the names of all the sessions in the Journal. More...
 
virtual bool packSceneData (std::stringstream &sceneData)=0
 Copy the scene data found in the given stringstream into the journal in some format specific way. More...
 
virtual bool packSceneData (std::istream &sceneData)=0
 Copy the scene data found in the given stringstream into the journal in some format specific way. More...
 
virtual bool recordExtraData (const agx::String &key, const agx::String &value)=0
 Store a string key-value pair to the session on disk. More...
 
bool recordExtraDataAsJSon (const agx::String &key, const agx::String &value)
 Store a string key-value pair to the session on disk, without ruining the . More...
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
virtual void removePlot (const agx::String &plotName)=0
 
virtual bool removeSession (agxData::JournalArchive::Session *session) override
 Remove the given session from the journal. More...
 
bool removeSession (const agx::Name &name)
 Remove the session with the given name from the journal. More...
 
virtual bool renameSession (agxData::JournalArchive::Session *session, const agx::Name &newName) override
 Rename the given session, including data movement on disk. More...
 
virtual bool retrieveExtraData (const agx::String &key, agx::String &value)=0
 Read back the value associated with the key from disk. More...
 
agx::String retrieveExtraData (const agx::String &key)
 
bool retrieveExtraDataAsJSon (const agx::String &key, agx::String &value)
 Read back the value associated with the key from disk. More...
 
agx::String retrieveExtraDataAsJSon (const agx::String &key)
 
virtual void savePlot (const PlotData *plot)=0
 
void set64BitArchitecture (bool flag)
 
void set64BitReal (bool flag)
 
void setAgxVersionNumber (const agx::UInt32 version)
 
void setAgxVersionString (const agx::String &version)
 
void setComputationTime (agx::Real64 computationTime)
 
void setDate (agx::Date *date)
 
void setFirstFrameIndex (agx::UInt64 startFrame)
 
void setFirstFrameTimeStamp (agx::Real64 startTime)
 
void setFrameIO (agxData::FrameIO *frameIO)
 
void setFrameStride (agx::UInt64 stride)
 
void setHeaderFormat (SerializedFrame::HeaderFormat format)
 Some journal formats support more than one format for frame metadata. More...
 
void setLastFrameIndex (agx::UInt64 endFrame)
 
void setLastFrameTimeStamp (agx::Real64 endTime)
 
void setLittleEndian (bool flag)
 
void setNumFrames (agx::UInt64 numFrames)
 
void setSimulationHeader (agx::Component *header)
 
void setTimeStep (agx::Real64 timeStep)
 
bool transferSession (agxData::JournalArchive::Session *session, agxData::JournalArchive *target)
 Transfer the given session from this journal into the given target. More...
 
bool transferTo (agxData::JournalArchive *target)
 Transfer the session to another JournalArchive. The target JournalArchive must be of the same correct type. More...
 
virtual bool truncate (agx::UInt firstFrameToRemove)=0
 Remove all frames from the given index and forward. More...
 
virtual bool unpackSceneData (std::stringstream &sceneData)=0
 Copy scene data from the archive, stored in some format specific way, into the given stringstream. More...
 
virtual bool unpackSceneData (std::ostream &sceneData)=0
 Copy scene data from the archive, stored in some format specific way, into the given stringstream. More...
 
virtual bool unpackSceneFile ()=0
 Ensure that the scene file for the session is available at the location returned by getScenePath. More...
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
virtual void writeHeader ()=0
 

Static Public Member Functions

static agx::String generateNameFromCurrentDate ()
 
static bool isFileJournal (const agx::String &path)
 
static bool parseSessionPath (const agx::String &fullPath, agx::String &journalPath, agx::String &sessionName)
 Split the given session path into the path to the path to the journal and the name of the session. More...
 
template<typename T >
static bool ValidateCast (const Referenced *object)
 

Protected Member Functions

virtual ~FileJournal ()
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
virtual
agxData::JournalArchive::Session * 
makeCopy (agxData::JournalArchive::Session *session) override
 Create a copy of the given session. The copy will have its disk data stored in the current JournalArchive. More...
 
bool registerSession (agxData::JournalArchive::Session *newSession)
 Create the Journal <-> Session coupling. More...
 
bool rename (const agx::Name &name)
 
 Session (const agx::Name &name)
 
void setName (const agx::Name &name)
 
void setPath (const agx::String &path)
 
bool unregisterSession (agxData::JournalArchive::Session *removedSession)
 Remove the Journal <-> Session coupling. More...
 
bool updateSessionAndTableWithNewName (agxData::JournalArchive::Session *session, const agx::Name &newName)
 Change the name of the given session. Will ensure that the session table is kept consistent. More...
 

Static Protected Member Functions

static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 

Protected Attributes

Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

The FileJournal provides a way to inspect and manipulate a journal created by the FileFrameWriter and stored on disk.

Definition at line 39 of file FileJournal.h.

Member Typedef Documentation

Definition at line 317 of file JournalArchive.h.

Definition at line 46 of file FileJournal.h.

Definition at line 46 of file FileJournal.h.

Constructor & Destructor Documentation

agxData::FileJournal::FileJournal ( const agx::String &  diskPath)

Open a journal on disk.

Parameters
diskPathThe disk path to a directory which is a journal.
virtual agxData::FileJournal::~FileJournal ( )
protectedvirtual

Member Function Documentation

void agx::Referenced::allocateObserverVector ( ) const
protectedinherited
template<typename T >
T* agx::Referenced::as ( )
inherited

Subclass casting.

Template type must match actual type, dynamic_cast assertion will fail otherwise.

Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), and agx::InternalData::getOrCreate().

template<typename T >
const T* agx::Referenced::as ( ) const
inherited
template<typename T >
T* agx::Referenced::asSafe ( )
inherited

Safe subclass casting, return nullptr if template type does not match.

Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().

template<typename T >
const T* agx::Referenced::asSafe ( ) const
inherited
bool agxData::JournalArchive::copySession ( agxData::JournalArchive::Session *  session,
agxData::JournalArchive *  target 
)
inherited

Copy the given session from this journal into the given target journal.

The session must be owned by the current JournalArchive and the target must be of the same journal type, i.e, use the same disk format.

Parameters
sessionThe session to copy.
targetThe journal that should receive the copy.
Returns
True if the copy is successful, false otherwise.
bool agxData::JournalArchive::copyTo ( agxData::JournalArchive *  target)
inherited

Copy the session to another JournalArchive.

The target JournalArchive must be of the same correct type. The result is the same as if "session->getJournal()->copySession(session, target)" had been called.

virtual DiskFrameReader* agxData::FileJournal::createFrameReader ( JournalArchive::Session *  session)
overridevirtual
virtual DiskFrameReader* agxData::JournalArchive::createFrameReader ( agxData::JournalArchive::Session *  session)
pure virtualinherited
virtual DiskFrameWriter* agxData::FileJournal::createFrameWriter ( JournalArchive::Session *  session)
overridevirtual
virtual DiskFrameWriter* agxData::JournalArchive::createFrameWriter ( agxData::JournalArchive::Session *  session)
pure virtualinherited
virtual JournalArchive::Session* agxData::FileJournal::createNewSession ( const agx::Name &  name)
overridevirtual

Create a new session within the journal.

Will return nullptr if a session with the given name already exists.

Parameters
nameThe name of the new session.
Returns
The newly created session, or nullptr on error.

Implements agxData::JournalArchive.

void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited
virtual void agxData::JournalArchive::finalizeHeader ( )
pure virtualinherited
static agx::String agxData::JournalArchive::generateNameFromCurrentDate ( )
staticinherited
agx::UInt32 agxData::JournalArchive::getAgxVersionNumber ( ) const
inherited
const agx::String& agxData::JournalArchive::getAgxVersionString ( ) const
inherited
virtual void agxData::JournalArchive::getAllPlots ( PlotDataRefVector &  result)
pure virtualinherited
agx::Real64 agxData::JournalArchive::getComputationTime ( ) const
inherited
virtual agx::String agxData::FileJournal::getCustomFilesPath ( bool  create = true) const
overridevirtual
Returns
Path to a directory on disk where the current FileJournal stores its files.

Implements agxData::JournalArchive.

virtual agx::String agxData::FileJournal::getCustomFilesPath ( const agx::Name &  sessionName,
bool  create = true 
) const
overridevirtual
Returns
Path to a directory on disk that belong to the session with the given name. Will return a path even if the FileJournal doesn't contain a session with the given name.

Implements agxData::JournalArchive.

const agx::Date* agxData::JournalArchive::getDate ( ) const
inherited
static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.
agxData::FileJournal::Session* agxData::FileJournal::getFileSession ( const agx::Name &  name)
Returns
The session with the given name.
agx::UInt64 agxData::JournalArchive::getFirstFrameIndex ( ) const
inherited
agx::Real64 agxData::JournalArchive::getFirstFrameTimeStamp ( ) const
inherited
virtual agxData::Frame::Header agxData::JournalArchive::getFrameHeader ( agx::UInt  frameIndex) const
pure virtualinherited

Load the header data for a particular frame.

agxData::FrameIO* agxData::JournalArchive::getFrameIO ( )
inherited
agx::UInt64 agxData::JournalArchive::getFrameStride ( ) const
inherited
SerializedFrame::HeaderFormat agxData::JournalArchive::getHeaderFormat ( ) const
inherited
agxData::JournalArchive* agxData::JournalArchive::getJournal ( )
inherited
Returns
The JournalArchive that this session is part of.
const agxData::JournalArchive* agxData::JournalArchive::getJournal ( ) const
inherited
Returns
The JournalArchive that this session is part of.
agx::UInt64 agxData::JournalArchive::getLastFrameIndex ( ) const
inherited
agx::Real64 agxData::JournalArchive::getLastFrameTimeStamp ( ) const
inherited
const agx::Name& agxData::JournalArchive::getName ( ) const
inherited
Returns
The name of the journal. This is often the same as the name of a file on disk.
const agx::Name& agxData::JournalArchive::getName ( ) const
inherited
Returns
The name of the session.
virtual agx::UInt agxData::JournalArchive::getNextFrameIndex ( agx::UInt  currentFrameIndex,
agx::Int  offset 
) const
pure virtualinherited
agx::UInt64 agxData::JournalArchive::getNumFrames ( ) const
inherited
size_t agxData::JournalArchive::getNumSessions ( ) const
inherited
Returns
The number of sessions currently stored in the journal.
const agx::String& agxData::JournalArchive::getPath ( ) const
inherited
Returns
A search path to the saved journal. The semantics of the string is storage format dependent, but is often a path to a file on disk.
virtual agx::String agxData::JournalArchive::getPath ( ) const
pure virtualinherited

Returns a format specific string that identifies the location of this session within a journal.

This may be, for example, a disk or HDF5 path.

virtual PlotData* agxData::JournalArchive::getPlot ( const agx::String &  plotName)
pure virtualinherited
virtual void agxData::JournalArchive::getPlotList ( agx::StringVector &  result)
pure virtualinherited
int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.
virtual agx::String agxData::JournalArchive::getScenePath ( bool  create = true) const
pure virtualinherited

Get the path on disk where the .agx file, called the scene file, containing the initial state of the simulation may be stored.

Actual presence of the .agx file depends on if it has been written yet.

If the journal stores the scene data in some internal format, then the unpackSceneFile may be used to copy the initial state from the internal format into a .agx file located at the path returned by this function.

Returns
The path to the .agx file containing the initial state of the simulation.
agxData::JournalArchive::Session* agxData::JournalArchive::getSession ( const agx::Name &  name)
inherited
Returns
The session with the given name, or nullptr if no such session exists.
const agxData::JournalArchive::Session* agxData::JournalArchive::getSession ( const agx::Name &  name) const
inherited
Returns
The session with the given name, or nullptr if no such session exists.
const SessionTable& agxData::JournalArchive::getSessions ( ) const
inherited
Returns
A table containing all sessions stored in the journal, mapping session names to sessions themselves.
agx::Component* agxData::JournalArchive::getSimulationHeader ( )
inherited
agx::Real64 agxData::JournalArchive::getTimeStep ( ) const
inherited
template<typename T >
bool agx::Referenced::is ( ) const
inherited
bool agxData::JournalArchive::is64BitArchitecture ( ) const
inherited
bool agxData::JournalArchive::is64BitReal ( ) const
inherited
static bool agxData::FileJournal::isFileJournal ( const agx::String &  path)
static
bool agxData::JournalArchive::isLittleEndian ( ) const
inherited
bool agxData::JournalArchive::isOwnerOf ( const agxData::JournalArchive::Session *  session) const
inherited
Returns
True if this journal is the owner of the given session. False otherwise.
void agxData::JournalArchive::listSessionNames ( agx::Vector< agx::Name > &  result) const
inherited

Add to the end of the given Vector the names of all the sessions in the Journal.

virtual agxData::JournalArchive::Session* agxData::FileJournal::makeCopy ( agxData::JournalArchive::Session *  session)
overrideprotectedvirtual

Create a copy of the given session. The copy will have its disk data stored in the current JournalArchive.

Implements agxData::JournalArchive.

virtual bool agxData::JournalArchive::packSceneData ( std::stringstream &  sceneData)
pure virtualinherited

Copy the scene data found in the given stringstream into the journal in some format specific way.

The method is intended to be used with a stringstream filled using the agxSDK::Simulation::write method.

virtual bool agxData::JournalArchive::packSceneData ( std::istream &  sceneData)
pure virtualinherited

Copy the scene data found in the given stringstream into the journal in some format specific way.

The method is intended to be used with a stringstream filled using the agxSDK::Simulation::write method.

static bool agxData::FileJournal::parseSessionPath ( const agx::String &  fullPath,
agx::String &  journalPath,
agx::String &  sessionName 
)
static

Split the given session path into the path to the path to the journal and the name of the session.

Parameters
fullPathDisk path to a session.
[out]journalPathWill be filled with the path of the journal, or the empty string on error.
[out]sessionNameWill be filled with the name of the session, or the empty string on error.
virtual bool agxData::JournalArchive::recordExtraData ( const agx::String &  key,
const agx::String &  value 
)
pure virtualinherited

Store a string key-value pair to the session on disk.

bool agxData::JournalArchive::recordExtraDataAsJSon ( const agx::String &  key,
const agx::String &  value 
)
inherited

Store a string key-value pair to the session on disk, without ruining the .

void agx::Referenced::reference ( void *  ptr = nullptr) const
inherited

Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.

This method should be used with care, always balanced with the same number of calls to unreference.

Referenced by agxData::Val< UInt >::Val().

bool agxData::JournalArchive::registerSession ( agxData::JournalArchive::Session *  newSession)
protectedinherited

Create the Journal <-> Session coupling.

Will fail if there already is a session with the given name in the session table.

virtual void agxData::JournalArchive::removePlot ( const agx::String &  plotName)
pure virtualinherited
virtual bool agxData::FileJournal::removeSession ( agxData::JournalArchive::Session *  session)
overridevirtual

Remove the given session from the journal.

Implements agxData::JournalArchive.

bool agxData::JournalArchive::removeSession ( const agx::Name &  name)
inherited

Remove the session with the given name from the journal.

bool agxData::JournalArchive::rename ( const agx::Name &  name)
protectedinherited
virtual bool agxData::FileJournal::renameSession ( agxData::JournalArchive::Session *  session,
const agx::Name &  newName 
)
overridevirtual

Rename the given session, including data movement on disk.

Implements agxData::JournalArchive.

virtual bool agxData::JournalArchive::retrieveExtraData ( const agx::String &  key,
agx::String &  value 
)
pure virtualinherited

Read back the value associated with the key from disk.

The value, if found, is stored in 'value'

agx::String agxData::JournalArchive::retrieveExtraData ( const agx::String &  key)
inherited
bool agxData::JournalArchive::retrieveExtraDataAsJSon ( const agx::String &  key,
agx::String &  value 
)
inherited

Read back the value associated with the key from disk.

The value, if found, is stored in 'value'

agx::String agxData::JournalArchive::retrieveExtraDataAsJSon ( const agx::String &  key)
inherited
virtual void agxData::JournalArchive::savePlot ( const PlotData *  plot)
pure virtualinherited
agxData::JournalArchive::Session ( const agx::Name &  name)
protectedinherited
void agxData::JournalArchive::set64BitArchitecture ( bool  flag)
inherited
void agxData::JournalArchive::set64BitReal ( bool  flag)
inherited
void agxData::JournalArchive::setAgxVersionNumber ( const agx::UInt32  version)
inherited
void agxData::JournalArchive::setAgxVersionString ( const agx::String &  version)
inherited
void agxData::JournalArchive::setComputationTime ( agx::Real64  computationTime)
inherited
void agxData::JournalArchive::setDate ( agx::Date *  date)
inherited
static void agx::Referenced::setDeleteHandler ( DeleteHandler *  handler)
staticprotectedinherited

Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.

void agxData::JournalArchive::setFirstFrameIndex ( agx::UInt64  startFrame)
inherited
void agxData::JournalArchive::setFirstFrameTimeStamp ( agx::Real64  startTime)
inherited
void agxData::JournalArchive::setFrameIO ( agxData::FrameIO *  frameIO)
inherited
void agxData::JournalArchive::setFrameStride ( agx::UInt64  stride)
inherited
void agxData::JournalArchive::setHeaderFormat ( SerializedFrame::HeaderFormat  format)
inherited

Some journal formats support more than one format for frame metadata.

It is the responsibility of the agxData::Track reading or writing from/to the session to ensure that the set header format matches the actual format used on disk. In particular, setHeaderFormat cannot be used to change the header format of a session.

void agxData::JournalArchive::setLastFrameIndex ( agx::UInt64  endFrame)
inherited
void agxData::JournalArchive::setLastFrameTimeStamp ( agx::Real64  endTime)
inherited
void agxData::JournalArchive::setLittleEndian ( bool  flag)
inherited
void agxData::JournalArchive::setName ( const agx::Name &  name)
protectedinherited
void agxData::JournalArchive::setNumFrames ( agx::UInt64  numFrames)
inherited
void agxData::JournalArchive::setPath ( const agx::String &  path)
protectedinherited
void agxData::JournalArchive::setSimulationHeader ( agx::Component *  header)
inherited
void agxData::JournalArchive::setTimeStep ( agx::Real64  timeStep)
inherited
bool agxData::JournalArchive::transferSession ( agxData::JournalArchive::Session *  session,
agxData::JournalArchive *  target 
)
inherited

Transfer the given session from this journal into the given target.

The session must be owned by the current JournalArchive and the target must be of the same journal type, i.e., use the same disk format. It is safe to continue using pointers to the transfered session, then in-memory object is updated rather than recreated.

Parameters
sessionThe session to transfer.
targetThe journal that should take over ownership of the session.
Returns
True of the transfer is successful, false otherwise.
bool agxData::JournalArchive::transferTo ( agxData::JournalArchive *  target)
inherited

Transfer the session to another JournalArchive. The target JournalArchive must be of the same correct type.

virtual bool agxData::JournalArchive::truncate ( agx::UInt  firstFrameToRemove)
pure virtualinherited

Remove all frames from the given index and forward.

virtual bool agxData::JournalArchive::unpackSceneData ( std::stringstream &  sceneData)
pure virtualinherited

Copy scene data from the archive, stored in some format specific way, into the given stringstream.

The stringstream can then be passed on to the agxSDK::Simulation::read method.

virtual bool agxData::JournalArchive::unpackSceneData ( std::ostream &  sceneData)
pure virtualinherited

Copy scene data from the archive, stored in some format specific way, into the given stringstream.

The stringstream can then be passed on to the agxSDK::Simulation::read method.

virtual bool agxData::JournalArchive::unpackSceneFile ( )
pure virtualinherited

Ensure that the scene file for the session is available at the location returned by getScenePath.

Will overwrite the scene file with the packed version if a file is already present at the path returned by getScenePath.

void agx::Referenced::unreference ( void *  ptr = nullptr) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.

This method should be used with care, always balanced with the same number of calls to reference.

void agx::Referenced::unreference_nodelete ( ) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.

bool agxData::JournalArchive::unregisterSession ( agxData::JournalArchive::Session *  removedSession)
protectedinherited

Remove the Journal <-> Session coupling.

Note that this will do an unreference of the session and may therefore delete the session.

bool agxData::JournalArchive::updateSessionAndTableWithNewName ( agxData::JournalArchive::Session *  session,
const agx::Name &  newName 
)
protectedinherited

Change the name of the given session. Will ensure that the session table is kept consistent.

template<typename T >
static bool agx::Referenced::ValidateCast ( const Referenced *  object)
staticinherited
virtual void agxData::JournalArchive::writeHeader ( )
pure virtualinherited

Member Data Documentation

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.


The documentation for this class was generated from the following file: