IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ipsdk::XmlOArchive Class Reference

Class for output part of xml serialisation. More...

#include <XmlOArchive.h>

Inheritance diagram for ipsdk::XmlOArchive:
ipsdk::BaseOArchive ipsdk::BaseArchive

Public Member Functions

std::ostream & getStream () const
 get underlying serialization stream
 
virtual void write (const SerializationOItem< BaseSerializationObject > &item)
 write an object derived of base class More...
 
virtual void write (const SerializationOItem< SerializationObjectConstPtr > &item)
 write a shared object derived of base class More...
 
void write (const void *ptr, ipUInt_t size)
 write raw data to archive More...
 
Constructors and destructors
 XmlOArchive (std::ostream &stream)
 
 ~XmlOArchive ()
 
void archiveHeader ()
 methods allowing to read/write header and footer for an archive More...
 
void archiveFooter ()
 methods allowing to read/write header and footer for an archive More...
 
void writeBaseType (const SerializationOItem< ipBool > &item)
 write basic type to stream More...
 
void writeBaseType (const SerializationOItem< ipInt8 > &item)
 write basic type to stream More...
 
void writeBaseType (const SerializationOItem< ipUInt8 > &item)
 write basic type to stream More...
 
void writeBaseType (const SerializationOItem< ipInt16 > &item)
 write basic type to stream More...
 
void writeBaseType (const SerializationOItem< ipUInt16 > &item)
 write basic type to stream More...
 
void writeBaseType (const SerializationOItem< ipInt32 > &item)
 write basic type to stream More...
 
void writeBaseType (const SerializationOItem< ipUInt32 > &item)
 write basic type to stream More...
 
void writeBaseType (const SerializationOItem< ipInt64 > &item)
 write basic type to stream More...
 
void writeBaseType (const SerializationOItem< ipUInt64 > &item)
 write basic type to stream More...
 
void writeBaseType (const SerializationOItem< ipReal32 > &item)
 write basic type to stream More...
 
void writeBaseType (const SerializationOItem< ipReal64 > &item)
 write basic type to stream More...
 
void writeBaseType (const SerializationOItem< std::string > &item)
 write basic type to stream More...
 
- Public Member Functions inherited from ipsdk::BaseOArchive
 BaseOArchive (bool bIsTextArchive)
 
virtual ~BaseOArchive ()
 
- Public Member Functions inherited from ipsdk::BaseArchive
bool isTextArchive () const
 method allowing to test whether archive is an human readable text archive
 
bool isClassVersionRegistred (const std::string &className) const
 check whether a class version has already been registred
 
void registerClassVersion (const std::string &className, ipUInt32 version)
 register a class version More...
 
ipUInt32 getRegisterClassVersion (const std::string &className) const
 get registered class version More...
 
virtual Guid getSocketGuid () const
 retrieve socket guid associated to archive remote computer
 
 BaseArchive (bool bIsTextArchive)
 
virtual ~BaseArchive ()
 

Protected Member Functions

template<typename T >
void writeBaseData (const SerializationOItem< T > &item)
 template method for writting base type data More...
 
void startSubSection (const std::string &subSectionName)
 start/end a new sub section for archive
 
void endSubSection (const std::string &subSectionName)
 start/end a new sub section for archive
 

Protected Attributes

std::string _strTabInc
 current tab increment for archive
 
std::ostream & _stream
 underlying serialization stream
 
- Protected Attributes inherited from ipsdk::BaseOArchive
ClassIdMap _classIdMap
 class to id map for class serialization
 
SharedPtrMap _sharedPtrMap
 map for shared serializable objects allowing reference counting update
 
- Protected Attributes inherited from ipsdk::BaseArchive
ClassVersionMap _classVersionMap
 map for class name / class version association
 
bool _bIsTextArchive
 flag indicating whether archive is an human readable text archive
 

Additional Inherited Members

- Protected Types inherited from ipsdk::BaseOArchive
typedef std::map< std::string, ipUInt32ClassIdMap
 map asociating a class name with an id
 
typedef std::map< const BaseSerializationObject *, ipUInt32SharedPtrMap
 map for shared serializable objects
 
- Protected Types inherited from ipsdk::BaseArchive
typedef std::map< std::string, ipUInt32ClassVersionMap
 map associating a class name to its id
 

Detailed Description

Class for output part of xml serialisation.

Author
E. Noirfalise
Date
2013/2/15

Member Function Documentation

◆ archiveHeader()

void ipsdk::XmlOArchive::archiveHeader ( )
virtual

methods allowing to read/write header and footer for an archive

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Reimplemented from ipsdk::BaseArchive.

◆ archiveFooter()

void ipsdk::XmlOArchive::archiveFooter ( )
virtual

methods allowing to read/write header and footer for an archive

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Reimplemented from ipsdk::BaseArchive.

◆ write() [1/3]

virtual void ipsdk::XmlOArchive::write ( const SerializationOItem< BaseSerializationObject > &  item)
virtual

write an object derived of base class

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Reimplemented from ipsdk::BaseOArchive.

◆ write() [2/3]

virtual void ipsdk::XmlOArchive::write ( const SerializationOItem< SerializationObjectConstPtr > &  item)
virtual

write a shared object derived of base class

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Reimplemented from ipsdk::BaseOArchive.

◆ writeBaseType() [1/12]

void ipsdk::XmlOArchive::writeBaseType ( const SerializationOItem< ipBool > &  item)
virtual

write basic type to stream

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Implements ipsdk::BaseOArchive.

◆ writeBaseType() [2/12]

void ipsdk::XmlOArchive::writeBaseType ( const SerializationOItem< ipInt8 > &  item)
virtual

write basic type to stream

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Implements ipsdk::BaseOArchive.

◆ writeBaseType() [3/12]

void ipsdk::XmlOArchive::writeBaseType ( const SerializationOItem< ipUInt8 > &  item)
virtual

write basic type to stream

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Implements ipsdk::BaseOArchive.

◆ writeBaseType() [4/12]

void ipsdk::XmlOArchive::writeBaseType ( const SerializationOItem< ipInt16 > &  item)
virtual

write basic type to stream

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Implements ipsdk::BaseOArchive.

◆ writeBaseType() [5/12]

void ipsdk::XmlOArchive::writeBaseType ( const SerializationOItem< ipUInt16 > &  item)
virtual

write basic type to stream

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Implements ipsdk::BaseOArchive.

◆ writeBaseType() [6/12]

void ipsdk::XmlOArchive::writeBaseType ( const SerializationOItem< ipInt32 > &  item)
virtual

write basic type to stream

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Implements ipsdk::BaseOArchive.

◆ writeBaseType() [7/12]

void ipsdk::XmlOArchive::writeBaseType ( const SerializationOItem< ipUInt32 > &  item)
virtual

write basic type to stream

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Implements ipsdk::BaseOArchive.

◆ writeBaseType() [8/12]

void ipsdk::XmlOArchive::writeBaseType ( const SerializationOItem< ipInt64 > &  item)
virtual

write basic type to stream

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Implements ipsdk::BaseOArchive.

◆ writeBaseType() [9/12]

void ipsdk::XmlOArchive::writeBaseType ( const SerializationOItem< ipUInt64 > &  item)
virtual

write basic type to stream

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Implements ipsdk::BaseOArchive.

◆ writeBaseType() [10/12]

void ipsdk::XmlOArchive::writeBaseType ( const SerializationOItem< ipReal32 > &  item)
virtual

write basic type to stream

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Implements ipsdk::BaseOArchive.

◆ writeBaseType() [11/12]

void ipsdk::XmlOArchive::writeBaseType ( const SerializationOItem< ipReal64 > &  item)
virtual

write basic type to stream

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Implements ipsdk::BaseOArchive.

◆ writeBaseType() [12/12]

void ipsdk::XmlOArchive::writeBaseType ( const SerializationOItem< std::string > &  item)
virtual

write basic type to stream

Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Implements ipsdk::BaseOArchive.

◆ write() [3/3]

void ipsdk::XmlOArchive::write ( const void *  ptr,
ipUInt_t  size 
)
virtual

write raw data to archive

Parameters
sizebuffer size expressed in octets
ptrbuffer used to read written data
Exceptions
ipsdk::IPSDKSerializationExceptionif an error is detected while writing data

Implements ipsdk::BaseOArchive.

◆ writeBaseData()

template<typename T >
void ipsdk::XmlOArchive::writeBaseData ( const SerializationOItem< T > &  item)
protected

template method for writting base type data

Exceptions
ipsdk::IPSDKSerializationExceptionif write error on stream

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