ECSTASY
All in the name
Loading...
Searching...
No Matches
util::serialization::INodeFactory Class Referenceabstract

Node factory to hide underlying format. More...

#include <INodeFactory.hpp>

Inheritance diagram for util::serialization::INodeFactory:

Public Member Functions

virtual ~INodeFactory ()=default
 Default destructor.
 
virtual NodePtr create (INode::Type type)=0
 Construct an empty node from its type.
 
virtual NodePtr create (const INode &node)=0
 Construct a copy of an existing node.
 
virtual NodePtr createObject (const IObjectNode &object)=0
 Construct a INode::Type::Object node.
 
virtual NodePtr createArray (const IArrayNode &array)=0
 Construct a INode::Type::Array node.
 
virtual NodePtr create (std::string_view string)=0
 Construct a INode::Type::String node.
 
virtual NodePtr create (int64_t integer)=0
 Construct a INode::Type::Integer node.
 
virtual NodePtr create (double floatingPoint)=0
 Construct a INode::Type::Float node.
 
virtual NodePtr create (bool boolean)=0
 Construct a INode::Type::Boolean node.
 
virtual NodePtr create (INode::Date date)=0
 Construct a INode::Type::Date node.
 
virtual NodePtr create (INode::Time time)=0
 Construct a INode::Type::Time node.
 
virtual NodePtr create (INode::DateTime dateTime)=0
 Construct a INode::Type::DateTime node.
 

Detailed Description

Node factory to hide underlying format.

Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-12-12)

Definition at line 25 of file INodeFactory.hpp.

Constructor & Destructor Documentation

◆ ~INodeFactory()

virtual util::serialization::INodeFactory::~INodeFactory ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ create() [1/9]

virtual NodePtr util::serialization::INodeFactory::create ( bool  boolean)
pure virtual

Construct a INode::Type::Boolean node.

Parameters
[in]booleannode data.
Returns
NodePtr New node instance, or nullptr if the type/copy is not supported.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-12-12)

Implemented in util::serialization::TomlNodeFactory.

◆ create() [2/9]

virtual NodePtr util::serialization::INodeFactory::create ( const INode node)
pure virtual

Construct a copy of an existing node.

Parameters
[in]nodeNode to copy.
Returns
NodePtr New node instance, or nullptr if the type/copy is not supported.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-12-12)

Implemented in util::serialization::TomlNodeFactory.

◆ create() [3/9]

virtual NodePtr util::serialization::INodeFactory::create ( double  floatingPoint)
pure virtual

Construct a INode::Type::Float node.

Parameters
[in]floatingPointnode data.
Returns
NodePtr New node instance, or nullptr if the type/copy is not supported.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-12-12)

Implemented in util::serialization::TomlNodeFactory.

◆ create() [4/9]

virtual NodePtr util::serialization::INodeFactory::create ( INode::Date  date)
pure virtual

Construct a INode::Type::Date node.

Parameters
[in]datenode data.
Returns
NodePtr New node instance, or nullptr if the type/copy is not supported.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-12-12)

Implemented in util::serialization::TomlNodeFactory.

◆ create() [5/9]

virtual NodePtr util::serialization::INodeFactory::create ( INode::DateTime  dateTime)
pure virtual

Construct a INode::Type::DateTime node.

Parameters
[in]dateTimenode data.
Returns
NodePtr New node instance, or nullptr if the type/copy is not supported.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-12-12)

Implemented in util::serialization::TomlNodeFactory.

◆ create() [6/9]

virtual NodePtr util::serialization::INodeFactory::create ( INode::Time  time)
pure virtual

Construct a INode::Type::Time node.

Parameters
[in]timenode data.
Returns
NodePtr New node instance, or nullptr if the type/copy is not supported.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-12-12)

Implemented in util::serialization::TomlNodeFactory.

◆ create() [7/9]

virtual NodePtr util::serialization::INodeFactory::create ( INode::Type  type)
pure virtual

Construct an empty node from its type.

Note
INode::Object and INode::Array will return IObjectNode and IArrayNode pointers respectively.
Parameters
[in]typeNode type.
Returns
NodePtr New node instance, or nullptr if the type is not supported.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-12-12)

Implemented in util::serialization::TomlNodeFactory.

◆ create() [8/9]

virtual NodePtr util::serialization::INodeFactory::create ( int64_t  integer)
pure virtual

Construct a INode::Type::Integer node.

Parameters
[in]integernode data.
Returns
NodePtr New node instance, or nullptr if the type/copy is not supported.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-12-12)

Implemented in util::serialization::TomlNodeFactory.

◆ create() [9/9]

virtual NodePtr util::serialization::INodeFactory::create ( std::string_view  string)
pure virtual

Construct a INode::Type::String node.

Parameters
[in]stringnode data.
Returns
NodePtr New node instance, or nullptr if the type/copy is not supported.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-12-12)

Implemented in util::serialization::TomlNodeFactory.

◆ createArray()

virtual NodePtr util::serialization::INodeFactory::createArray ( const IArrayNode array)
pure virtual

Construct a INode::Type::Array node.

Parameters
[in]arraynode data.
Returns
NodePtr New node instance, or nullptr if the type/copy is not supported.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-12-12)

Implemented in util::serialization::TomlNodeFactory.

◆ createObject()

virtual NodePtr util::serialization::INodeFactory::createObject ( const IObjectNode object)
pure virtual

Construct a INode::Type::Object node.

Parameters
[in]objectnode data.
Returns
NodePtr New node instance, or nullptr if the type/copy is not supported.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-12-12)

Implemented in util::serialization::TomlNodeFactory.


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