RobWorkProject
Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
INIArchive Class Reference

archive for loading and saving serializable classes to an ini-file format. More...

#include <INIArchive.hpp>

Inherits InputArchive, and OutputArchive.

Public Member Functions

 INIArchive ()
 constructor
 
 INIArchive (const std::string &filename)
 
 INIArchive (std::ostream &ofs)
 
virtual ~INIArchive ()
 destructor
 
void close ()
 close this archive for streaming
 
bool isOpen ()
 test if this archive is openned for manipulation. If this is false then no storage will be performed. More...
 
void flush ()
 flush the archive. Anything stored in buffers will be flushed to the actual media that has been openned. More...
 
- Public Member Functions inherited from InputArchive
 InputArchive ()
 constructor
 
void readEnterScope (const std::string &id, const std::string &idDefault="")
 enter specific scope with id when reading. More...
 
void readLeaveScope (const std::string &id, const std::string &idDefault="")
 leave specific scope with id when reading. More...
 
bool readBool (const std::string &id)
 read boolean
 
int readInt (const std::string &id)
 read integer
 
unsigned int readUInt (const std::string &id)
 read unsigned integer
 
boost::int8_t readInt8 (const std::string &id)
 read 8 bit integer
 
boost::uint8_t readUInt8 (const std::string &id)
 read 8 bit unsigned integer
 
boost::int64_t readInt64 (const std::string &id)
 read 64 bit integer
 
boost::uint64_t readUInt64 (const std::string &id)
 read 64 bit unsigned integer
 
double readDouble (const std::string &id)
 read double floating point
 
std::string readString (const std::string &id)
 read string
 
template<class T >
void read (T &object, const std::string &id)
 Read object with identifier id from archive. More...
 
template<class T >
void read (T &object, const std::string &id, const std::string &idDefault)
 Read object with identifier id from archive. More...
 
template<class T >
InputArchiveoperator>> (T &dst)
 Stream operator for streaming from archive to object. More...
 
- Public Member Functions inherited from Archive
virtual ~Archive ()
 destructor
 
void open (const std::string &filename)
 open file for reading and writing More...
 
void open (std::iostream &stream)
 initialize archive for reading and/or writing to a stream More...
 
void open (std::ostream &ofs)
 open an output stream for writing
 
void open (std::istream &ifs)
 open an inputstream for reading
 
- Public Member Functions inherited from OutputArchive
virtual ~OutputArchive ()
 destructor
 
void writeEnterScope (const std::string &id, const std::string &idDefault="")
 create a serialized scope in which objects can be written More...
 
void writeLeaveScope (const std::string &id, const std::string &idDefault="")
 leave the current scope More...
 
template<class T >
void write (const T &object, const std::string &id)
 generic write method. This method will write any objects that are either derived from the rw::common::Serializable class or where overloaded read() write() methods exists. More...
 
template<class T >
void write (const T &object, const std::string &id, const std::string &id_default)
 Same as write(object,id) however an additional parameter is given which is the default identifier to use in case id is empty. More...
 
template<class T >
OutputArchiveoperator<< (T &dst)
 Output stream operator.
 

Protected Member Functions

void doWriteEnterScope (const std::string &id)
 Enter a scope. More...
 
void doWriteLeaveScope (const std::string &id)
 Leave a scope. More...
 
void doReadEnterScope (const std::string &id)
 Enter a scope. More...
 
void doReadLeaveScope (const std::string &id)
 Leave a scope. More...
 
void doOpenArchive (const std::string &filename)
 open file for reading and writing More...
 
void doOpenArchive (std::iostream &stream)
 initialize archive for reading and/or writing to a stream More...
 
void doOpenOutput (std::ostream &ofs)
 open an output stream for writing More...
 
void doOpenInput (std::istream &ifs)
 open an inputstream for reading More...
 
virtual void doWrite (bool val, const std::string &id)
 Write value val to archive with identifier id. More...
 
void doWrite (boost::int8_t val, const std::string &id)
 Write value val to archive with identifier id. More...
 
void doWrite (boost::uint8_t val, const std::string &id)
 Write value val to archive with identifier id. More...
 
void doWrite (boost::int16_t val, const std::string &id)
 Write value val to archive with identifier id. More...
 
void doWrite (boost::uint16_t val, const std::string &id)
 Write value val to archive with identifier id. More...
 
void doWrite (boost::int32_t val, const std::string &id)
 Write value val to archive with identifier id. More...
 
void doWrite (boost::uint32_t val, const std::string &id)
 Write value val to archive with identifier id. More...
 
void doWrite (boost::int64_t val, const std::string &id)
 Write value val to archive with identifier id. More...
 
void doWrite (boost::uint64_t val, const std::string &id)
 Write value val to archive with identifier id. More...
 
void doWrite (float val, const std::string &id)
 Write value val to archive with identifier id. More...
 
void doWrite (double val, const std::string &id)
 Write value val to archive with identifier id. More...
 
void doWrite (const std::string &val, const std::string &id)
 Write value val to archive with identifier id. More...
 
void doWrite (const std::vector< bool > &val, const std::string &id)
 Write vector val to archive with identifier id. More...
 
void doWrite (const std::vector< boost::int8_t > &val, const std::string &id)
 Write vector val to archive with identifier id. More...
 
void doWrite (const std::vector< boost::uint8_t > &val, const std::string &id)
 Write vector val to archive with identifier id. More...
 
void doWrite (const std::vector< boost::int16_t > &val, const std::string &id)
 Write vector val to archive with identifier id. More...
 
void doWrite (const std::vector< boost::uint16_t > &val, const std::string &id)
 Write vector val to archive with identifier id. More...
 
void doWrite (const std::vector< boost::int32_t > &val, const std::string &id)
 Write vector val to archive with identifier id. More...
 
void doWrite (const std::vector< boost::uint32_t > &val, const std::string &id)
 Write vector val to archive with identifier id. More...
 
void doWrite (const std::vector< boost::int64_t > &val, const std::string &id)
 Write vector val to archive with identifier id. More...
 
void doWrite (const std::vector< boost::uint64_t > &val, const std::string &id)
 Write vector val to archive with identifier id. More...
 
void doWrite (const std::vector< float > &val, const std::string &id)
 Write vector val to archive with identifier id. More...
 
void doWrite (const std::vector< double > &val, const std::string &id)
 Write vector val to archive with identifier id. More...
 
void doWrite (const std::vector< std::string > &val, const std::string &id)
 Write vector val to archive with identifier id. More...
 
void doWrite (const Eigen::MatrixXd &val, const std::string &id)
 Write an Eigen matrix to output. More...
 
void doWrite (const Eigen::VectorXd &val, const std::string &id)
 Write an Eigen vector to output. More...
 
template<class T >
void writeValue (const std::vector< T > &val, const std::string &id)
 Write vector val to archive with identifier id. More...
 
template<class T >
void writeValue (const T &val, const std::string &id)
 Write value val to archive with identifier id. More...
 
template<class Derived >
void writeMatrix (const Eigen::DenseCoeffsBase< Derived, Eigen::ReadOnlyAccessors > &val, const std::string &id)
 Write a generic Eigen matrix to output. More...
 
std::pair< std::string, std::string > getNameValue ()
 Split a line in a name and a value. More...
 
virtual void doRead (bool &val, const std::string &id)
 Read value val with identifier id from archive. More...
 
virtual void doRead (boost::int8_t &val, const std::string &id)
 Read value val with identifier id from archive. More...
 
virtual void doRead (boost::uint8_t &val, const std::string &id)
 Read value val with identifier id from archive. More...
 
virtual void doRead (boost::int16_t &val, const std::string &id)
 Read value val with identifier id from archive. More...
 
virtual void doRead (boost::uint16_t &val, const std::string &id)
 Read value val with identifier id from archive. More...
 
virtual void doRead (boost::int32_t &val, const std::string &id)
 Read value val with identifier id from archive. More...
 
virtual void doRead (boost::uint32_t &val, const std::string &id)
 Read value val with identifier id from archive. More...
 
virtual void doRead (boost::int64_t &val, const std::string &id)
 Read value val with identifier id from archive. More...
 
virtual void doRead (boost::uint64_t &val, const std::string &id)
 Read value val with identifier id from archive. More...
 
virtual void doRead (float &val, const std::string &id)
 Read value val with identifier id from archive. More...
 
virtual void doRead (double &val, const std::string &id)
 Read value val with identifier id from archive. More...
 
virtual void doRead (std::string &val, const std::string &id)
 Read value val with identifier id from archive. More...
 
virtual void doRead (std::vector< bool > &val, const std::string &id)
 Read vector val with identifier id from archive. More...
 
virtual void doRead (std::vector< boost::int8_t > &val, const std::string &id)
 Read vector val with identifier id from archive. More...
 
virtual void doRead (std::vector< boost::uint8_t > &val, const std::string &id)
 Read vector val with identifier id from archive. More...
 
virtual void doRead (std::vector< boost::int16_t > &val, const std::string &id)
 Read vector val with identifier id from archive. More...
 
virtual void doRead (std::vector< boost::uint16_t > &val, const std::string &id)
 Read vector val with identifier id from archive. More...
 
virtual void doRead (std::vector< boost::int32_t > &val, const std::string &id)
 Read vector val with identifier id from archive. More...
 
virtual void doRead (std::vector< boost::uint32_t > &val, const std::string &id)
 Read vector val with identifier id from archive. More...
 
virtual void doRead (std::vector< boost::int64_t > &val, const std::string &id)
 Read vector val with identifier id from archive. More...
 
virtual void doRead (std::vector< boost::uint64_t > &val, const std::string &id)
 Read vector val with identifier id from archive. More...
 
virtual void doRead (std::vector< float > &val, const std::string &id)
 Read vector val with identifier id from archive. More...
 
virtual void doRead (std::vector< double > &val, const std::string &id)
 Read vector val with identifier id from archive. More...
 
virtual void doRead (std::vector< std::string > &val, const std::string &id)
 Read vector val with identifier id from archive. More...
 
virtual void doRead (Eigen::MatrixXd &val, const std::string &id)
 
virtual void doRead (Eigen::VectorXd &val, const std::string &id)
 
template<class T >
void readValue (std::vector< T > &val, const std::string &id)
 Read vector val with identifier id from archive. More...
 
template<class T >
void readValue (T &val, const std::string &id)
 Read value val with identifier id from archive. More...
 
template<class Derived >
void readMatrix (Eigen::PlainObjectBase< Derived > &val, const std::string &id)
 Read a generic Eigen matrix. More...
 
bool getLine ()
 Read one line from input. More...
 
- Protected Member Functions inherited from InputArchive
template<class T >
void doRead (T &object, const std::string &id)
 Read object with identifier id from archive. More...
 
- Protected Member Functions inherited from OutputArchive
template<class T >
void doWrite (const T &object, const std::string &id)
 handles serialization of an object. The object must either be a primitive type, inherit from Serializable or there must exist an overloaded method rw::common::serialization::write(const T& data, class OutputArchive& oarchive, const std::string& id) More...
 

Static Protected Attributes

static const int MAX_LINE_WIDTH = 1000
 Maximum number of characters in one line.
 

Detailed Description

archive for loading and saving serializable classes to an ini-file format.

Member Function Documentation

◆ doOpenArchive() [1/2]

void doOpenArchive ( const std::string &  filename)
protectedvirtual

open file for reading and writing

Parameters
filename

Implements Archive.

◆ doOpenArchive() [2/2]

void doOpenArchive ( std::iostream &  stream)
protectedvirtual

initialize archive for reading and/or writing to a stream

Parameters
stream[in] the stream

Implements Archive.

◆ doOpenInput()

void doOpenInput ( std::istream &  ifs)
protectedvirtual

open an inputstream for reading

Implements Archive.

◆ doOpenOutput()

void doOpenOutput ( std::ostream &  ofs)
protectedvirtual

open an output stream for writing

Implements Archive.

◆ doRead() [1/26]

virtual void doRead ( bool &  val,
const std::string &  id 
)
protectedvirtual

Read value val with identifier id from archive.

Parameters
val[out] the value from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [2/26]

virtual void doRead ( boost::int8_t &  val,
const std::string &  id 
)
protectedvirtual

Read value val with identifier id from archive.

Parameters
val[out] the value from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [3/26]

virtual void doRead ( boost::uint8_t &  val,
const std::string &  id 
)
protectedvirtual

Read value val with identifier id from archive.

Parameters
val[out] the value from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [4/26]

virtual void doRead ( boost::int16_t &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read value val with identifier id from archive.

Parameters
val[out] the value from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [5/26]

virtual void doRead ( boost::uint16_t &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read value val with identifier id from archive.

Parameters
val[out] the value from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [6/26]

virtual void doRead ( boost::int32_t &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read value val with identifier id from archive.

Parameters
val[out] the value from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [7/26]

virtual void doRead ( boost::uint32_t &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read value val with identifier id from archive.

Parameters
val[out] the value from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [8/26]

virtual void doRead ( boost::int64_t &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read value val with identifier id from archive.

Parameters
val[out] the value from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [9/26]

virtual void doRead ( boost::uint64_t &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read value val with identifier id from archive.

Parameters
val[out] the value from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [10/26]

virtual void doRead ( float &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read value val with identifier id from archive.

Parameters
val[out] the value from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [11/26]

virtual void doRead ( double &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read value val with identifier id from archive.

Parameters
val[out] the value from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [12/26]

virtual void doRead ( std::string &  val,
const std::string &  id 
)
protectedvirtual

Read value val with identifier id from archive.

Parameters
val[out] the value from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [13/26]

virtual void doRead ( std::vector< bool > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read vector val with identifier id from archive.

Parameters
val[out] the vector from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [14/26]

virtual void doRead ( std::vector< boost::int8_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read vector val with identifier id from archive.

Parameters
val[out] the vector from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [15/26]

virtual void doRead ( std::vector< boost::uint8_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read vector val with identifier id from archive.

Parameters
val[out] the vector from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [16/26]

virtual void doRead ( std::vector< boost::int16_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read vector val with identifier id from archive.

Parameters
val[out] the vector from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [17/26]

virtual void doRead ( std::vector< boost::uint16_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read vector val with identifier id from archive.

Parameters
val[out] the vector from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [18/26]

virtual void doRead ( std::vector< boost::int32_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read vector val with identifier id from archive.

Parameters
val[out] the vector from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [19/26]

virtual void doRead ( std::vector< boost::uint32_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read vector val with identifier id from archive.

Parameters
val[out] the vector from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [20/26]

virtual void doRead ( std::vector< boost::int64_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read vector val with identifier id from archive.

Parameters
val[out] the vector from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [21/26]

virtual void doRead ( std::vector< boost::uint64_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read vector val with identifier id from archive.

Parameters
val[out] the vector from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [22/26]

virtual void doRead ( std::vector< float > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read vector val with identifier id from archive.

Parameters
val[out] the vector from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [23/26]

virtual void doRead ( std::vector< double > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Read vector val with identifier id from archive.

Parameters
val[out] the vector from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [24/26]

virtual void doRead ( std::vector< std::string > &  val,
const std::string &  id 
)
protectedvirtual

Read vector val with identifier id from archive.

Parameters
val[out] the vector from archive.
id[in] the identifier.

Implements InputArchive.

◆ doRead() [25/26]

virtual void doRead ( Eigen::MatrixXd &  val,
const std::string &  id 
)
inlineprotectedvirtual

Implements InputArchive.

◆ doRead() [26/26]

virtual void doRead ( Eigen::VectorXd &  val,
const std::string &  id 
)
inlineprotectedvirtual

Implements InputArchive.

◆ doReadEnterScope()

void doReadEnterScope ( const std::string &  id)
protectedvirtual

Enter a scope.

Parameters
id[in] identifier for the scope.

Implements InputArchive.

◆ doReadLeaveScope()

void doReadLeaveScope ( const std::string &  id)
protectedvirtual

Leave a scope.

Parameters
id[in] identifier for the scope.

Implements InputArchive.

◆ doWrite() [1/26]

virtual void doWrite ( bool  val,
const std::string &  id 
)
inlineprotectedvirtual

Write value val to archive with identifier id.

Parameters
val[in] value to write.
id[in] identifier for the value.

Implements OutputArchive.

◆ doWrite() [2/26]

void doWrite ( boost::int8_t  val,
const std::string &  id 
)
protectedvirtual

Write value val to archive with identifier id.

Parameters
val[in] value to write.
id[in] identifier for the value.

Implements OutputArchive.

◆ doWrite() [3/26]

void doWrite ( boost::uint8_t  val,
const std::string &  id 
)
protectedvirtual

Write value val to archive with identifier id.

Parameters
val[in] value to write.
id[in] identifier for the value.

Implements OutputArchive.

◆ doWrite() [4/26]

void doWrite ( boost::int16_t  val,
const std::string &  id 
)
inlineprotectedvirtual

Write value val to archive with identifier id.

Parameters
val[in] value to write.
id[in] identifier for the value.

Implements OutputArchive.

◆ doWrite() [5/26]

void doWrite ( boost::uint16_t  val,
const std::string &  id 
)
inlineprotectedvirtual

Write value val to archive with identifier id.

Parameters
val[in] value to write.
id[in] identifier for the value.

Implements OutputArchive.

◆ doWrite() [6/26]

void doWrite ( boost::int32_t  val,
const std::string &  id 
)
inlineprotectedvirtual

Write value val to archive with identifier id.

Parameters
val[in] value to write.
id[in] identifier for the value.

Implements OutputArchive.

◆ doWrite() [7/26]

void doWrite ( boost::uint32_t  val,
const std::string &  id 
)
inlineprotectedvirtual

Write value val to archive with identifier id.

Parameters
val[in] value to write.
id[in] identifier for the value.

Implements OutputArchive.

◆ doWrite() [8/26]

void doWrite ( boost::int64_t  val,
const std::string &  id 
)
inlineprotectedvirtual

Write value val to archive with identifier id.

Parameters
val[in] value to write.
id[in] identifier for the value.

Implements OutputArchive.

◆ doWrite() [9/26]

void doWrite ( boost::uint64_t  val,
const std::string &  id 
)
inlineprotectedvirtual

Write value val to archive with identifier id.

Parameters
val[in] value to write.
id[in] identifier for the value.

Implements OutputArchive.

◆ doWrite() [10/26]

void doWrite ( float  val,
const std::string &  id 
)
inlineprotectedvirtual

Write value val to archive with identifier id.

Parameters
val[in] value to write.
id[in] identifier for the value.

Implements OutputArchive.

◆ doWrite() [11/26]

void doWrite ( double  val,
const std::string &  id 
)
inlineprotectedvirtual

Write value val to archive with identifier id.

Parameters
val[in] value to write.
id[in] identifier for the value.

Implements OutputArchive.

◆ doWrite() [12/26]

void doWrite ( const std::string &  val,
const std::string &  id 
)
inlineprotectedvirtual

Write value val to archive with identifier id.

Parameters
val[in] value to write.
id[in] identifier for the value.

Implements OutputArchive.

◆ doWrite() [13/26]

void doWrite ( const std::vector< bool > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Write vector val to archive with identifier id.

Parameters
val[in] vector to write.
id[in] identifier for the vector.

Implements OutputArchive.

◆ doWrite() [14/26]

void doWrite ( const std::vector< boost::int8_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Write vector val to archive with identifier id.

Parameters
val[in] vector to write.
id[in] identifier for the vector.

Implements OutputArchive.

◆ doWrite() [15/26]

void doWrite ( const std::vector< boost::uint8_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Write vector val to archive with identifier id.

Parameters
val[in] vector to write.
id[in] identifier for the vector.

Implements OutputArchive.

◆ doWrite() [16/26]

void doWrite ( const std::vector< boost::int16_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Write vector val to archive with identifier id.

Parameters
val[in] vector to write.
id[in] identifier for the vector.

Implements OutputArchive.

◆ doWrite() [17/26]

void doWrite ( const std::vector< boost::uint16_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Write vector val to archive with identifier id.

Parameters
val[in] vector to write.
id[in] identifier for the vector.

Implements OutputArchive.

◆ doWrite() [18/26]

void doWrite ( const std::vector< boost::int32_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Write vector val to archive with identifier id.

Parameters
val[in] vector to write.
id[in] identifier for the vector.

Implements OutputArchive.

◆ doWrite() [19/26]

void doWrite ( const std::vector< boost::uint32_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Write vector val to archive with identifier id.

Parameters
val[in] vector to write.
id[in] identifier for the vector.

Implements OutputArchive.

◆ doWrite() [20/26]

void doWrite ( const std::vector< boost::int64_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Write vector val to archive with identifier id.

Parameters
val[in] vector to write.
id[in] identifier for the vector.

Implements OutputArchive.

◆ doWrite() [21/26]

void doWrite ( const std::vector< boost::uint64_t > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Write vector val to archive with identifier id.

Parameters
val[in] vector to write.
id[in] identifier for the vector.

Implements OutputArchive.

◆ doWrite() [22/26]

void doWrite ( const std::vector< float > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Write vector val to archive with identifier id.

Parameters
val[in] vector to write.
id[in] identifier for the vector.

Implements OutputArchive.

◆ doWrite() [23/26]

void doWrite ( const std::vector< double > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Write vector val to archive with identifier id.

Parameters
val[in] vector to write.
id[in] identifier for the vector.

Implements OutputArchive.

◆ doWrite() [24/26]

void doWrite ( const std::vector< std::string > &  val,
const std::string &  id 
)
inlineprotectedvirtual

Write vector val to archive with identifier id.

Parameters
val[in] vector to write.
id[in] identifier for the vector.

Implements OutputArchive.

◆ doWrite() [25/26]

void doWrite ( const Eigen::MatrixXd &  val,
const std::string &  id 
)
inlineprotectedvirtual

Write an Eigen matrix to output.

Parameters
val[in] the matrix to output.
id[in] identifier for the matrix.

Implements OutputArchive.

◆ doWrite() [26/26]

void doWrite ( const Eigen::VectorXd &  val,
const std::string &  id 
)
inlineprotectedvirtual

Write an Eigen vector to output.

Parameters
val[in] the vector to output.
id[in] identifier for the matrix.

Implements OutputArchive.

◆ doWriteEnterScope()

void doWriteEnterScope ( const std::string &  id)
protectedvirtual

Enter a scope.

SCOPE

Parameters
id[in] identifier for the scope.

Implements OutputArchive.

◆ doWriteLeaveScope()

void doWriteLeaveScope ( const std::string &  id)
protectedvirtual

Leave a scope.

Parameters
id[in] identifier for the scope.

Implements OutputArchive.

◆ flush()

void flush ( )
virtual

flush the archive. Anything stored in buffers will be flushed to the actual media that has been openned.

Implements Archive.

◆ getLine()

bool getLine ( )
protected

Read one line from input.

Line length is maximum MAX_LINE_WIDTH.

Returns
true if success.

◆ getNameValue()

std::pair<std::string, std::string> getNameValue ( )
inlineprotected

Split a line in a name and a value.

Returns
a pair of strings. First is name, second is the value.

◆ isOpen()

bool isOpen ( )
inlinevirtual

test if this archive is openned for manipulation. If this is false then no storage will be performed.

Returns
true if Archive is ready for streaming

Implements Archive.

◆ readMatrix()

void readMatrix ( Eigen::PlainObjectBase< Derived > &  val,
const std::string &  id 
)
inlineprotected

Read a generic Eigen matrix.

Parameters
val[out] the result.
id[in] identifier for the matrix - gives a warning if it does not match the id in the file.

◆ readValue() [1/2]

void readValue ( std::vector< T > &  val,
const std::string &  id 
)
inlineprotected

Read vector val with identifier id from archive.

Parameters
val[out] the vector from archive.
id[in] the identifier.

◆ readValue() [2/2]

void readValue ( T &  val,
const std::string &  id 
)
inlineprotected

Read value val with identifier id from archive.

Parameters
val[out] the value from archive.
id[in] the identifier.

◆ writeMatrix()

void writeMatrix ( const Eigen::DenseCoeffsBase< Derived, Eigen::ReadOnlyAccessors > &  val,
const std::string &  id 
)
inlineprotected

Write a generic Eigen matrix to output.

Parameters
val[in] the matrix to output.
id[in] identifier for the matrix.

◆ writeValue() [1/2]

void writeValue ( const std::vector< T > &  val,
const std::string &  id 
)
inlineprotected

Write vector val to archive with identifier id.

Parameters
val[in] vector to write.
id[in] identifier for the vector.

◆ writeValue() [2/2]

void writeValue ( const T &  val,
const std::string &  id 
)
inlineprotected

Write value val to archive with identifier id.

Parameters
val[in] value to write.
id[in] identifier for the value.

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