ADUL
Collection of reusable C++ utilities
Loading...
Searching...
No Matches
adul::atm::XMLMap< keyT, valueT > Class Template Reference

this class is wrapper for STL container std::unordered_map More...

#include <XMLMap.hpp>

Public Member Functions

void saveMapToXMLElement (adul::xml::XMLElement *const pElement, adul::xml::XMLDocument *const xmlDoc) const
 
void loadMapFromXMLElement (const adul::xml::XMLElement *const pElement)
 
void saveMapToXMLFile (const char *dir)
 
void loadMapFromXMLFile (const char *dir)
 

Public Attributes

std::unordered_map< keyT, valueT > map
 

Detailed Description

template<typename keyT, typename valueT>
class adul::atm::XMLMap< keyT, valueT >

this class is wrapper for STL container std::unordered_map

this class is wrapper for std::unordered_map and provides some functions to save and read data from XML files and XML elements
these functions use tinyxml2 library api and are supposed to be used along with it
all the map elements are placed in the XML element each with name "mapElement" and key and value of map element are stored as attributes of this XML element if these functions fail they throw exceptions of adul::exceptions module

Member Function Documentation

◆ loadMapFromXMLElement()

template<typename keyT , typename valueT >
void adul::atm::XMLMap< keyT, valueT >::loadMapFromXMLElement ( const adul::xml::XMLElement *const pElement)
inline

◆ loadMapFromXMLFile()

template<typename keyT , typename valueT >
void adul::atm::XMLMap< keyT, valueT >::loadMapFromXMLFile ( const char * dir)
inline

◆ saveMapToXMLElement()

template<typename keyT , typename valueT >
void adul::atm::XMLMap< keyT, valueT >::saveMapToXMLElement ( adul::xml::XMLElement *const pElement,
adul::xml::XMLDocument *const xmlDoc ) const
inline

◆ saveMapToXMLFile()

template<typename keyT , typename valueT >
void adul::atm::XMLMap< keyT, valueT >::saveMapToXMLFile ( const char * dir)
inline

Member Data Documentation

◆ map

template<typename keyT , typename valueT >
std::unordered_map<keyT, valueT> adul::atm::XMLMap< keyT, valueT >::map

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