The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::serialization::checkpoint::storage::StringStreamStorage Class Reference

Stringstream storage implementation. More...

#include <StringStreamStorage.hpp>

Public Member Functions

void dump (std::ostream &o) const
 
uint32_t getSize () const
 
void prepareForLoad ()
 
void beginLine (ArchData::line_idx_type idx)
 
void writeLineBytes (const char *data, size_t size)
 
void endArchData ()
 Signals end of this checkpoint's data.
 
bool good () const
 Is the reading state of this storage good? (i.e. haven't tried to read past the end of the data)
 
ArchData::line_idx_type getNextRestoreLine ()
 Restore next line. Return ArchData::INVALID_LINE_IDX on end of data.
 
void copyLineBytes (char *buf, uint32_t size)
 Read bytes for the current line.
 

Detailed Description

Stringstream storage implementation.

Warning
This is deprecated in favor of VectorStorage for in-memory uses. However, this is a starting point for disk-based storage schemes

Definition at line 16 of file StringStreamStorage.hpp.

Constructor & Destructor Documentation

◆ StringStreamStorage()

sparta::serialization::checkpoint::storage::StringStreamStorage::StringStreamStorage ( )
inline

Definition at line 21 of file StringStreamStorage.hpp.

Member Function Documentation

◆ beginLine()

void sparta::serialization::checkpoint::storage::StringStreamStorage::beginLine ( ArchData::line_idx_type idx)
inline

Definition at line 66 of file StringStreamStorage.hpp.

◆ copyLineBytes()

void sparta::serialization::checkpoint::storage::StringStreamStorage::copyLineBytes ( char * buf,
uint32_t size )
inline

Read bytes for the current line.

Definition at line 119 of file StringStreamStorage.hpp.

◆ dump()

void sparta::serialization::checkpoint::storage::StringStreamStorage::dump ( std::ostream & o) const
inline

Definition at line 26 of file StringStreamStorage.hpp.

◆ endArchData()

void sparta::serialization::checkpoint::storage::StringStreamStorage::endArchData ( )
inline

Signals end of this checkpoint's data.

Definition at line 80 of file StringStreamStorage.hpp.

◆ getNextRestoreLine()

ArchData::line_idx_type sparta::serialization::checkpoint::storage::StringStreamStorage::getNextRestoreLine ( )
inline

Restore next line. Return ArchData::INVALID_LINE_IDX on end of data.

Definition at line 99 of file StringStreamStorage.hpp.

◆ getSize()

uint32_t sparta::serialization::checkpoint::storage::StringStreamStorage::getSize ( ) const
inline

Definition at line 58 of file StringStreamStorage.hpp.

◆ good()

bool sparta::serialization::checkpoint::storage::StringStreamStorage::good ( ) const
inline

Is the reading state of this storage good? (i.e. haven't tried to read past the end of the data)

Definition at line 91 of file StringStreamStorage.hpp.

◆ prepareForLoad()

void sparta::serialization::checkpoint::storage::StringStreamStorage::prepareForLoad ( )
inline

Definition at line 62 of file StringStreamStorage.hpp.

◆ writeLineBytes()

void sparta::serialization::checkpoint::storage::StringStreamStorage::writeLineBytes ( const char * data,
size_t size )
inline

Definition at line 73 of file StringStreamStorage.hpp.


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