ITLogMsg constructors

Remember that ITLogMsg uses reference counting. Here are the constructors of ITLogMsg.

 

Constructors that don’t create a new underlying logmessage object:

§      ITLogMsg::ITLogMsg();
creates a null ITLogMsg object, that is, an unset reference. Later can assign values to it using the ITLogMsg assignment operator or one of the ITLogMsg::Create methods.

 

§      ITLogMsg::ITLogMsg(const ITLogMsg& Other);
creates an ITLogMsg object that references the same underlying "true" logmessage object as Other.
The same effect can be achieved (in more steps) using the first constructor and then the assignment operator.

 

Constructors that create a new underlying logmessage object:

§      ITLogMsg::ITLogMsg(const char* pModuleName, const char* pCaseName,
const ITLogLevel LogLevel = LEVEL_INFO,
const char* pLogChannelName = "StdLog");

creates an ITLogMsg object that references a new underlying "true" logmessage object. This underlying object is initialized using the parameters given. The meaning of the parameters is explained in ITLogMsg Class.

 

§      ITLogMsg::ITLogMsg(const char* pModuleName, const char* pCaseName,
const ITLogLevel LogLevel,
ITOutputLogChannel& LogChannel);

similar to the previous constructor, but here the logchannel is given by its object instead of its name (as string).

Note that the ITLogMsg::Create methods do part of the work of the last two constructors. With them you can reuse ITLogMsg objects that were already constructed.