Inviwo  0.9.10.1
Inviwo documentation
inviwo::SerializeBase Class Reference
+ Inheritance diagram for inviwo::SerializeBase:

Classes

struct  ReferenceData
 
class  ReferenceDataContainer
 

Public Types

using RefDataPair = std::pair< const void *, SerializeBase::ReferenceData >
 
using RefMap = std::multimap< const void *, ReferenceData >
 

Public Member Functions

 SerializeBase (bool allowReference=true)
 Base class for Serializer and Deserializer. More...
 
 SerializeBase (std::string fileName, bool allowReference=true)
 Base class for Serializer and Deserializer. More...
 
 SerializeBase (std::istream &stream, const std::string &path, bool allowReference=true)
 Base class for Serializer and Deserializer. More...
 
 SerializeBase (const SerializeBase &rhs)=delete
 
 SerializeBase (SerializeBase &&rhs)=default
 
SerializeBaseoperator= (const SerializeBase &)=delete
 
SerializeBaseoperator= (SerializeBase &&)=default
 
virtual const std::string & getFileName () const
 gets the xml file name.
 
bool isPrimitiveType (const std::type_info &type) const
 Checks whether the given type is a primitive type. More...
 

Static Public Member Functions

static std::string nodeToString (const TxElement &node)
 

Protected Attributes

std::string fileName_
 
TxDocument doc_
 
TxElement * rootElement_
 
bool allowRef_
 
bool retrieveChild_
 
ReferenceDataContainer refDataContainer_
 

Friends

class NodeSwitch
 

Constructor & Destructor Documentation

◆ SerializeBase() [1/3]

inviwo::SerializeBase::SerializeBase ( bool  allowReference = true)

Base class for Serializer and Deserializer.

This class consists of features that are common to both serializer and de-serializer. Some of them are reference data manager, (ticpp::Node) node switch and factory registration.

Parameters
allowReferencedisables or enables reference management schemes.

◆ SerializeBase() [2/3]

inviwo::SerializeBase::SerializeBase ( std::string  fileName,
bool  allowReference = true 
)

Base class for Serializer and Deserializer.

This class consists of features that are common to both serializer and de-serializer. Some of them are reference data manager, (ticpp::Node) node switch and factory registration.

Parameters
fileNamefull path to xml file (for reading or writing).
allowReferencedisables or enables reference management schemes.

◆ SerializeBase() [3/3]

inviwo::SerializeBase::SerializeBase ( std::istream &  stream,
const std::string &  path,
bool  allowReference = true 
)

Base class for Serializer and Deserializer.

This class consists of features that are common to both serializer and de-serializer. Some of them are reference data manager, (ticpp::Node) node switch and factory registration.

Parameters
streamcontaining all xml data (for reading).
pathA path that will be used to decode the location of data during deserialization.
allowReferencedisables or enables reference management schemes.

Member Function Documentation

◆ isPrimitiveType()

bool inviwo::SerializeBase::isPrimitiveType ( const std::type_info &  type) const

Checks whether the given type is a primitive type.

return true if type is one of following type: bool, char, signed int, unsigned int, float, double, long double, std::string

Parameters
typecan be one of bool, char, signed int, unsigned int, float, double, long double, std::string
Returns
true or false

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