Browse Source

change namespace ifytopcpp => ifytop

disinfection_machine
zhaohe 3 years ago
parent
commit
ac9441de37
  1. 4
      core/basic/autodo.hpp
  2. 2
      core/basic/signal/signal.cpp
  3. 2
      core/basic/signal/signal.hpp
  4. 2
      core/components/file_util.cpp
  5. 4
      core/components/file_util.hpp
  6. 6
      core/components/modbus/modbus.cpp
  7. 4
      core/components/modbus/modbus.hpp
  8. 2
      core/components/string_util.cpp
  9. 4
      core/components/string_util.hpp
  10. 4
      core/components/time_util.hpp
  11. 2
      core/components/uart/uart.cpp
  12. 4
      core/components/uart/uart.hpp
  13. 2
      core/spdlogfactory/logger_factory.cpp
  14. 16
      core/spdlogfactory/logger_factory.hpp
  15. 2
      core/thread/thread.cpp
  16. 4
      core/thread/thread.hpp
  17. 2
      core/zexception/zexception.cpp
  18. 4
      core/zexception/zexception.hpp

4
core/basic/autodo.hpp

@ -9,7 +9,7 @@
#include <sstream> #include <sstream>
#include <string> #include <string>
#include <vector> #include <vector>
namespace iflytopcpp {
namespace iflytop {
using namespace std; using namespace std;
class Autodo { class Autodo {
@ -23,4 +23,4 @@ class Autodo {
private: private:
}; };
} // namespace iflytopcpp
} // namespace iflytop

2
core/basic/signal/signal.cpp

@ -1,5 +1,5 @@
#include "signal.hpp" #include "signal.hpp"
namespace iflytopcpp {
namespace iflytop {
namespace core { namespace core {
using namespace std; using namespace std;
bool Singal::sleep_for_us(int64_t us) { bool Singal::sleep_for_us(int64_t us) {

2
core/basic/signal/signal.hpp

@ -13,7 +13,7 @@
#include <sstream> #include <sstream>
#include <string> #include <string>
#include <vector> #include <vector>
namespace iflytopcpp {
namespace iflytop {
namespace core { namespace core {
using namespace std; using namespace std;
class Singal { class Singal {

2
core/components/file_util.cpp

@ -1,5 +1,5 @@
#include "file_util.hpp" #include "file_util.hpp"
using namespace iflytopcpp;
using namespace iflytop;
using namespace core; using namespace core;
bool FileUtil::exist(const string &path) { bool FileUtil::exist(const string &path) {

4
core/components/file_util.hpp

@ -18,7 +18,7 @@
#include "iflytopcpp/core/spdlogfactory/logger.hpp" #include "iflytopcpp/core/spdlogfactory/logger.hpp"
namespace iflytopcpp {
namespace iflytop {
namespace core { namespace core {
using namespace std; using namespace std;
@ -43,4 +43,4 @@ class FileUtil {
// bool getRepetitionDirName(string fileName, string &outfilename, int maxNum = -1); // bool getRepetitionDirName(string fileName, string &outfilename, int maxNum = -1);
}; };
} // namespace core } // namespace core
} // namespace iflytopcpp
} // namespace iflytop

6
core/components/modbus/modbus.cpp

@ -5,7 +5,7 @@ extern "C" {
#include "zmodbus_master.h" #include "zmodbus_master.h"
} }
namespace iflytopcpp {
namespace iflytop {
namespace core { namespace core {
string modbusStatusToStr(int status) { string modbusStatusToStr(int status) {
switch (status) { switch (status) {
@ -36,9 +36,9 @@ string modbusStatusToStr(int status) {
} }
} }
} // namespace core } // namespace core
} // namespace iflytopcpp
} // namespace iflytop
using namespace iflytopcpp::core;
using namespace iflytop::core;
ModbusMaster::ModbusMaster() {} ModbusMaster::ModbusMaster() {}
ModbusMaster::~ModbusMaster() {} ModbusMaster::~ModbusMaster() {}

4
core/components/modbus/modbus.hpp

@ -13,7 +13,7 @@
#include "iflytopcpp/core/components/uart/uart.hpp" #include "iflytopcpp/core/components/uart/uart.hpp"
#include "iflytopcpp/core/spdlogfactory/logger.hpp" #include "iflytopcpp/core/spdlogfactory/logger.hpp"
namespace iflytopcpp {
namespace iflytop {
namespace core { namespace core {
using namespace std; using namespace std;
@ -102,4 +102,4 @@ class ModbusMaster {
}; };
} // namespace core } // namespace core
} // namespace iflytopcpp
} // namespace iflytop

2
core/components/string_util.cpp

@ -1,5 +1,5 @@
#include "string_util.hpp" #include "string_util.hpp"
using namespace iflytopcpp;
using namespace iflytop;
using namespace core; using namespace core;
using namespace std; using namespace std;

4
core/components/string_util.hpp

@ -5,7 +5,7 @@
#include <sstream> #include <sstream>
#include <string> #include <string>
#include <vector> #include <vector>
namespace iflytopcpp {
namespace iflytop {
namespace core { namespace core {
using namespace std; using namespace std;
@ -49,4 +49,4 @@ class StringUtil {
}; };
} // namespace core } // namespace core
} // namespace iflytopcpp
} // namespace iflytop

4
core/components/time_util.hpp

@ -14,7 +14,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
namespace iflytopcpp {
namespace iflytop {
namespace core { namespace core {
using namespace std; using namespace std;
using namespace chrono; using namespace chrono;
@ -75,4 +75,4 @@ typedef time_point<system_clock> tp_sys;
typedef time_point<steady_clock> tp_steady; typedef time_point<steady_clock> tp_steady;
}; // namespace core }; // namespace core
} // namespace iflytopcpp
} // namespace iflytop

2
core/components/uart/uart.cpp

@ -179,7 +179,7 @@ int uartStop(struct UartDevice *dev) {
return UART_SUCCESS; return UART_SUCCESS;
} }
using namespace iflytopcpp;
using namespace iflytop;
using namespace core; using namespace core;
Uart::Uart(const char *path, int rate) { Uart::Uart(const char *path, int rate) {

4
core/components/uart/uart.hpp

@ -23,7 +23,7 @@ struct UartDevice {
struct termios *tty; struct termios *tty;
}; };
namespace iflytopcpp {
namespace iflytop {
namespace core { namespace core {
using namespace std; using namespace std;
// ref:https://www.cnblogs.com/electron/p/3451114.html // ref:https://www.cnblogs.com/electron/p/3451114.html
@ -73,4 +73,4 @@ class Uart {
}; };
} // namespace core } // namespace core
} // namespace iflytopcpp
} // namespace iflytop

2
core/spdlogfactory/logger_factory.cpp

@ -20,7 +20,7 @@
#include "spdlog/sinks/stdout_sinks.h" #include "spdlog/sinks/stdout_sinks.h"
// #include "zwtimecpp/core/utils/compliler.h" // #include "zwtimecpp/core/utils/compliler.h"
using namespace std; using namespace std;
using namespace iflytopcpp;
using namespace iflytop;
using namespace core; using namespace core;
using namespace nlohmann; using namespace nlohmann;
using namespace spdlog; using namespace spdlog;

16
core/spdlogfactory/logger_factory.hpp

@ -20,7 +20,7 @@
#include "spdlog/sinks/stdout_color_sinks.h" #include "spdlog/sinks/stdout_color_sinks.h"
#include "spdlog/spdlog.h" #include "spdlog/spdlog.h"
namespace iflytopcpp {
namespace iflytop {
namespace core { namespace core {
using namespace std; using namespace std;
using namespace spdlog; using namespace spdlog;
@ -28,20 +28,20 @@ typedef shared_ptr<logger> logger_t;
#define ENABLE_LOGGER(loggerName) \ #define ENABLE_LOGGER(loggerName) \
public: \ public: \
iflytopcpp::core::logger_t logger = \
iflytopcpp::core::SpdLoggerFactory::Instance().createLogger(#loggerName); \
iflytop::core::logger_t logger = \
iflytop::core::SpdLoggerFactory::Instance().createLogger(#loggerName); \
\ \
private: private:
#define CREATE_LOGGER(loggerName) \ #define CREATE_LOGGER(loggerName) \
iflytopcpp::core::SpdLoggerFactory::Instance().createLogger(#loggerName)
iflytop::core::SpdLoggerFactory::Instance().createLogger(#loggerName)
#define GET_LOGGER(loggerName) \ #define GET_LOGGER(loggerName) \
iflytopcpp::core::SpdLoggerFactory::Instance().createLogger(#loggerName)
iflytop::core::SpdLoggerFactory::Instance().createLogger(#loggerName)
#define ENABLE_LOGGER_STATIC(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 { class SpdLoggerFactory {
SpdLoggerFactory(){}; SpdLoggerFactory(){};
@ -61,4 +61,4 @@ class SpdLoggerFactory {
void parseSphLogConfig(string path); void parseSphLogConfig(string path);
}; };
} // namespace core } // namespace core
} // namespace iflytopcpp
} // namespace iflytop

2
core/thread/thread.cpp

@ -15,7 +15,7 @@
#include "unistd.h" #include "unistd.h"
using namespace std; using namespace std;
using namespace iflytopcpp;
using namespace iflytop;
using namespace core; using namespace core;
using namespace moodycamel; using namespace moodycamel;

4
core/thread/thread.hpp

@ -19,7 +19,7 @@
#include "iflytopcpp/core/basic/signal/signal.hpp" #include "iflytopcpp/core/basic/signal/signal.hpp"
#include "iflytopcpp/core/spdlogfactory/logger.hpp" #include "iflytopcpp/core/spdlogfactory/logger.hpp"
#include "iflytopcpp/core/zexception/zexception.hpp" #include "iflytopcpp/core/zexception/zexception.hpp"
namespace iflytopcpp {
namespace iflytop {
namespace core { namespace core {
using namespace std; using namespace std;
class Thread; class Thread;
@ -69,4 +69,4 @@ class ThisThread {
}; };
} // namespace core } // namespace core
} // namespace iflytopcpp
} // namespace iflytop

2
core/zexception/zexception.cpp

@ -17,7 +17,7 @@
// #include "zwtimecpp/core/logger/logger.hpp" // #include "zwtimecpp/core/logger/logger.hpp"
// #include "zwtimecpp/core/system_state.hpp" // #include "zwtimecpp/core/system_state.hpp"
using namespace std; using namespace std;
using namespace iflytopcpp;
using namespace iflytop;
using namespace core; using namespace core;
#if ENABLE_BACK_WARD #if ENABLE_BACK_WARD
using namespace backward; using namespace backward;

4
core/zexception/zexception.hpp

@ -16,7 +16,7 @@
// #include <zwtimecpp/core/base/interlog/simple_logger.hpp> // #include <zwtimecpp/core/base/interlog/simple_logger.hpp>
// #include "zwtimecpp/core/base/object.hpp" // #include "zwtimecpp/core/base/object.hpp"
namespace iflytopcpp {
namespace iflytop {
namespace core { namespace core {
using namespace std; using namespace std;
@ -78,4 +78,4 @@ class zexception : public std::exception {
void initialize(string description, string stdExceptionTypeinfo = "", string baseExceptionWhat = ""); void initialize(string description, string stdExceptionTypeinfo = "", string baseExceptionWhat = "");
}; };
} // namespace core } // namespace core
} // namespace iflytopcpp
} // namespace iflytop
Loading…
Cancel
Save