#ifndef CStructureInterpreter_h #define CStructureInterpreter_h #include #include #include #include #include "CMethodInterface.h" #include "tinyxml2.h" namespace Chromium { class CStructureInterpreter { public: explicit CStructureInterpreter(const char* path); CMedthodInterface* getFunctionInterface(char* entityName, char* className, int methodID); std::vector* getAllMessageInterface(const char* entityName); bool checkEntityInservice(std::string entityName); private: // methods void getAllFiles(); void loadXmlFiles(); void loadEntityInterpreterFile(); void parseXmlToMap(tinyxml2::XMLDocument& xml); void loadFunctionInterface(std::map& functionInterface, tinyxml2::XMLElement* pClass); void loadMessageInterface(std::vector& messageInterface, tinyxml2::XMLElement* pEntity); void loadParams(CTransStruct& params, tinyxml2::XMLElement* methodInterface); int convertStringToInt(std::string s); private: std::map> mMethodStructureMap; std::map> mMessageStructureMap; std::string mPathOfXmls; std::vector mFiles; std::unordered_set m_inServiceEntity; }; } #endif