#ifndef _CXMLOADER_HPP_ #define _CXMLOADER_HPP_ /*** TinyXML Header File ***/ #include "tinyxml2.h" /*** DLL Header File ***/ #include "dllExport.h" /*** Custom Header Files ***/ #include "GUIUtility.hpp" #include "../cWindow.hpp" #include "../cLayout.hpp" #include "../cLabel.hpp" #include "../../UtilityEngine/cString.hpp" using UtilityEngine::cString; namespace GUIHelpers { class EXPORT_FROM_MYDLL cXMLoader { private: cXMLoader(); ~cXMLoader(); public: ///Functions static cXMLoader& Inst(); static void Delete(); void Load( const cString& filename, const cString& dir = "" ); private: void GetNode( tinyxml2::XMLElement* element, GUIEngine::cWindow* parent = nullptr ); const char* GetAttribute(const tinyxml2::XMLElement* element, const cString& attribute) const; GUIEngine::cLayout* LayoutBuild( tinyxml2::XMLElement* element, GUIEngine::cWindow* parent ); GUIEngine::cLabel* LabelBuild( tinyxml2::XMLElement* element, GUIEngine::cWindow* parent ); const signed long int getID(tinyxml2::XMLElement* element); const GUIHelpers::eOrientation getOrientation(tinyxml2::XMLElement* element); const GUIHelpers::eAlign getAlign(tinyxml2::XMLElement* element); const GUIHelpers::eLayout getLayout(tinyxml2::XMLElement* element); const GUIHelpers::Position getPosition(tinyxml2::XMLElement* element); const GUIHelpers::Size getSize(tinyxml2::XMLElement* element); const GUIHelpers::Padding getPadding(tinyxml2::XMLElement* element); const cString getText(tinyxml2::XMLElement* element); private: static cXMLoader* sp_inst;// = nullptr };/// END CLASS DEFINITION cObject }/// END NAMESPACE DEFINITION GUIHelpers #endif/// END IFNDEF _CXMLOADER_HPP_