diff --git a/commdll/Include/VisionUnitResult.h b/commdll/Include/VisionUnitResult.h index 9a79e2c..be862e9 100644 --- a/commdll/Include/VisionUnitResult.h +++ b/commdll/Include/VisionUnitResult.h @@ -97,7 +97,7 @@ private: bool m_bResultValid; // To indicate Valid result (Eg.: Partial Inspection) std::string m_strResultCode; - CVisionResult **m_pVisionResult; + std::vector> m_pVisionResult; // GxLx // For Intel MARKTRAYMAP / PMI PCS validation int m_nHostAck; diff --git a/dll/commdll.dll b/dll/commdll.dll index 53b427a..faa84a2 100644 Binary files a/dll/commdll.dll and b/dll/commdll.dll differ diff --git a/dll/commdllD.dll b/dll/commdllD.dll index fb450cd..b6ce311 100644 Binary files a/dll/commdllD.dll and b/dll/commdllD.dll differ diff --git a/dll/iodll.dll b/dll/iodll.dll index c201189..ef958b2 100644 Binary files a/dll/iodll.dll and b/dll/iodll.dll differ diff --git a/dll/iodllD.dll b/dll/iodllD.dll index b862211..c4aa9a9 100644 Binary files a/dll/iodllD.dll and b/dll/iodllD.dll differ diff --git a/dll/mcctrdll.dll b/dll/mcctrdll.dll index 5434f9f..a5d56b8 100644 Binary files a/dll/mcctrdll.dll and b/dll/mcctrdll.dll differ diff --git a/dll/mcctrdllD.dll b/dll/mcctrdllD.dll index 808d71f..7e953b2 100644 Binary files a/dll/mcctrdllD.dll and b/dll/mcctrdllD.dll differ diff --git a/dll/secsgemdll.dll b/dll/secsgemdll.dll index 5575c94..0d915d5 100644 Binary files a/dll/secsgemdll.dll and b/dll/secsgemdll.dll differ diff --git a/dll/secsgemdllD.dll b/dll/secsgemdllD.dll index 4086239..a134496 100644 Binary files a/dll/secsgemdllD.dll and b/dll/secsgemdllD.dll differ diff --git a/dll/utility.dll b/dll/utility.dll index 2479018..a84b443 100644 Binary files a/dll/utility.dll and b/dll/utility.dll differ diff --git a/dll/utilityD.dll b/dll/utilityD.dll index 18ffc76..4b6b656 100644 Binary files a/dll/utilityD.dll and b/dll/utilityD.dll differ diff --git a/utility/Include/DebugLog.h b/utility/Include/DebugLog.h index 8de34b9..cb98b18 100644 --- a/utility/Include/DebugLog.h +++ b/utility/Include/DebugLog.h @@ -19,26 +19,26 @@ extern UTILITYDLL CLegacyGuiEventLog mitechGuiEventLog; #include "LogManager.h" using namespace mitech::utils::logging; -extern UTILITYDLL CLogManager logManager; + #endif // template void TraceLog(fmt::format_string _fmt, Args&&... args) { - logManager.GetLogger(eLOGGER::DEBUG_LOG).Trace(_fmt, args...); + CLoggerManagerSingleton::Instance().LoggerManager().GetLogger(eLOGGER::DEBUG_LOG).Trace(_fmt, args...); } template void InfoLog(fmt::format_string _fmt, Args&&... args) { - logManager.GetLogger(eLOGGER::DEBUG_LOG).Info(_fmt, args...); + CLoggerManagerSingleton::Instance().LoggerManager().GetLogger(eLOGGER::DEBUG_LOG).Info(_fmt, args...); } template void DebugLog(fmt::format_string _fmt, Args&&... args) { - logManager.GetLogger(eLOGGER::DEBUG_LOG).Log(_fmt, args...); + CLoggerManagerSingleton::Instance().LoggerManager().GetLogger(eLOGGER::DEBUG_LOG).Log(_fmt, args...); } template @@ -46,7 +46,7 @@ void DebugLogTrace(bool bTraceData, fmt::format_string _fmt, Args&&... { if (bTraceData) { - logManager.GetLogger(eLOGGER::DEBUG_LOG).Log(_fmt, args...); + CLoggerManagerSingleton::Instance().LoggerManager().GetLogger(eLOGGER::DEBUG_LOG).Log(_fmt, args...); } } @@ -55,14 +55,14 @@ void DebugLogError(bool bTraceData, fmt::format_string _fmt, Args&&... { if (bTraceData) { - logManager.GetLogger(eLOGGER::DEBUG_LOG).Error(_fmt, args...); + CLoggerManagerSingleton::Instance().LoggerManager().GetLogger(eLOGGER::DEBUG_LOG).Error(_fmt, args...); } } template void DebugLogTiming(fmt::format_string _fmt, Args&&... args) { - logManager.GetLogger(eLOGGER::DEBUG_TIMING_LOG).Log(_fmt, args...); + CLoggerManagerSingleton::Instance().LoggerManager().GetLogger(eLOGGER::DEBUG_TIMING_LOG).Log(_fmt, args...); } template @@ -70,14 +70,14 @@ void DebugLogTimingTrace(bool bTraceData, fmt::format_string _fmt, Args { if (bTraceData) { - logManager.GetLogger(eLOGGER::DEBUG_TIMING_LOG).Log(_fmt, args...); + CLoggerManagerSingleton::Instance().LoggerManager().GetLogger(eLOGGER::DEBUG_TIMING_LOG).Log(_fmt, args...); } } template void GUIEventLog(fmt::format_string _fmt, Args&&... args) { - logManager.GetLogger(eLOGGER::GUI_EVENT_LOG).Log(_fmt, args...); + CLoggerManagerSingleton::Instance().LoggerManager().GetLogger(eLOGGER::GUI_EVENT_LOG).Log(_fmt, args...); } std::shared_ptr UTILITYDLL GetLogger(const std::string& strName); diff --git a/utility/Include/LogManager.h b/utility/Include/LogManager.h index b339ab8..95d96f2 100644 --- a/utility/Include/LogManager.h +++ b/utility/Include/LogManager.h @@ -3,6 +3,8 @@ #include #include +#include "DllDefines.h" + #include "LogSettings.h" #include "Logger.h" @@ -40,4 +42,35 @@ namespace mitech::utils::logging std::map m_mapLoggerOption; std::map> m_mapLogger; }; + + // + class UTILITYDLL CLoggerManagerSingleton + { + public: + /* + * Disable copy constructor and assignment operators + */ + class CLoggerManagerSingleton(const CLoggerManagerSingleton&) = delete; + class CLoggerManagerSingleton& operator=(const CLoggerManagerSingleton&) = delete; + + // accessor + static CLoggerManagerSingleton& Instance() + { + static CLoggerManagerSingleton _instance; + + return _instance; + } + + CLogManager& LoggerManager() + { + return m_loggerManager; + } + + private: + // private ctor + CLoggerManagerSingleton() = default; + ~CLoggerManagerSingleton() = default; + + CLogManager m_loggerManager; + }; } diff --git a/utility/lib/utility.lib b/utility/lib/utility.lib index 4d4f61a..5398561 100644 Binary files a/utility/lib/utility.lib and b/utility/lib/utility.lib differ diff --git a/utility/lib/utilityD.lib b/utility/lib/utilityD.lib index c3c4e3b..d3e358a 100644 Binary files a/utility/lib/utilityD.lib and b/utility/lib/utilityD.lib differ