#ifndef SOLUTION_PARSER_UTILITY_H #define SOLUTION_PARSER_UTILITY_H #include #include #include #include "tinyxml/tinyxml.h" class SolutionParserUtility { public: static TiXmlElement* getFirstTagByName(TiXmlElement* root, const std::string& tag); static std::vector getAllTagsByName(TiXmlElement* root, const std::string& tag); static TiXmlElement* getFirstTagByNameWithAttribute(TiXmlElement* root, const std::string& tag, const std::string& attribute); static std::vector getAllTagsByNameWithAttribute(TiXmlElement* root, const std::string& tag, const std::string& attribute); static bool checkValidFileExtension(const std::string& file, const std::vector& validExtensions); static std::vector resolveEnvironmentVariables(const std::vector& paths); static std::string findAndResolveEnvironmentVariable(const std::string& path); static std::vector makePathsCanonical(const std::vector& paths); static std::string makePathCanonical(const std::string& path); static std::string checkIsIdeMacro(const std::string& text); // returns matching macro or empty string if no match was found static std::vector m_ideMacros; static std::map m_ideMacroValues; // to replace macros with known values }; #endif // SOLUTION_PARSER_UTILITY_H