diff --git a/core/basic/autodo.hpp b/core/basic/autodo.hpp index daa8f53..af13c60 100644 --- a/core/basic/autodo.hpp +++ b/core/basic/autodo.hpp @@ -9,7 +9,7 @@ #include #include #include -namespace iflytopcpp { +namespace iflytop { using namespace std; class Autodo { @@ -23,4 +23,4 @@ class Autodo { private: }; -} // namespace iflytopcpp \ No newline at end of file +} // namespace iflytop \ No newline at end of file diff --git a/core/basic/signal/signal.cpp b/core/basic/signal/signal.cpp index cb72953..59b83a2 100644 --- a/core/basic/signal/signal.cpp +++ b/core/basic/signal/signal.cpp @@ -1,5 +1,5 @@ #include "signal.hpp" -namespace iflytopcpp { +namespace iflytop { namespace core { using namespace std; bool Singal::sleep_for_us(int64_t us) { diff --git a/core/basic/signal/signal.hpp b/core/basic/signal/signal.hpp index b37aaac..8b8b1fa 100644 --- a/core/basic/signal/signal.hpp +++ b/core/basic/signal/signal.hpp @@ -13,7 +13,7 @@ #include #include #include -namespace iflytopcpp { +namespace iflytop { namespace core { using namespace std; class Singal { diff --git a/core/components/file_util.cpp b/core/components/file_util.cpp index e65f9be..1b72513 100644 --- a/core/components/file_util.cpp +++ b/core/components/file_util.cpp @@ -1,5 +1,5 @@ #include "file_util.hpp" -using namespace iflytopcpp; +using namespace iflytop; using namespace core; bool FileUtil::exist(const string &path) { diff --git a/core/components/file_util.hpp b/core/components/file_util.hpp index 00d2c84..572219e 100644 --- a/core/components/file_util.hpp +++ b/core/components/file_util.hpp @@ -18,7 +18,7 @@ #include "iflytopcpp/core/spdlogfactory/logger.hpp" -namespace iflytopcpp { +namespace iflytop { namespace core { using namespace std; @@ -43,4 +43,4 @@ class FileUtil { // bool getRepetitionDirName(string fileName, string &outfilename, int maxNum = -1); }; } // namespace core -} // namespace iflytopcpp +} // namespace iflytop diff --git a/core/components/modbus/modbus.cpp b/core/components/modbus/modbus.cpp index 2095b1d..ff6729d 100644 --- a/core/components/modbus/modbus.cpp +++ b/core/components/modbus/modbus.cpp @@ -5,7 +5,7 @@ extern "C" { #include "zmodbus_master.h" } -namespace iflytopcpp { +namespace iflytop { namespace core { string modbusStatusToStr(int status) { switch (status) { @@ -36,9 +36,9 @@ string modbusStatusToStr(int status) { } } } // namespace core -} // namespace iflytopcpp +} // namespace iflytop -using namespace iflytopcpp::core; +using namespace iflytop::core; ModbusMaster::ModbusMaster() {} ModbusMaster::~ModbusMaster() {} diff --git a/core/components/modbus/modbus.hpp b/core/components/modbus/modbus.hpp index 0e26687..d862f68 100644 --- a/core/components/modbus/modbus.hpp +++ b/core/components/modbus/modbus.hpp @@ -13,7 +13,7 @@ #include "iflytopcpp/core/components/uart/uart.hpp" #include "iflytopcpp/core/spdlogfactory/logger.hpp" -namespace iflytopcpp { +namespace iflytop { namespace core { using namespace std; @@ -102,4 +102,4 @@ class ModbusMaster { }; } // namespace core -} // namespace iflytopcpp \ No newline at end of file +} // namespace iflytop \ No newline at end of file diff --git a/core/components/string_util.cpp b/core/components/string_util.cpp index 37ca9af..4d5ced5 100644 --- a/core/components/string_util.cpp +++ b/core/components/string_util.cpp @@ -1,5 +1,5 @@ #include "string_util.hpp" -using namespace iflytopcpp; +using namespace iflytop; using namespace core; using namespace std; diff --git a/core/components/string_util.hpp b/core/components/string_util.hpp index a3aa657..35e9e87 100644 --- a/core/components/string_util.hpp +++ b/core/components/string_util.hpp @@ -5,7 +5,7 @@ #include #include #include -namespace iflytopcpp { +namespace iflytop { namespace core { using namespace std; @@ -49,4 +49,4 @@ class StringUtil { }; } // namespace core -} // namespace iflytopcpp +} // namespace iflytop diff --git a/core/components/time_util.hpp b/core/components/time_util.hpp index 15bf47e..7c94952 100644 --- a/core/components/time_util.hpp +++ b/core/components/time_util.hpp @@ -14,7 +14,7 @@ #include #include -namespace iflytopcpp { +namespace iflytop { namespace core { using namespace std; using namespace chrono; @@ -75,4 +75,4 @@ typedef time_point tp_sys; typedef time_point tp_steady; }; // namespace core -} // namespace iflytopcpp +} // namespace iflytop diff --git a/core/components/uart/uart.cpp b/core/components/uart/uart.cpp index abc8b59..bf692d6 100644 --- a/core/components/uart/uart.cpp +++ b/core/components/uart/uart.cpp @@ -179,7 +179,7 @@ int uartStop(struct UartDevice *dev) { return UART_SUCCESS; } -using namespace iflytopcpp; +using namespace iflytop; using namespace core; Uart::Uart(const char *path, int rate) { diff --git a/core/components/uart/uart.hpp b/core/components/uart/uart.hpp index d871e09..ad3377b 100644 --- a/core/components/uart/uart.hpp +++ b/core/components/uart/uart.hpp @@ -23,7 +23,7 @@ struct UartDevice { struct termios *tty; }; -namespace iflytopcpp { +namespace iflytop { namespace core { using namespace std; // ref:https://www.cnblogs.com/electron/p/3451114.html @@ -73,4 +73,4 @@ class Uart { }; } // namespace core -} // namespace iflytopcpp \ No newline at end of file +} // namespace iflytop \ No newline at end of file diff --git a/core/spdlogfactory/logger_factory.cpp b/core/spdlogfactory/logger_factory.cpp index 48ba97c..ec82d1f 100644 --- a/core/spdlogfactory/logger_factory.cpp +++ b/core/spdlogfactory/logger_factory.cpp @@ -20,7 +20,7 @@ #include "spdlog/sinks/stdout_sinks.h" // #include "zwtimecpp/core/utils/compliler.h" using namespace std; -using namespace iflytopcpp; +using namespace iflytop; using namespace core; using namespace nlohmann; using namespace spdlog; diff --git a/core/spdlogfactory/logger_factory.hpp b/core/spdlogfactory/logger_factory.hpp index 943d18f..19bee50 100644 --- a/core/spdlogfactory/logger_factory.hpp +++ b/core/spdlogfactory/logger_factory.hpp @@ -20,7 +20,7 @@ #include "spdlog/sinks/stdout_color_sinks.h" #include "spdlog/spdlog.h" -namespace iflytopcpp { +namespace iflytop { namespace core { using namespace std; using namespace spdlog; @@ -28,20 +28,20 @@ typedef shared_ptr logger_t; #define ENABLE_LOGGER(loggerName) \ public: \ - iflytopcpp::core::logger_t logger = \ - iflytopcpp::core::SpdLoggerFactory::Instance().createLogger(#loggerName); \ + iflytop::core::logger_t logger = \ + iflytop::core::SpdLoggerFactory::Instance().createLogger(#loggerName); \ \ private: #define CREATE_LOGGER(loggerName) \ - iflytopcpp::core::SpdLoggerFactory::Instance().createLogger(#loggerName) + iflytop::core::SpdLoggerFactory::Instance().createLogger(#loggerName) #define GET_LOGGER(loggerName) \ - iflytopcpp::core::SpdLoggerFactory::Instance().createLogger(#loggerName) + iflytop::core::SpdLoggerFactory::Instance().createLogger(#loggerName) #define ENABLE_LOGGER_STATIC(loggerName) \ - static iflytopcpp::core::logger_t logger = \ - iflytopcpp::core::SpdLoggerFactory::Instance().createLogger(#loggerName); + static iflytop::core::logger_t logger = \ + iflytop::core::SpdLoggerFactory::Instance().createLogger(#loggerName); class SpdLoggerFactory { SpdLoggerFactory(){}; @@ -61,4 +61,4 @@ class SpdLoggerFactory { void parseSphLogConfig(string path); }; } // namespace core -} // namespace iflytopcpp \ No newline at end of file +} // namespace iflytop \ No newline at end of file diff --git a/core/thread/thread.cpp b/core/thread/thread.cpp index 427513b..ea7850a 100644 --- a/core/thread/thread.cpp +++ b/core/thread/thread.cpp @@ -15,7 +15,7 @@ #include "unistd.h" using namespace std; -using namespace iflytopcpp; +using namespace iflytop; using namespace core; using namespace moodycamel; diff --git a/core/thread/thread.hpp b/core/thread/thread.hpp index ff74c97..da1ec65 100644 --- a/core/thread/thread.hpp +++ b/core/thread/thread.hpp @@ -19,7 +19,7 @@ #include "iflytopcpp/core/basic/signal/signal.hpp" #include "iflytopcpp/core/spdlogfactory/logger.hpp" #include "iflytopcpp/core/zexception/zexception.hpp" -namespace iflytopcpp { +namespace iflytop { namespace core { using namespace std; class Thread; @@ -69,4 +69,4 @@ class ThisThread { }; } // namespace core -} // namespace iflytopcpp +} // namespace iflytop diff --git a/core/zexception/zexception.cpp b/core/zexception/zexception.cpp index 7d726cc..ef18c23 100644 --- a/core/zexception/zexception.cpp +++ b/core/zexception/zexception.cpp @@ -17,7 +17,7 @@ // #include "zwtimecpp/core/logger/logger.hpp" // #include "zwtimecpp/core/system_state.hpp" using namespace std; -using namespace iflytopcpp; +using namespace iflytop; using namespace core; #if ENABLE_BACK_WARD using namespace backward; diff --git a/core/zexception/zexception.hpp b/core/zexception/zexception.hpp index db5a23f..f0beb74 100644 --- a/core/zexception/zexception.hpp +++ b/core/zexception/zexception.hpp @@ -16,7 +16,7 @@ // #include // #include "zwtimecpp/core/base/object.hpp" -namespace iflytopcpp { +namespace iflytop { namespace core { using namespace std; @@ -78,4 +78,4 @@ class zexception : public std::exception { void initialize(string description, string stdExceptionTypeinfo = "", string baseExceptionWhat = ""); }; } // namespace core -} // namespace iflytopcpp \ No newline at end of file +} // namespace iflytop \ No newline at end of file