17#ifndef AGXDATA_FILEJOURNAL_H
18#define AGXDATA_FILEJOURNAL_H
100 void readJournalContent();
104 FileJournal::Session* createNewFileSession(
const agx::Name& name );
178 virtual void savePlot(
const PlotData* plot)
override;
195 static FileJournal::Session*
load(
const agx::TiXmlElement* eSession );
223 agx::TiXmlElement* generateHeader();
230 agx::TiXmlText* getTextNode(agx::TiXmlElement* root,
const agx::String& key,
bool create);
232 bool unpackSceneDataToStream(std::ostream& sceneData);
233 void createFrameTable();
234 void printFileStatistics();
235 void readExtraData(agx::TiXmlElement* eExtraData);
236 void readPlotData(agx::TiXmlElement* ePlotData);
265 PlotTable m_plotTable;
#define AGX_DECLARE_POINTER_TYPES(type)
Helper class for the FrameReaders that are backed by a file on disk.
Base class for the FrameReaders that are backed by a file on disk.
The FileJournal provides a way to inspect and manipulate a journal created by the FileFrameWriter and...
static bool isFileJournal(const agx::String &path)
virtual bool removeSession(agxData::JournalArchive::Session *session) override
Remove the given session from the journal.
virtual agx::String getCustomFilesPath(bool create=true) const override
agxData::FileJournal::Session * getFileSession(const agx::Name &name)
virtual JournalArchive::Session * createNewSession(const agx::Name &name) override
Create a new session within the journal.
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.
virtual DiskFrameReader * createFrameReader(JournalArchive::Session *session) override
virtual bool renameSession(agxData::JournalArchive::Session *session, const agx::Name &newName) override
Rename the given session, including data movement on disk.
virtual agx::String getCustomFilesPath(const agx::Name &sessionName, bool create=true) const override
virtual DiskFrameWriter * createFrameWriter(JournalArchive::Session *session) override
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 JournalArc...
FileJournal(const agx::String &diskPath)
Open a journal on disk.
The JournalArchive provides an abstract class for inspecting and manipulating the contents of a creat...
Session(const agx::Name &name)
virtual bool retrieveExtraData(const agx::String &key, agx::String &value) override
virtual void getPlotList(agx::StringVector &result) override
virtual agx::String getPath() const override
virtual bool recordExtraData(const agx::String &key, const agx::String &value) override
virtual agxData::Frame::Header getFrameHeader(agx::UInt frameIndex) const override
Load the header data for a particular frame.
const FrameInfo * getFrameInfo(agx::UInt frameIndex) const
virtual void finalizeHeader() override
virtual void writeHeader() override
virtual void removePlot(const agx::String &plotName) override
virtual bool unpackSceneData(std::stringstream &sceneData) override
Copy the scene data from the file pointed to by getScenePath into the given string stream.
agx::UInt64 getFrameHead()
virtual bool unpackSceneData(std::ostream &sceneData) override
Copy the scene data from the file pointed to by getScenePath into the given output stream.
virtual PlotData * getPlot(const agx::String &plotName) override
agx::String getFramesPath() const
virtual bool packSceneData(std::istream &sceneData) override
Copy the scene data found in the given input stream into the scene file pointed to by getScenePath.
const FileJournal * getFileJournal() const
static agxData::FileJournal::Session * create(const agx::Name &name, const agx::String &path)
Create a new empty session to which a recording can be made. Will return nullptr on error.
virtual bool packSceneData(std::stringstream &sceneData) override
Copy the scene data found in the given string stream into the scene file pointed to by getScenePath.
virtual agx::String getCustomFilesPath(bool create=true) const override
agx::String getPlotDirectoryPath() const
void setFrameHead(agx::UInt64 head)
virtual agx::UInt getNextFrameIndex(agx::UInt currentFrameIndex, agx::Int offset) const override
static FileJournal::Session * load(const agx::TiXmlElement *eSession)
Load a session from disk. Will return nullptr on error.
virtual void getAllPlots(PlotDataRefVector &result) override
FileJournal * getFileJournal()
virtual agx::String getScenePath(bool create=true) const override
virtual void savePlot(const PlotData *plot) override
virtual bool unpackSceneFile() override
The file journal does not support packing, so this does nothing.
agx::String getSessionHeaderPath() const
virtual bool truncate(agx::UInt firstFrameToRemove) override
Remove all frames from the given index and forward.
agx::String buildFramePath(agx::UInt frameIndex) const
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Inheritance with partial specialization due to bug with ref_ptr containers.
Representation of a name string.
Contains classes for low level data storage for AGX.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
agx::UInt64 dataSegmentOffset
agx::UInt64 sequenceIndex