X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/1f6214607a4f2b727484a4ae9e9411044dae8051..8bfc0bdce2bf4f53ac2c072e7a44e9a7d3b3cca8:/projects/stargazer/plugins/other/rscript/nrmap_parser.h diff --git a/projects/stargazer/plugins/other/rscript/nrmap_parser.h b/projects/stargazer/plugins/other/rscript/nrmap_parser.h index 82c6fe31..82e7edb7 100644 --- a/projects/stargazer/plugins/other/rscript/nrmap_parser.h +++ b/projects/stargazer/plugins/other/rscript/nrmap_parser.h @@ -29,25 +29,43 @@ #include #include - -#include "stg/os_int.h" +#include struct NET_ROUTER { -uint32_t subnetIP; -uint32_t subnetMask; -std::vector routers; + NET_ROUTER() : subnetIP(0), subnetMask(0), routers() {} + NET_ROUTER(const NET_ROUTER & rvalue) + : subnetIP(rvalue.subnetIP), + subnetMask(rvalue.subnetMask), + routers(rvalue.routers) + {} + + uint32_t subnetIP; + uint32_t subnetMask; + std::vector routers; + + NET_ROUTER & operator=(const NET_ROUTER & rvalue) + { + subnetIP = rvalue.subnetIP; + subnetMask = rvalue.subnetMask; + routers = rvalue.routers; + return *this; + } }; class NRMapParser { public: - NRMapParser(); - ~NRMapParser(); + NRMapParser() : nrmap(), errorStr() {} + ~NRMapParser() {} bool ReadFile(const std::string & fileName); - const std::vector & GetMap() const { return nrmap; }; - const std::string & GetErrorStr() const { return errorStr; }; + const std::vector & GetMap() const { return nrmap; } + const std::string & GetErrorStr() const { return errorStr; } + private: + NRMapParser(const NRMapParser & rvalue); + NRMapParser & operator=(const NRMapParser & rvalue); + std::vector nrmap; mutable std::string errorStr;