Index: ext/libicpf/src/cfg_xml.cpp =================================================================== diff -u -N -r6dae57f5e7aeeb965bc018024d8360069f6e15c1 -rea1d52b4f82729e45b3b6683df8341edcd9f7348 --- ext/libicpf/src/cfg_xml.cpp (.../cfg_xml.cpp) (revision 6dae57f5e7aeeb965bc018024d8360069f6e15c1) +++ ext/libicpf/src/cfg_xml.cpp (.../cfg_xml.cpp) (revision ea1d52b4f82729e45b3b6683df8341edcd9f7348) @@ -1,70 +1,70 @@ -#include "cfg_xml.h" -#include -#include "exception.h" -#include -#include -#include - -BEGIN_ICPF_NAMESPACE - -/// Buffer size for reading xml data from a file -#define XML_BUFFER 65536 - -/// Definition of a standard string depending on the unicode support -#ifdef _UNICODE - #define tstring std::wstring -#else - #define tstring std::string -#endif - -// forward declaration -class xml_node; - -/// Xml node storage -typedef std::map xml_storage; -/// String storage (key(s)=>value(s)) -typedef std::multimap attr_storage; - -/** Class manages a single xml node. - */ -class xml_node -{ -public: -/** \name Construction/destruction */ -/**@{*/ - /// Standard constructor - xml_node() : m_mNodes(), m_mAttr(), m_pParentNode(NULL) { }; - /// Constructor defining the parent node - xml_node(xml_node* pParentNode) : m_mNodes(), m_mAttr(), m_pParentNode(pParentNode) { }; -/**@}*/ - -public: - xml_storage m_mNodes; ///< Additional nodes inside of this one - attr_storage m_mAttr; ///< String pairs belonging to this node - xml_node* m_pParentNode; ///< Parent node -}; - -/** State structure - used by expat notifications. - */ -struct XMLSTATE -{ - xml_cfg* pCfg; - xml_node* pNode; -}; +#include "cfg_xml.h" +#include +#include "exception.h" +#include +#include +#include +BEGIN_ICPF_NAMESPACE + +/// Buffer size for reading xml data from a file +#define XML_BUFFER 65536 + +/// Definition of a standard string depending on the unicode support +#ifdef _UNICODE + #define tstring std::wstring +#else + #define tstring std::string +#endif + +// forward declaration +class xml_node; + +/// Xml node storage +typedef std::map xml_storage; +/// String storage (key(s)=>value(s)) +typedef std::multimap attr_storage; + +/** Class manages a single xml node. + */ +class xml_node +{ +public: +/** \name Construction/destruction */ +/**@{*/ + /// Standard constructor + xml_node() : m_mNodes(), m_mAttr(), m_pParentNode(NULL) { }; + /// Constructor defining the parent node + xml_node(xml_node* pParentNode) : m_mNodes(), m_mAttr(), m_pParentNode(pParentNode) { }; +/**@}*/ + +public: + xml_storage m_mNodes; ///< Additional nodes inside of this one + attr_storage m_mAttr; ///< String pairs belonging to this node + xml_node* m_pParentNode; ///< Parent node +}; + +/** State structure - used by expat notifications. + */ +struct XMLSTATE +{ + xml_cfg* pCfg; + xml_node* pNode; +}; + /** Xml find handle structure - used for searching. */ struct XMLFINDHANDLE { attr_storage::iterator it; ///< Iterator of currently retrieved string attr_storage::iterator itEnd; ///< Iterator of a last string matching the criteria }; - -/// Macro for faster access to the xml storage -#define m_pStorage ((xml_storage*)m_hStorage) - -/** Constructs the xml_cfg object. - */ + +/// Macro for faster access to the xml storage +#define m_pStorage ((xml_storage*)m_hStorage) + +/** Constructs the xml_cfg object. + */ xml_cfg::xml_cfg() : m_hStorage((ptr_t)new xml_storage) { @@ -362,4 +362,4 @@ } } -END_ICPF_NAMESPACE +END_ICPF_NAMESPACE