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

Public Types

using allocator_type = std::pmr::polymorphic_allocator<std::byte>
 

Public Member Functions

 SerializeBase (const std::filesystem::path &fileName, allocator_type alloc={})
 Base class for Serializer and Deserializer.
 
 SerializeBase (const SerializeBase &rhs)=delete
 
 SerializeBase (SerializeBase &&rhs) noexcept
 
SerializeBaseoperator= (const SerializeBase &)=delete
 
SerializeBaseoperator= (SerializeBase &&) noexcept
 
const std::filesystem::path & getFileName () const
 Gets the workspace file name.
 
const std::filesystem::path & getFileDir () const
 Gets the workspace file directory.
 
allocator_type getAllocator () const
 

Static Public Member Functions

template<typename U >
static constexpr bool isPrimitiveType ()
 Checks whether the given type is a primitive type.
 

Protected Attributes

std::filesystem::path fileName_
 
std::filesystem::path fileDir_
 
std::unique_ptr< TiXmlDocument > doc_
 
TiXmlElement * rootElement_
 
bool retrieveChild_
 

Friends

class NodeSwitch
 

Constructor & Destructor Documentation

◆ SerializeBase()

inviwo::SerializeBase::SerializeBase ( const std::filesystem::path & fileName,
allocator_type alloc = {} )
explicit

Base class for Serializer and Deserializer.

This class consists of features that are common to both serializer and de-serializer.

Parameters
fileNamefull path to xml file (for reading or writing).

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: