Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::SerializeBase Class Reference
+ Inheritance diagram for inviwo::SerializeBase:

Public Member Functions

 SerializeBase ()
 Base class for Serializer and Deserializer.
 
 SerializeBase (const std::filesystem::path &fileName)
 Base class for Serializer and Deserializer.
 
 SerializeBase (std::istream &stream, const std::filesystem::path &path)
 Base class for Serializer and Deserializer.
 
 SerializeBase (const SerializeBase &rhs)=delete
 
 SerializeBase (SerializeBase &&rhs) noexcept
 
SerializeBaseoperator= (const SerializeBase &)=delete
 
SerializeBaseoperator= (SerializeBase &&) noexcept
 
virtual const std::filesystem::path & getFileName () const
 gets the xml file name.
 

Static Public Member Functions

template<typename U >
static constexpr bool isPrimitiveType ()
 Checks whether the given type is a primitive type.
 
static std::string nodeToString (const TxElement &node)
 

Protected Attributes

std::filesystem::path fileName_
 
std::unique_ptr< TxDocument > doc_
 
TxElement * rootElement_
 
bool retrieveChild_
 

Friends

class NodeSwitch
 

Constructor & Destructor Documentation

◆ SerializeBase() [1/3]

inviwo::SerializeBase::SerializeBase ( )

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.

◆ SerializeBase() [2/3]

inviwo::SerializeBase::SerializeBase ( const std::filesystem::path & fileName)

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).

◆ SerializeBase() [3/3]

inviwo::SerializeBase::SerializeBase ( std::istream & stream,
const std::filesystem::path & path )

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.

Member Function Documentation

◆ isPrimitiveType()

template<typename U >
static constexpr bool inviwo::SerializeBase::isPrimitiveType ( )
inlinestaticconstexpr

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

Template Parameters
Uthe type to test std::string
Returns
true or false

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