7#ifndef LOGICALACCESS_XMLSERIALIZABLE_HPP
8#define LOGICALACCESS_XMLSERIALIZABLE_HPP
13#pragma warning(disable : 4005)
17#pragma warning(default : 4005)
44#include <logicalaccess/lla_core_api.hpp>
46#include <boost/property_tree/ptree_fwd.hpp>
61 virtual std::string serialize();
67 virtual std::string serializeWithHeaders();
73 virtual void serialize(boost::property_tree::ptree &parentNode) = 0;
81 virtual void serializeToFile(
const std::string &filename);
87 virtual void unSerialize(boost::property_tree::ptree &node) = 0;
96 virtual void unSerialize(
const std::string &xmlstring,
const std::string &rootNode);
104 virtual void unSerialize(std::istream &is,
const std::string &rootNode);
112 virtual void unSerialize(boost::property_tree::ptree &node,
113 const std::string &rootNode);
121 virtual void unSerializeFromFile(
const std::string &filename);
135 static std::string removeXmlDeclaration(
const std::string &xmlstring);
142 static ByteVector formatHexString(std::string hexstr);
145 static unsigned long long atoull(
const std::string &str);
A Xml Serializable base class. Add Xml serialization to a class.
Definition: xmlserializable.hpp:54
virtual void serialize(boost::property_tree::ptree &parentNode)=0
Serialize object to Xml Node.
virtual ~XmlSerializable()=default
virtual std::string getDefaultXmlNodeName() const =0
Get the default Xml Node name for this object.
virtual void unSerialize(boost::property_tree::ptree &node)=0
UnSerialize object from a Xml Node.
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80