| 12345678910111213141516171819202122232425262728293031323334 |
- #ifndef CStructureInterpreter_h
- #define CStructureInterpreter_h
- #include <map>
- #include <vector>
- #include <string>
- #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<CMedthodInterface>* getAllMessageInterface(const char* entityName);
- private:
- // methods
- void getAllFiles();
- void loadXmlFiles();
- void loadEntityInterpreterFile();
- void parseXmlToMap(tinyxml2::XMLDocument& xml);
- void loadFunctionInterface(std::map<int,CMedthodInterface> &functionInterface, tinyxml2::XMLElement* pClass);
- void loadMessageInterface(std::vector<CMedthodInterface> &messageInterface, tinyxml2::XMLElement* pEntity);
- void loadParams(CTransStruct ¶ms, tinyxml2::XMLElement* methodInterface);
- int convertStringToInt(std::string s);
- private:
- std::map<std::string, std::map<int,CMedthodInterface>> mMethodStructureMap;
- std::map<std::string, std::vector<CMedthodInterface>> mMessageStructureMap;
- std::string mPathOfXmls;
- std::vector<std::string> mFiles;
- };
- }
- #endif
|