![]()  | 
  
    RobWorkProject
    23.9.11-
    
   | 
 
serializable objects can be written to an output archive. More...
#include <OutputArchive.hpp>
Inherits Archive.
Inherited by BINArchive [virtual], and INIArchive [virtual].
Public Member Functions | |
| 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 > | |
| OutputArchive & | operator<< (T &dst) | 
| Output stream operator.  | |
  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  | |
| virtual bool | isOpen ()=0 | 
| test if this archive is openned for manipulation. If this is false then no storage will be performed.  More... | |
| virtual void | close ()=0 | 
| close the archive.  | |
| virtual void | flush ()=0 | 
| flush the archive. Anything stored in buffers will be flushed to the actual media that has been openned.  | |
Protected Member Functions | |
| virtual void | doWrite (bool val, const std::string &id)=0 | 
| Write value val to archive with identifier id.  More... | |
| virtual void | doWrite (int8_t val, const std::string &id)=0 | 
| Write value val to archive with identifier id.  More... | |
| virtual void | doWrite (uint8_t val, const std::string &id)=0 | 
| Write value val to archive with identifier id.  More... | |
| virtual void | doWrite (int16_t val, const std::string &id)=0 | 
| Write value val to archive with identifier id.  More... | |
| virtual void | doWrite (uint16_t val, const std::string &id)=0 | 
| Write value val to archive with identifier id.  More... | |
| virtual void | doWrite (int32_t val, const std::string &id)=0 | 
| Write value val to archive with identifier id.  More... | |
| virtual void | doWrite (uint32_t val, const std::string &id)=0 | 
| Write value val to archive with identifier id.  More... | |
| virtual void | doWrite (int64_t val, const std::string &id)=0 | 
| Write value val to archive with identifier id.  More... | |
| virtual void | doWrite (uint64_t val, const std::string &id)=0 | 
| Write value val to archive with identifier id.  More... | |
| virtual void | doWrite (float val, const std::string &id)=0 | 
| Write value val to archive with identifier id.  More... | |
| virtual void | doWrite (double val, const std::string &id)=0 | 
| Write value val to archive with identifier id.  More... | |
| virtual void | doWrite (const std::string &val, const std::string &id)=0 | 
| Write value val to archive with identifier id.  More... | |
| virtual void | doWrite (const std::vector< bool > &val, const std::string &id)=0 | 
| Write vector val to archive with identifier id.  More... | |
| virtual void | doWrite (const std::vector< int8_t > &val, const std::string &id)=0 | 
| Write vector val to archive with identifier id.  More... | |
| virtual void | doWrite (const std::vector< uint8_t > &val, const std::string &id)=0 | 
| Write vector val to archive with identifier id.  More... | |
| virtual void | doWrite (const std::vector< int16_t > &val, const std::string &id)=0 | 
| Write vector val to archive with identifier id.  More... | |
| virtual void | doWrite (const std::vector< uint16_t > &val, const std::string &id)=0 | 
| Write vector val to archive with identifier id.  More... | |
| virtual void | doWrite (const std::vector< int32_t > &val, const std::string &id)=0 | 
| Write vector val to archive with identifier id.  More... | |
| virtual void | doWrite (const std::vector< uint32_t > &val, const std::string &id)=0 | 
| Write vector val to archive with identifier id.  More... | |
| virtual void | doWrite (const std::vector< int64_t > &val, const std::string &id)=0 | 
| Write vector val to archive with identifier id.  More... | |
| virtual void | doWrite (const std::vector< uint64_t > &val, const std::string &id)=0 | 
| Write vector val to archive with identifier id.  More... | |
| virtual void | doWrite (const std::vector< float > &val, const std::string &id)=0 | 
| Write vector val to archive with identifier id.  More... | |
| virtual void | doWrite (const std::vector< double > &val, const std::string &id)=0 | 
| Write vector val to archive with identifier id.  More... | |
| virtual void | doWrite (const std::vector< std::string > &val, const std::string &id)=0 | 
| Write vector val to archive with identifier id.  More... | |
| virtual void | doWrite (const Eigen::MatrixXd &val, const std::string &id)=0 | 
| Write an Eigen matrix to output.  More... | |
| virtual void | doWrite (const Eigen::VectorXd &val, const std::string &id)=0 | 
| Write an Eigen vector to output.  More... | |
| 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... | |
| virtual void | doWriteEnterScope (const std::string &id)=0 | 
| Enter a scope.  More... | |
| virtual void | doWriteLeaveScope (const std::string &id)=0 | 
| Leave a scope.  More... | |
  Protected Member Functions inherited from Archive | |
| virtual void | doOpenArchive (const std::string &filename)=0 | 
| open file for reading and writing  More... | |
| virtual void | doOpenArchive (std::iostream &stream)=0 | 
| initialize archive for reading and/or writing to a stream  More... | |
| virtual void | doOpenInput (std::istream &ifs)=0 | 
| open an inputstream for reading  More... | |
| virtual void | doOpenOutput (std::ostream &ofs)=0 | 
| open an output stream for writing  More... | |
serializable objects can be written to an output archive.
This class define an interface for serializing data.
      
  | 
  protectedpure virtual | 
Write value val to archive with identifier id.
| val | [in] value to write. | 
| id | [in] identifier for the value. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write an Eigen matrix to output.
| val | [in] the matrix to output. | 
| id | [in] identifier for the matrix. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write an Eigen vector to output.
| val | [in] the vector to output. | 
| id | [in] identifier for the matrix. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write value val to archive with identifier id.
| val | [in] value to write. | 
| id | [in] identifier for the value. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write vector val to archive with identifier id.
| val | [in] vector to write. | 
| id | [in] identifier for the vector. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write vector val to archive with identifier id.
| val | [in] vector to write. | 
| id | [in] identifier for the vector. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write vector val to archive with identifier id.
| val | [in] vector to write. | 
| id | [in] identifier for the vector. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write vector val to archive with identifier id.
| val | [in] vector to write. | 
| id | [in] identifier for the vector. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write vector val to archive with identifier id.
| val | [in] vector to write. | 
| id | [in] identifier for the vector. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write vector val to archive with identifier id.
| val | [in] vector to write. | 
| id | [in] identifier for the vector. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write vector val to archive with identifier id.
| val | [in] vector to write. | 
| id | [in] identifier for the vector. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write vector val to archive with identifier id.
| val | [in] vector to write. | 
| id | [in] identifier for the vector. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write vector val to archive with identifier id.
| val | [in] vector to write. | 
| id | [in] identifier for the vector. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write vector val to archive with identifier id.
| val | [in] vector to write. | 
| id | [in] identifier for the vector. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write vector val to archive with identifier id.
| val | [in] vector to write. | 
| id | [in] identifier for the vector. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write vector val to archive with identifier id.
| val | [in] vector to write. | 
| id | [in] identifier for the vector. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  inlineprotected | 
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)
| object | [in] object to be serialized | 
| id | [in] potential id associated to the object | 
      
  | 
  protectedpure virtual | 
Write value val to archive with identifier id.
| val | [in] value to write. | 
| id | [in] identifier for the value. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write value val to archive with identifier id.
| val | [in] value to write. | 
| id | [in] identifier for the value. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write value val to archive with identifier id.
| val | [in] value to write. | 
| id | [in] identifier for the value. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write value val to archive with identifier id.
| val | [in] value to write. | 
| id | [in] identifier for the value. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write value val to archive with identifier id.
| val | [in] value to write. | 
| id | [in] identifier for the value. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write value val to archive with identifier id.
| val | [in] value to write. | 
| id | [in] identifier for the value. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write value val to archive with identifier id.
| val | [in] value to write. | 
| id | [in] identifier for the value. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write value val to archive with identifier id.
| val | [in] value to write. | 
| id | [in] identifier for the value. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write value val to archive with identifier id.
| val | [in] value to write. | 
| id | [in] identifier for the value. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Write value val to archive with identifier id.
| val | [in] value to write. | 
| id | [in] identifier for the value. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Enter a scope.
| id | [in] identifier for the scope. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  protectedpure virtual | 
Leave a scope.
| id | [in] identifier for the scope. | 
Implemented in INIArchive, and BINArchive.
      
  | 
  inline | 
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.
| object | |
| id | 
      
  | 
  inline | 
Same as write(object,id) however an additional parameter is given which is the default identifier to use in case id is empty.
| object | [in] object to serialize | 
| id | [in] identifier | 
| id_default | [in] default id | 
      
  | 
  inline | 
create a serialized scope in which objects can be written
| id | [in] id of the scope | 
| idDefault | [in] (optional) default id to use if id is an empty string. | 
      
  | 
  inline | 
leave the current scope
| id | [in] id of the scope | 
| idDefault | [in] (optional) default id to use if id is an empty string. |