| 123456789101112131415161718192021222324 |
- #pragma once
- #define CONFIGPATH "sys.yaml"
- #include <fstream>
- #include <yaml-cpp/yaml.h>
- #pragma comment(lib,"libyaml-cppmd.lib")
- class CConfig
- {
- private:
- CConfig();
- ~CConfig();
- CConfig(const CConfig&);
- CConfig & operator = (const CConfig&)=default;
- static CConfig instance;
- std::string ip;
- int port;
- public:
- static CConfig* GetInstance() { return &instance; };
- std::string GetServerIP()const;
- int GetServerPort()const;
- };
|