Abstract interface for Archives.
More...
#include <Archive.h>
|
virtual | ~Archive () |
| Vritual destructor.
|
|
virtual FieldID | write (const StorageView &storageView, const std::string &field, const std::shared_ptr< FieldMetainfoImpl > info)=0 |
| Write the field given by storageView to disk. More...
|
|
virtual void | read (StorageView &storageView, const FieldID &fieldID, std::shared_ptr< FieldMetainfoImpl > info) const =0 |
| Read the field identified by fieldID and given by storageView from disk. More...
|
|
virtual void | updateMetaData ()=0 |
| Update the meta-data on disk.
|
|
virtual std::string | name () const =0 |
| Name of the archive.
|
|
virtual OpenModeKind | mode () const =0 |
| Open-policy of the archive.
|
|
virtual std::string | directory () const =0 |
| Directory to write/read files.
|
|
virtual std::string | prefix () const =0 |
| Prefix of all files.
|
|
virtual std::string | metaDataFile () const =0 |
| Full file path to the meta-data file.
|
|
virtual void | clear ()=0 |
| Clear the archive i.e remove all data from disk and reset the internal data-structures.
|
|
virtual bool | isReadingThreadSafe () const |
| Indicate whether it's safe for multiple threads to call Archive::read.
|
|
virtual bool | isWritingThreadSafe () const |
| Indicate whether it's safe for multiple threads to call Archive::write.
|
|
virtual bool | isSlicedReadingSupported () const |
| Indicate whether the archive supports StorageViews with attached slices.
|
|
virtual std::ostream & | toStream (std::ostream &stream) const =0 |
| Convert the archive to stream.
|
|
|
std::ostream & | operator<< (std::ostream &stream, const Archive &archive) |
| Convert to stream.
|
|
Abstract interface for Archives.
Definition at line 30 of file Archive.h.
◆ read()
◆ write()
Write the field
given by storageView
to disk.
The returned FieldID
has to uniquely identify the field i.e it should be possible to read the exact same piece of data when later passing the FieldID
to the read method.
- Parameters
-
storageView | Abstract StorageView of the underlying data |
field | Name of the field |
info | Field meta-information (can be a nullptr ) |
- Returns
- Unique identidier of the field
Implemented in serialbox::BinaryArchive, serialbox::NetCDFArchive, and serialbox::MockArchive.
The documentation for this class was generated from the following file: