#pragma once #include #include #include #include "logger.h" class QtYaml : public QObject { LOG4QT_DECLARE_QCLASS_LOGGER public: QtYaml() {} ~QtYaml() {} YAML::Node LoadFile2(QString fileName); bool LoadFile(QString& fileName); bool LoadString(QString& data); bool GetString(std::string sec, std::string key, std::string& s); bool GetBool(std::string sec, std::string key, bool& b); bool GetInt(std::string sec, std::string key, int& n); bool GetDouble(std::string sec, std::string key, double& f); private: QString m_fileName; YAML::Node m_node; private: QtYaml(QtYaml const&) = delete; void operator=(QtYaml const&) = delete; }; void split(std::vector& strings, std::string data); void split(std::vector& ints, std::string data);