|
ACF $AcfVersion:0$
|
Common interface for a message container. More...
#include <IMessageContainer.h>
Public Types | |
| enum | ChangeFlags { CF_MESSAGE_ADDED = 0x1d32820 , CF_MESSAGE_REMOVED , CF_RESET } |
| Data model change notification flags. More... | |
| typedef std::list< IMessageConsumer::MessagePtr > | Messages |
| List type for storing message shared pointers. | |
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 istd::IInformationProvider::InformationCategory | GetWorstCategory () const =0 |
| Get the worst (highest severity) message category in the container. | |
| virtual Messages | GetMessages () const =0 |
| Retrieve all messages currently in the container. | |
| virtual void | ClearMessages ()=0 |
| Remove all message items from the container. | |
Public Member Functions inherited from iser::ISerializable | |
| virtual bool | Serialize (IArchive &archive)=0 |
| Load or store state of this object as a archive stream. | |
| virtual quint32 | GetMinimalVersion (int versionId) const |
| Get minimal needed version to correct storing of this data. | |
Public Member Functions inherited from istd::IChangeable | |
| virtual int | GetSupportedOperations () const |
| Get set of flags for supported operations. | |
| virtual bool | CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) |
| Copy this object from another one. | |
| virtual bool | IsEqual (const IChangeable &object) const |
| Compare this object with another object. | |
| virtual istd::TUniqueInterfacePtr< istd::IChangeable > | CloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const |
| Make a copy of this object. | |
| virtual bool | ResetData (CompatibilityMode mode=CM_WITHOUT_REFS) |
| Reset data to its default state. | |
| 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 () |
Additional Inherited Members | |
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 Member Functions inherited from istd::IChangeable | |
| virtual void | OnBeginChanges () |
| Callback function for begin change event. | |
| virtual void | OnEndChanges (const ChangeSet &changeSet) |
| Callback function for end change event. | |
Common interface for a message container.
This interface extends ISerializable to provide storage and retrieval of log messages. It supports hierarchical organization, change notifications, and can track the worst (highest severity) message category encountered.
Message containers are typically used to store messages for later display, analysis, export, or replay. They integrate with the model-observer pattern for automatic UI updates when messages change.
Definition at line 67 of file IMessageContainer.h.
| typedef std::list<IMessageConsumer::MessagePtr> ilog::IMessageContainer::Messages |
List type for storing message shared pointers.
Definition at line 71 of file IMessageContainer.h.
Data model change notification flags.
These flags are used with the istd::IChangeable change notification system to inform observers of container state changes.
| Enumerator | |
|---|---|
| CF_MESSAGE_ADDED | A new message was added to the container. |
| CF_MESSAGE_REMOVED | A message was removed from the container. |
| CF_RESET | Container was reset/cleared of all messages. |
Definition at line 79 of file IMessageContainer.h.
|
pure virtual |
Remove all message items from the container.
Clears the container of all stored messages. For hierarchical containers, this only clears the current container, not child containers.
Observers are notified with CF_RESET change flag.
|
pure virtual |
Retrieve all messages currently in the container.
Returns a copy of the internal message list. For hierarchical containers, this includes messages from all child containers as well.
Messages are stored as shared pointers, so copying the list is efficient and safe. The returned messages are immutable and should not be modified.
|
pure virtual |
Get the worst (highest severity) message category in the container.
Scans all messages and returns the highest severity level encountered. This is useful for quick status checks without iterating all messages.
The severity order is: IC_NONE < IC_INFO < IC_WARNING < IC_ERROR < IC_CRITICAL