FLImaging 6.5.8.1
FLImaging::Base::CLog Class Reference

Log class. More...

#include <Log.h>

Inheritance diagram for FLImaging::Base::CLog:
FLImaging::Base::CFLBase

Public Member Functions

virtual ~CLog ()
 
- Public Member Functions inherited from FLImaging::Base::CFLBase
 CFLBase ()
 Default constructor.
 
virtual ~CFLBase ()
 Destructor.
 
void Lock () const
 Set a lock on an object.
 
bool TryLock () const
 Try to lock the object.
 
void Unlock () const
 Unlock the object.
 
virtual const CProcessingUnitBaseGetProcessingUnit () const
 Returns the set ProcessingUnit.
 
virtual const CResult SetProcessingUnit (const CProcessingUnitBase &pub)
 set the ProcessingUnit
 
virtual const CResult SetProcessingUnit (const CProcessingUnitBase *pPub)
 Set the ProcessingUnit.
 
virtual void ResetProcessingUnit ()
 Rest the ProcessingUnit.
 
virtual bool IsValid () const
 Validate the object.
 
template<class T >
bool IsValid (T &tValue) const
 Validate input values.
 
template<class T >
bool IsValid (T *pTValue) const
 Validate input values.
 
template<class T >
void GenerateMin (T &tValue) const
 Generate the minimum value of that type.
 
template<class T >
void GenerateMin (T *pTValue) const
 Generate the minimum value of that type.
 
template<class T >
void GenerateMinInt32 (T &tValue) const
 Generate minimum signed 32-bit integer value.
 
template<class T >
void GenerateMinInt32 (T *pTValue) const
 Generate minimum signed 32-bit integer value.
 
template<class T >
void GenerateMinInt31 (T &tValue) const
 Generate minimum signed 31-bit integer value.
 
template<class T >
void GenerateMinInt31 (T *pTValue) const
 Generate minimum signed 31-bit integer value.
 
template<class T >
void GenerateMax (T &tValue) const
 Generate the maximum value of that type.
 
template<class T >
void GenerateMax (T *pTValue) const
 Generate the maximum value of that type.
 
template<class T >
void GenerateMaxInt32 (T &tValue) const
 Generate maximum signed 32-bit integer value.
 
template<class T >
void GenerateMaxInt32 (T *pTValue) const
 Generate maximum signed 32-bit integer value.
 
template<class T >
void GenerateMaxInt31 (T &tValue) const
 Generate maximum signed 31-bit integer value.
 
template<class T >
void GenerateMaxInt31 (T *pTValue) const
 Generate maximum signed 31-bit integer value.
 
template<class T >
void GenerateInvalid (T &tValue) const
 Generate invalid value.
 
template<class T >
void GenerateInvalid (T *pTValue) const
 Generate invalid value.
 
virtual void OnReceiveBroadcast (const CBroadcastMessage *pMessage)
 Callback function. A function that receives a BroadcastMessage.
 
virtual int64_t GetClassType () const =0
 Returns the Type value of Class. The returned value itself has no meaning, but if it is the same type of class, the same value will be displayed, so comparison is possible.
 
const char * GetClassNameWithNamespace () const
 Returns the class name including the namespace of the actual instance.
 
const char * GetClassNameWithoutNamespace () const
 Returns the class name that does not include the namespace of the actual instance.
 
virtual uint32_t GetClassHash () const
 Returns the class hash value of the actual instance. For the same class, even if the instance is different, it has the same value.
 
virtual bool IsLicenseAvailable () const
 Returns whether the algorithm can be used with the current license.
 
const CResult ShareSynchronizationObject (const CFLBase *pSrcObject) const
 Share synchronization object of original object.
 
bool IsSharedSynchronizationObject () const
 Is shared synchronization object.
 
virtual void Throw (const CResult &res, const wchar_t *pWcsExtraMessage=nullptr) const
 Raise an exception. Information and error codes of the object that occurred are recorded in the log.
 
virtual void Throw (const std::exception &res, const wchar_t *pWcsExtraMessage) const
 Raise an exception. Information and error codes of the object that occurred are recorded in the log.
 

Static Public Member Functions

static const CResult Initialize ()
 Initialize.
 
static bool IsInitialized ()
 Get initialization status.
 
static const CResult Terminate ()
 Terminate the log system. After explicitly calling the function, the log recording function will no longer perform implicit initialization.
 
static const CResult __stdcall Write (const char *pszFormat,...)
 Write log.
 
static const CResult __stdcall Write (const wchar_t *pWcsFormat,...)
 Write log.
 
static const CResult __stdcall WriteWithColor (uint32_t u32Color, const char *pszFormat,...)
 Write log with specified color.
 
static const CResult __stdcall WriteWithColor (uint32_t u32Color, const wchar_t *pWcsFormat,...)
 Write log with specified color.
 
static const CResult __stdcall WriteByCategory (const char *pszCategory, const char *pszFormat,...)
 Write log by specified categories.
 
static const CResult __stdcall WriteByCategory (const wchar_t *pWcsCategory, const wchar_t *pWcsFormat,...)
 Write log by specified categories.
 
static const CResult __stdcall WriteWithColorByCategory (const char *pszCategory, uint32_t u32Color, const char *pszFormat,...)
 Write log with specified color and category.
 
static const CResult __stdcall WriteWithColorByCategory (const wchar_t *pWcsCategory, uint32_t u32Color, const wchar_t *pWcsFormat,...)
 Write log with specified color and category.
 
static const CResult SetLogBufferSize (int64_t i64BufferSize=65536)
 Set the size of the buffer to create when writing a log.
 
static int64_t GetLogBufferSize ()
 Get size of buffer to create when writing a log.
 
static void SetLogPath (const wchar_t *pWcsLogPath=nullptr)
 Specify log storage path.
 
static const wchar_t * GetLogPathName ()
 Get log save path.
 
static const wchar_t * GetLogFileName ()
 Get log save file name.
 
static const wchar_t * GetLogFileNameWithPath ()
 Get log save file name including path.
 
static void SetLogCallback (CLogCallbackProcType pCallback, CFLBase *pReceiver)
 Set log callback.
 
static CLogCallbackProcType GetLogCallback ()
 Set log callback.
 
static CFLBaseGetReceiver ()
 Return log callback receive object pointer.
 

Protected Member Functions

 CLog ()
 Constructor.
 

Detailed Description

Log class.

Constructor & Destructor Documentation

◆ ~CLog()

virtual FLImaging::Base::CLog::~CLog ( )
virtual

Destructor

Member Function Documentation

◆ GetLogBufferSize()

static int64_t FLImaging::Base::CLog::GetLogBufferSize ( )
static

Get size of buffer to create when writing a log.

Return values
int64_tReturn buffer size

◆ GetLogCallback()

static CLogCallbackProcType FLImaging::Base::CLog::GetLogCallback ( )
static

Set log callback.

Return values
FLImaging::Base::CLogCallbackProcTypeLog callback function pointer

◆ GetLogFileName()

static const wchar_t * FLImaging::Base::CLog::GetLogFileName ( )
static

Get log save file name.

Return values
constwchar_t* Return log save file name

◆ GetLogFileNameWithPath()

static const wchar_t * FLImaging::Base::CLog::GetLogFileNameWithPath ( )
static

Get log save file name including path.

Return values
constwchar_t* Return log save file name including path

◆ GetLogPathName()

static const wchar_t * FLImaging::Base::CLog::GetLogPathName ( )
static

Get log save path.

Return values
constwchar_t* Return log save path

◆ GetReceiver()

static CFLBase * FLImaging::Base::CLog::GetReceiver ( )
static

Return log callback receive object pointer.

Return values
FLImaging::Base::CFLBase*Receiving object pointer
See also
FLImaging::Base::CFLBase

◆ Initialize()

static const CResult FLImaging::Base::CLog::Initialize ( )
static

Initialize.

Return values
constFLImaging::CResult Information about execution results
See also
FLImaging::CResult

◆ IsInitialized()

static bool FLImaging::Base::CLog::IsInitialized ( )
static

Get initialization status.

Return values
boolReturn true when initialized

◆ SetLogBufferSize()

static const CResult FLImaging::Base::CLog::SetLogBufferSize ( int64_t i64BufferSize = 65536)
static

Set the size of the buffer to create when writing a log.

Parameters
[in]i64BufferSizeFormat character generation buffer size
Return values
constFLImaging::CResult Return function execution result

◆ SetLogCallback()

static void FLImaging::Base::CLog::SetLogCallback ( CLogCallbackProcType pCallback,
CFLBase * pReceiver )
static

Set log callback.

Parameters
[in]pCallbackLog callback function pointer
[in]pReceiverPointer to object to receive
See also
FLImaging::Base::CLogCallbackProcType
FLImaging::Base::CFLBase

◆ SetLogPath()

static void FLImaging::Base::CLog::SetLogPath ( const wchar_t * pWcsLogPath = nullptr)
static

Specify log storage path.

Parameters
[in]pWcsLogPathLog storage path, module path if nullptr

◆ Terminate()

static const CResult FLImaging::Base::CLog::Terminate ( )
static

Terminate the log system. After explicitly calling the function, the log recording function will no longer perform implicit initialization.

Return values
constFLImaging::CResult Information about execution results
See also
FLImaging::CResult

◆ Write() [1/2]

static const CResult __stdcall FLImaging::Base::CLog::Write ( const char * pszFormat,
... )
static

Write log.

Parameters
[in]pszFormatANSI write string format
[in]...Variable parameter
Return values
constFLImaging::CResult Information about execution results
See also
FLImaging::CResult

◆ Write() [2/2]

static const CResult __stdcall FLImaging::Base::CLog::Write ( const wchar_t * pWcsFormat,
... )
static

Write log.

Parameters
[in]pWcsFormatUNICODE write string format
[in]...Variable parameter
Return values
constFLImaging::CResult 실행 결과에 대한 정보
See also
FLImaging::CResult

◆ WriteByCategory() [1/2]

static const CResult __stdcall FLImaging::Base::CLog::WriteByCategory ( const char * pszCategory,
const char * pszFormat,
... )
static

Write log by specified categories.

Parameters
[in]pszCategoryCategory
[in]pszFormatANSI write string format
[in]...Variable parameter
Return values
constFLImaging::CResult Information about execution results
See also
FLImaging::CResult

◆ WriteByCategory() [2/2]

static const CResult __stdcall FLImaging::Base::CLog::WriteByCategory ( const wchar_t * pWcsCategory,
const wchar_t * pWcsFormat,
... )
static

Write log by specified categories.

Parameters
[in]pWcsCategoryCategory
[in]pWcsFormatUNICODE write string format
[in]...Variable parameter
Return values
constFLImaging::CResult 실행 결과에 대한 정보
See also
FLImaging::CResult

◆ WriteWithColor() [1/2]

static const CResult __stdcall FLImaging::Base::CLog::WriteWithColor ( uint32_t u32Color,
const char * pszFormat,
... )
static

Write log with specified color.

Parameters
[in]u32ColorColor of the string to be displayed in the log viewer
[in]pszFormatANSI write string format
[in]...Variable parameter
Return values
constFLImaging::CResult Information about execution results
See also
FLImaging::CResult

◆ WriteWithColor() [2/2]

static const CResult __stdcall FLImaging::Base::CLog::WriteWithColor ( uint32_t u32Color,
const wchar_t * pWcsFormat,
... )
static

Write log with specified color.

Parameters
[in]u32ColorColor of the string to be displayed in the log viewer
[in]pWcsFormatUNICODE write string format
[in]...Variable parameter
Return values
constFLImaging::CResult Information about execution results
See also
FLImaging::CResult

◆ WriteWithColorByCategory() [1/2]

static const CResult __stdcall FLImaging::Base::CLog::WriteWithColorByCategory ( const char * pszCategory,
uint32_t u32Color,
const char * pszFormat,
... )
static

Write log with specified color and category.

Parameters
[in]pszCategoryCategory
[in]u32ColorColor of the string to be displayed in the log viewer
[in]pszFormatANSI write string format
[in]...Variable parameter
Return values
constFLImaging::CResult Information about execution results
See also
FLImaging::CResult

◆ WriteWithColorByCategory() [2/2]

static const CResult __stdcall FLImaging::Base::CLog::WriteWithColorByCategory ( const wchar_t * pWcsCategory,
uint32_t u32Color,
const wchar_t * pWcsFormat,
... )
static

Write log with specified color and category.

Parameters
[in]pWcsCategoryCategory
[in]u32ColorColor of the string to be displayed in the log viewer
[in]pWcsFormatUNICODE write string format
[in]...Variable parameter
Return values
constFLImaging::CResult Information about execution results
See also
FLImaging::CResult