CLogComp.h
Go to the documentation of this file.
1 #ifndef ilog_CLogComp_included
2 #define ilog_CLogComp_included
3 
4 
5 // ACF includes
6 #include <ilog/CLogCompBase.h>
8 
9 
10 namespace ilog
11 {
12 
13 
19 class CLogComp:
20  public ilog::CLogCompBase,
22 {
23 public:
26 
27  I_BEGIN_COMPONENT(CLogComp);
28  I_REGISTER_INTERFACE(ilog::IMessageContainer);
29  I_ASSIGN(m_maxMessageCountAttrPtr, "MaxMessageCount", "Maximal number of messages", false, 1000);
30  I_END_COMPONENT;
31 
32  // reimplemented (ilog::IMessageConsumer)
33  virtual bool IsMessageSupported(
34  int messageCategory = -1,
35  int messageId = -1,
36  const istd::IInformationProvider* messagePtr = NULL) const;
37  virtual void AddMessage(const MessagePtr& messagePtr);
38 
39 protected:
40  // reimplemented (ilog::CLogCompBase)
41  virtual void WriteMessageToLog(const MessagePtr& messagePtr);
42 
43  // reimplemented (icomp::CComponentBase)
44  virtual void OnComponentCreated();
45 
46 private:
47  I_ATTR(int, m_maxMessageCountAttrPtr);
48 };
49 
50 
51 } // namespace ilog
52 
53 
54 #endif // !ilog_CLogComp_included
55 
CLogCompBase BaseClass
Definition: CLogComp.h:24
Basic implementation for logging using event queue for message transportation.
Definition: CLogCompBase.h:21
virtual void OnComponentCreated()
ilog::CMessageContainer BaseClass2
Definition: CLogComp.h:25
virtual void AddMessage(const MessagePtr &messagePtr)
Adds a message item to the container.
Common interface for a message container.
Data model of logging component.
Definition: CLogComp.h:19
Implementation of a smart pointer.
Definition: TSmartPtr.h:24
#define NULL
Definition: istd.h:64
Common interface for class providing some basic information object.
virtual bool IsMessageSupported(int messageCategory=-1, int messageId=-1, const istd::IInformationProvider *messagePtr=NULL) const
Check if some messge is supported.
virtual void WriteMessageToLog(const MessagePtr &messagePtr)
Basic implementation of a message container.

© 2007-2017 Witold Gantzke and Kirill Lepskiy