|
ACF $AcfVersion:0$
|
Basic implementation of a message container. More...
#include <CMessageContainer.h>
Public Member Functions | |
| CMessageContainer () | |
| CMessageContainer (const CMessageContainer &container) | |
| CMessageContainer & | operator= (const CMessageContainer &container) |
| int | GetMessagesCount () const |
| Get the number of messages in the container. | |
| virtual void | AddChildContainer (IHierarchicalMessageContainer *childContainerPtr) |
| Add a child message container to this object. | |
| void | SetSlaveConsumer (ilog::IMessageConsumer *consumerPtr) |
| Set slave message consumer. | |
| void | SetMaxMessageCount (int maxMessageCount=-1) |
| Set maximal number of messages in the container. | |
| virtual bool | Serialize (iser::IArchive &archive) override |
| virtual istd::IInformationProvider::InformationCategory | GetWorstCategory () const override |
| virtual Messages | GetMessages () const override |
| virtual void | ClearMessages () override |
| virtual bool | IsMessageSupported (int messageCategory=-1, int messageId=-1, const istd::IInformationProvider *messagePtr=NULL) const override |
| Check if a message is supported by this consumer. | |
| virtual void | AddMessage (const IMessageConsumer::MessagePtr &messagePtr) override |
| Adds a message to this consumer. | |
| virtual int | GetChildsCount () const override |
| virtual IHierarchicalMessageContainer * | GetChild (int index) const override |
| virtual int | GetSupportedOperations () const override |
| Get set of flags for supported operations. | |
| virtual bool | CopyFrom (const istd::IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override |
| Copy this object from another one. | |
| virtual bool | IsEqual (const istd::IChangeable &object) const override |
| Compare this object with another object. | |
| virtual istd::TUniqueInterfacePtr< istd::IChangeable > | CloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const override |
| Make a copy of this object. | |
| virtual bool | ResetData (CompatibilityMode mode) override |
| Reset data to its default state. | |
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. | |
Public Member Functions inherited from istd::IPolymorphic | |
| virtual | ~IPolymorphic () |
Static Public Member Functions | |
| template<typename MessageType > | |
| static bool | RegisterMessageType (const QByteArray &messageTypeId=QByteArray()) |
| Register a new message type. | |
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. | |
Protected Types | |
| typedef QVector< IHierarchicalMessageContainer * > | Childs |
Protected Attributes | |
| Messages | m_messages |
| Childs | m_childContainers |
| ilog::IMessageConsumer * | m_slaveConsumerPtr |
| int | m_maxMessagesCount |
| int | m_worstCategory |
Protected Attributes inherited from istd::THierarchicalBase< IHierarchicalMessageContainer > | |
| typename Base::InterfaceType * | m_parentPtr |
Additional Inherited Members | |
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 |
Basic implementation of a message container.
Definition at line 30 of file CMessageContainer.h.
|
protected |
Definition at line 106 of file CMessageContainer.h.
| ilog::CMessageContainer::CMessageContainer | ( | ) |
| ilog::CMessageContainer::CMessageContainer | ( | const CMessageContainer & | container | ) |
|
virtual |
Add a child message container to this object.
GetMessages returns messages from this container and all its children.
|
overridevirtual |
Adds a message to this consumer.
This method transfers ownership of the message to the consumer via shared pointer. The consumer may store, display, forward, or otherwise process the message.
Most implementations deliver messages asynchronously using Qt signals/slots to ensure thread safety when messages are added from worker threads.
| messagePtr | Shared pointer to the message. After this call, the message is owned by the shared pointer and will be automatically deleted when no longer referenced. |
Implements ilog::IMessageConsumer.
Reimplemented in ilog::CLogComp, and iloggui::CLogGuiComp.
|
overridevirtual |
Reimplemented in iloggui::CLogGuiComp.
|
overridevirtual |
Make a copy of this object.
Reimplemented from istd::IChangeable.
|
overridevirtual |
Copy this object from another one.
Default implementation in istd::IChangeable does nothing.
Reimplemented from istd::IChangeable.
|
overridevirtual |
Reimplemented from istd::THierarchicalBase< IHierarchicalMessageContainer >.
|
overridevirtual |
Reimplemented from istd::THierarchicalBase< IHierarchicalMessageContainer >.
|
overridevirtual |
| int ilog::CMessageContainer::GetMessagesCount | ( | ) | const |
Get the number of messages in the container.
|
overridevirtual |
Get set of flags for supported operations.
Reimplemented from istd::IChangeable.
|
overridevirtual |
|
overridevirtual |
Compare this object with another object.
| object | Object to be compared |
true if the objects are identical and false otherwise. Reimplemented from istd::IChangeable.
|
overridevirtual |
Check if a message is supported by this consumer.
This method allows consumers to filter messages based on category, ID, or the complete message object. It's used to determine whether a message should be sent to this consumer before actually adding it.
| messageCategory | Category of message (IC_NONE, IC_INFO, IC_WARNING, IC_ERROR, IC_CRITICAL) or -1 if category check should be skipped. |
| messageId | Numeric ID of message or -1 if ID check should be skipped. Message IDs are application-defined for filtering and routing. |
| messagePtr | Optional pointer to complete message object for detailed inspection, or NULL if not needed. The consumer will not store this pointer. |
Implements ilog::IMessageConsumer.
Reimplemented in ilog::CLogComp, and iloggui::CLogGuiComp.
| CMessageContainer & ilog::CMessageContainer::operator= | ( | const CMessageContainer & | container | ) |
|
static |
Register a new message type.
Only messages of known (registered) types can be serialized.
Definition at line 118 of file CMessageContainer.h.
References istd::TComposedFactory< InterfaceType >::RegisterFactory().
|
overridevirtual |
Reset data to its default state.
Default implementation in istd::IChangeable does nothing.
true if the operation was successful, and false otherwise. Reimplemented from istd::IChangeable.
|
overridevirtual |
| void ilog::CMessageContainer::SetMaxMessageCount | ( | int | maxMessageCount = -1 | ) |
Set maximal number of messages in the container.
If the container is full and a new message is added, the oldest message will be removed.
| maxMessageCount | maximal number of messages in the container. If the value equals -1, no limit is set for. |
| void ilog::CMessageContainer::SetSlaveConsumer | ( | ilog::IMessageConsumer * | consumerPtr | ) |
Set slave message consumer.
All incoming messages will be delegated to this object.
|
protected |
Definition at line 107 of file CMessageContainer.h.
|
protected |
Definition at line 110 of file CMessageContainer.h.
|
protected |
Definition at line 104 of file CMessageContainer.h.
|
protected |
Definition at line 109 of file CMessageContainer.h.
|
mutableprotected |
Definition at line 111 of file CMessageContainer.h.