|
ACF $AcfVersion:0$
|
Complete logging component with message storage and container interface. More...
#include <CLogComp.h>
Public Types | |
| typedef CLogCompBase | BaseClass |
| Base class typedef for component functionality. | |
| typedef ilog::CMessageContainer | BaseClass2 |
| Base class typedef for container functionality. | |
Public Types inherited from ilog::CLogCompBase | |
| typedef ilog::TMessageDelegatorComp< icomp::CComponentBase > | BaseClass |
| Base class typedef for component functionality. | |
| typedef QObject | BaseClass2 |
| Base class typedef for QObject functionality. | |
Public Types inherited from istd::THierarchicalBase< IHierarchicalMessageContainer > | |
| typedef istd::TChangeDelegator< IHierarchicalMessageContainer > | BaseClass |
Public Types inherited from istd::TChangeDelegator< Base > | |
| typedef Base | BaseClass |
| typedef CChangeDelegator | BaseClass2 |
Public Types inherited from istd::CChangeDelegator | |
| typedef istd::IChangeable | BaseClass |
Public Types inherited from istd::IChangeable | |
| enum | ChangeFlags { CF_ACF_INTERNAL = 0 , CF_ALL_DATA , CF_ANY , CF_DESTROYING , CF_DELEGATED , CF_NO_UNDO } |
| Data model change notification flags. More... | |
| enum | SupportedOperations { SO_NONE = 0 , SO_OBSERVE = 1 << 0 , SO_COPY = 1 << 1 , SO_CLONE = 1 << 2 , SO_COMPARE = 1 << 3 , SO_RESET = 1 << 4 } |
| Flags for supported operations. More... | |
| enum | CompatibilityMode { CM_STRICT , CM_WITHOUT_REFS , CM_WITH_REFS , CM_CONVERT } |
| Control how relationship betweeen objects are interpreted. More... | |
| typedef QMultiMap< QByteArray, QVariant > | ChangeInfoMap |
Public Member Functions | |
| virtual bool | IsMessageSupported (int messageCategory=-1, int messageId=-1, const istd::IInformationProvider *messagePtr=NULL) const override |
| Check if a message is supported. | |
| virtual void | AddMessage (const MessagePtr &messagePtr) override |
| Add a message to the log. | |
Public Member Functions inherited from ilog::CLogCompBase | |
| CLogCompBase () | |
| Default constructor. | |
Public Member Functions inherited from icomp::CComponentBase | |
| CComponentBase () | |
| Create component and assign it to specific context. | |
| virtual const icomp::IComponent * | GetParentComponent (bool ownerOnly=false) const override |
| Get parent of this component. | |
| virtual void * | GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="") override |
| Get access to specified component interface. | |
| virtual IComponentContextSharedPtr | GetComponentContext () const override |
| Get access to component context describing all application-specified component information loaded from components registry. | |
| virtual void | SetComponentContext (const IComponentContextSharedPtr &contextPtr, const icomp::IComponent *parentPtr, bool isParentOwner) override |
| Set component context of this component. | |
Public Member Functions inherited from istd::IPolymorphic | |
| virtual | ~IPolymorphic () |
Public Member Functions inherited from istd::THierarchicalBase< IHierarchicalMessageContainer > | |
| THierarchicalBase () | |
| virtual void | SetParentPtr (typename Base::InterfaceType *parentPtr) |
| virtual int | GetHierarchicalFlags () const override |
| virtual typename Base::InterfaceType * | GetParent () const override |
Public Member Functions inherited from istd::TChangeDelegator< Base > | |
| TChangeDelegator () | |
| TChangeDelegator (istd::IChangeable *slavePtr) | |
| virtual void | OnBeginChanges () override |
| Callback function for begin change event. | |
| virtual void | OnEndChanges (const istd::IChangeable::ChangeSet &changeSet) override |
| Callback function for end change event. | |
Public Member Functions inherited from istd::CChangeDelegator | |
| CChangeDelegator () | |
| CChangeDelegator (istd::IChangeable *slavePtr) | |
| virtual void | SetSlavePtr (istd::IChangeable *slavePtr) override |
| Sets the slave object pointer for change delegation. | |
| virtual istd::IChangeable * | GetSlavePtr () const override |
| Gets the slave object pointer. | |
Public Member Functions inherited from istd::IChangeable | |
| virtual void | BeginChanges (const ChangeSet &changeSet) |
| Starts the change transaction. | |
| virtual void | EndChanges (const ChangeSet &changeSet) |
| Ends the change transaction. | |
| virtual void | BeginChangeGroup (const ChangeSet &changeSet) |
| Starts group of changes. | |
| virtual void | EndChangeGroup (const ChangeSet &changeSet) |
| Ends group of changes. | |
Protected Member Functions | |
| virtual void | WriteMessageToLog (const MessagePtr &messagePtr) override |
| Process a message by storing it in the container. | |
| virtual void | OnComponentCreated () override |
| Called when component is created. | |
Protected Member Functions inherited from icomp::CComponentBase | |
| bool | IsComponentActive () const |
| Check if component is active. | |
| virtual void | OnComponentDestroyed () |
| virtual const icomp::IRealComponentStaticInfo & | GetComponentStaticInfo () const =0 |
| Get access to static info of this component. | |
Additional Inherited Members | |
Signals inherited from ilog::CLogCompBase | |
| void | EmitAddMessage (const MessagePtr &messagePtr) |
| Signal emitted when a message is added. | |
Static Public Member Functions inherited from istd::IChangeable | |
| static const ChangeSet & | GetNoChanges () |
| Get empty set of changes. | |
| static const ChangeSet & | GetAnyChange () |
| Get anonymous change set. | |
| static const ChangeSet & | GetAllChanges () |
| Get anonymous change set. | |
| static const ChangeSet & | GetDelegatedChanges () |
| Get delegated change set. | |
Static Protected Member Functions inherited from icomp::CComponentBase | |
| static const icomp::IRealComponentStaticInfo & | InitStaticInfo (IComponent *componentPtr) |
| static QByteArray | GetComponentId (const icomp::IComponentContext *componentContextPtr, const QByteArray &contextId=QByteArray()) |
Protected Attributes inherited from istd::THierarchicalBase< IHierarchicalMessageContainer > | |
| typename Base::InterfaceType * | m_parentPtr |
Complete logging component with message storage and container interface.
CLogComp is a full-featured logging component that combines thread-safe message reception (via CLogCompBase) with message storage (via CMessageContainer). It's one of the most commonly used logging components in the ACF framework.
This component stores received messages and provides the IMessageContainer interface for retrieving, serializing, and managing the stored messages. It supports a configurable maximum message count with automatic pruning when the limit is exceeded.
Definition at line 83 of file CLogComp.h.
Base class typedef for component functionality.
Definition at line 89 of file CLogComp.h.
Base class typedef for container functionality.
Definition at line 92 of file CLogComp.h.
|
overridevirtual |
Add a message to the log.
Thread-safe method that stores the message in the container. If the maximum message count is exceeded, the oldest message is removed first.
| messagePtr | Shared pointer to message to add |
Reimplemented from ilog::CLogCompBase.
|
overridevirtual |
Check if a message is supported.
Delegates to CMessageContainer's implementation which typically accepts all messages.
| messageCategory | Message category to check (or -1 for any) |
| messageId | Message ID to check (or -1 for any) |
| messagePtr | Complete message to check (or NULL) |
Reimplemented from ilog::TMessageDelegatorComp< icomp::CComponentBase >.
|
overrideprotectedvirtual |
Called when component is created.
Initializes the maximum message count from the component attribute.
Reimplemented from icomp::CComponentBase.
|
overrideprotectedvirtual |
Process a message by storing it in the container.
Called on the component's thread when a message arrives. Adds the message to the internal container (CMessageContainer base class).
| messagePtr | Shared pointer to message to store |
Implements ilog::CLogCompBase.