Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::xml::XmlUtil Class Referencefinal

XML Serialization Utility Class. More...

#include <XmlUtil.h>

Inheritance diagram for sese::xml::XmlUtil:
sese::NotInstantiable

Public Types

using InputStream = io::InputStream
 
using OutputStream = io::OutputStream
 
using Tokens = std::queue<std::string>
 

Public Member Functions

 XmlUtil ()=delete
 
- Public Member Functions inherited from sese::NotInstantiable
 NotInstantiable ()=delete
 
virtual ~NotInstantiable ()=default
 
 NotInstantiable (const NotInstantiable &)=delete
 
NotInstantiableoperator= (const NotInstantiable &)=delete
 

Static Public Member Functions

static Element::Ptr deserialize (const InputStream::Ptr &input_stream, size_t level) noexcept
 
static Element::Ptr deserialize (InputStream *input_stream, size_t level) noexcept
 
static void serialize (const Element::Ptr &object, const OutputStream::Ptr &output_stream) noexcept
 
static void serialize (const Element::Ptr &object, OutputStream *output_stream) noexcept
 

Static Private Member Functions

static void tokenizer (InputStream *input_stream, Tokens &tokens) noexcept
 
static bool removeComment (Tokens &tokens) noexcept
 
static Element::Ptr createElement (Tokens &tokens, size_t level, bool is_sub_element) noexcept
 

Detailed Description

XML Serialization Utility Class.

Member Typedef Documentation

◆ InputStream

◆ OutputStream

◆ Tokens

using sese::xml::XmlUtil::Tokens = std::queue<std::string>

Constructor & Destructor Documentation

◆ XmlUtil()

sese::xml::XmlUtil::XmlUtil ( )
delete

Member Function Documentation

◆ createElement()

Element::Ptr sese::xml::XmlUtil::createElement ( Tokens & tokens,
size_t level,
bool is_sub_element )
staticprivatenoexcept

◆ deserialize() [1/2]

Element::Ptr sese::xml::XmlUtil::deserialize ( const InputStream::Ptr & input_stream,
size_t level )
staticnoexcept

Deserialize an XML element object from a stream

Parameters
input_streamInput stream
levelDeserialization depth
Return values
nullptrDeserialization failed, otherwise succeeded

◆ deserialize() [2/2]

Element::Ptr sese::xml::XmlUtil::deserialize ( InputStream * input_stream,
size_t level )
staticnoexcept

Deserialize an XML element object from a stream

Parameters
input_streamInput stream
levelDeserialization depth
Return values
nullptrDeserialization failed, otherwise succeeded

◆ removeComment()

bool sese::xml::XmlUtil::removeComment ( Tokens & tokens)
staticprivatenoexcept

◆ serialize() [1/2]

void sese::xml::XmlUtil::serialize ( const Element::Ptr & object,
const OutputStream::Ptr & output_stream )
staticnoexcept

Serialize an XML element object to a stream

Parameters
objectObject to be serialized
output_streamOutput stream

◆ serialize() [2/2]

void sese::xml::XmlUtil::serialize ( const Element::Ptr & object,
OutputStream * output_stream )
staticnoexcept

Serialize an XML element object to a stream

Parameters
objectObject to be serialized
output_streamOutput stream

◆ tokenizer()


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