29 class Hdf5FrameReader;
30 class Hdf5FrameWriter;
51 Hdf5Journal(
const agx::String& diskPath,
bool readOnlyIfExists=
false);
60 virtual JournalArchive::Session* createNewSession(
const agx::Name& name )
override;
67 Hdf5Journal::Session* createNewHdf5Session(
const agx::Name& name );
70 agxData::Hdf5Journal::Session* getHdf5Session(
const agx::Name& name );
79 virtual agx::String getCustomFilesPath(
bool create =
true)
const override;
82 virtual agx::String getCustomFilesPath(
const agx::Name& sessionName,
bool create =
true )
const override;
87 virtual DiskFrameReader* createFrameReader(JournalArchive::Session* session)
override;
88 virtual DiskFrameWriter* createFrameWriter(JournalArchive::Session* session)
override;
91 virtual ~Hdf5Journal();
97 void readJournalContent();
102 friend class Session;
103 void unlinkSessionData(
const agx::Name& name );
105 H5::Group& getSessionsGroup();
106 H5::H5File* getFile();
110 H5::Group m_sessions;
149 virtual agx::String getScenePath(
bool create =
true)
const override;
159 virtual bool unpackSceneFile()
override;
166 virtual bool packSceneData(std::stringstream& sceneData)
override;
171 virtual bool unpackSceneData(std::stringstream& sceneData)
override;
177 virtual bool packSceneData(std::istream& sceneData)
override;
182 virtual bool unpackSceneData(std::ostream& sceneData)
override;
189 virtual agx::String getCustomFilesPath(
bool create =
true)
const override;
194 virtual bool truncate(
agx::UInt firstFrameToRemove )
override;
199 virtual agxData::Frame::Header getFrameHeader(
agx::UInt frameIndex )
const override;
202 Hdf5Journal* getHdf5Journal();
204 const Hdf5Journal* getHdf5Journal()
const;
209 virtual void savePlot(
const PlotData* plot)
override;
210 virtual void removePlot(
const agx::String& plotName )
override;
211 virtual PlotData* getPlot(
const agx::String& plotName )
override;
212 virtual void getAllPlots( PlotDataRefVector& result )
override;
217 virtual void writeHeader()
override;
218 virtual void finalizeHeader()
override;
222 static agxData::Hdf5Journal::Session* create(
const agx::Name& name, H5::Group& sessions );
225 static agxData::Hdf5Journal::Session* load(
const agx::Name& name, H5::Group& sessionRoot );
228 friend class agxData::Hdf5Journal;
231 bool renameDiskData(
const agx::Name& newName );
233 bool copySessionFolder(
agx::String targetFolderPath,
bool deleteSource =
false );
239 bool copyDiskData( agxData::Hdf5Journal* target );
243 Session(
const agx::Name& name, H5::Group& session );
246 void fixHeader(H5::Group& sessionRoot, H5::Group& header);
251 friend class agxData::Hdf5FrameReader;
252 friend class agxData::Hdf5FrameWriter;
254 H5::Group& getHdf5Node();
255 H5::H5File* getHdf5File();
267 bool unpackSceneDataToStream(std::ostream& sceneData);
272 H5::Group openExtraData(
bool create);
275 struct FrameInfo :
public agxData::Frame::Header
281 void createFrameTable();
283 static herr_t iterateSession(hid_t group_id,
const char * member_name,
const H5L_info_t *,
void* operator_data);
284 static bool compareFrames(
const FrameInfo& lhs,
const FrameInfo& rhs);
293 FrameTable m_frameTable;
#define AGX_DECLARE_POINTER_TYPES(type)
The JournalArchive provides an abstract class for inspecting and manipulating the contents of a creat...
Session(const agx::Name &name)
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Representation of a name string.
Contains classes for low level data storage for AGX.