OpcUaCanOpen
CANopen OPC-UA server
LogItInstance Class Reference

#include <LogItInstance.h>

Public Member Functions

ComponentAttributesregisterLoggingComponent (const std::string &componentName, const Log::LOG_LEVEL &nonComponentLogLevel)
 
bool getComponentAttributes (const Log::LogComponentHandle &componentHandle, ComponentAttributes *&componentAttributes)
 
bool getComponentHandle (const std::string &componentName, Log::LogComponentHandle &componentHandle)
 
std::map< Log::LogComponentHandle, std::string > getLoggingComponentsList () const
 

Static Public Member Functions

static bool instanceExists ()
 
static SHARED_LIB_EXPORT_DEFN LogItInstancegetInstance ()
 
static bool setInstance (LogItInstance *remoteInstance)
 
static LogItInstancecreateInstance ()
 

Public Attributes

bool m_isLoggingInitialized
 
LogSinks m_logSinksInstance
 
Log::LOG_LEVEL m_nonComponentLogLevel
 

Private Types

typedef std::vector< ComponentAttributesLoggingComponentsArray
 
typedef std::unordered_map< std::string, Log::LogComponentHandleMapOfComponentNameToHandle
 
typedef std::shared_ptr< MapOfComponentNameToHandleMapOfComponentNameToHandlePtr
 

Private Member Functions

 LogItInstance ()
 
virtual ~LogItInstance ()
 

Private Attributes

LoggingComponentsArray m_components
 
MapOfComponentNameToHandlePtr m_componentNames
 
std::mutex m_componentsLock
 

Static Private Attributes

static LogItInstanceg_sLogItInstance
 

Detailed Description

Definition at line 34 of file LogItInstance.h.

Member Typedef Documentation

◆ LoggingComponentsArray

Definition at line 37 of file LogItInstance.h.

◆ MapOfComponentNameToHandle

typedef std::unordered_map<std::string, Log::LogComponentHandle> LogItInstance::MapOfComponentNameToHandle
private

Definition at line 38 of file LogItInstance.h.

◆ MapOfComponentNameToHandlePtr

Definition at line 39 of file LogItInstance.h.

Constructor & Destructor Documentation

◆ LogItInstance()

LogItInstance::LogItInstance ( )
private

Definition at line 34 of file LogItInstance.cpp.

◆ ~LogItInstance()

LogItInstance::~LogItInstance ( )
privatevirtual

Definition at line 40 of file LogItInstance.cpp.

Member Function Documentation

◆ createInstance()

LogItInstance * LogItInstance::createInstance ( )
static

Definition at line 70 of file LogItInstance.cpp.

◆ getComponentAttributes()

bool LogItInstance::getComponentAttributes ( const Log::LogComponentHandle componentHandle,
ComponentAttributes *&  componentAttributes 
)

Definition at line 125 of file LogItInstance.cpp.

◆ getComponentHandle()

bool LogItInstance::getComponentHandle ( const std::string &  componentName,
Log::LogComponentHandle componentHandle 
)

Definition at line 133 of file LogItInstance.cpp.

◆ getInstance()

LogItInstance * LogItInstance::getInstance ( )
static

Definition at line 48 of file LogItInstance.cpp.

◆ getLoggingComponentsList()

map< Log::LogComponentHandle, string > LogItInstance::getLoggingComponentsList ( ) const

Definition at line 142 of file LogItInstance.cpp.

◆ instanceExists()

bool LogItInstance::instanceExists ( )
static

Definition at line 43 of file LogItInstance.cpp.

◆ registerLoggingComponent()

ComponentAttributes & LogItInstance::registerLoggingComponent ( const std::string &  componentName,
const Log::LOG_LEVEL nonComponentLogLevel 
)

Definition at line 83 of file LogItInstance.cpp.

◆ setInstance()

bool LogItInstance::setInstance ( LogItInstance remoteInstance)
static

Definition at line 53 of file LogItInstance.cpp.

Member Data Documentation

◆ g_sLogItInstance

LogItInstance * LogItInstance::g_sLogItInstance
staticprivate

Definition at line 50 of file LogItInstance.h.

◆ m_componentNames

MapOfComponentNameToHandlePtr LogItInstance::m_componentNames
private

Definition at line 65 of file LogItInstance.h.

◆ m_components

LoggingComponentsArray LogItInstance::m_components
private

Definition at line 64 of file LogItInstance.h.

◆ m_componentsLock

std::mutex LogItInstance::m_componentsLock
mutableprivate

Definition at line 66 of file LogItInstance.h.

◆ m_isLoggingInitialized

bool LogItInstance::m_isLoggingInitialized

Definition at line 59 of file LogItInstance.h.

◆ m_logSinksInstance

LogSinks LogItInstance::m_logSinksInstance

Definition at line 60 of file LogItInstance.h.

◆ m_nonComponentLogLevel

Log::LOG_LEVEL LogItInstance::m_nonComponentLogLevel

Definition at line 61 of file LogItInstance.h.


The documentation for this class was generated from the following files: