![]() |
ICF 3.1.1.10
Technical documentation of ICF Libraries
|
Basic implementation of a message container. More...
#include <CMessageContainer.h>
Public Member Functions | |
| CMessageContainer () | |
| CMessageContainer (const CMessageContainer &container) | |
| int | GetMessagesCount () const |
| Get the number of messages in the container. | |
| const istd::IInformationProvider * | GetMessage (int index) const |
| Get access to the message stored in this 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. | |
| bool | Serialize (iser::IArchive &archive) override |
| istd::IInformationProvider::InformationCategory | GetWorstCategory () const override |
| Messages | GetMessages () const override |
| void | ClearMessages () override |
| bool | IsMessageSupported (int messageCategory=-1, int messageId=-1, const QByteArray *senderIdPtr=nullptr) const override |
| Check if some messge is supported. | |
| void | AddMessage (const IMessageConsumer::MessagePtr &messagePtr) override |
| Adds a message item to the container. | |
| int | GetChildsCount () const override |
| IHierarchicalMessageContainer * | GetChild (int index) const override |
| int | GetSupportedOperations () const override |
| Get set of flags for supported operations. | |
| bool | CopyFrom (const istd::IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override |
| Copy this object from another one. | |
| bool | IsEqual (const istd::IChangeable &object) const override |
| Compare this object with another object. | |
| std::unique_ptr< istd::IChangeable > | CloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const override |
| Make a copy of this object. | |
| bool | ResetData (CompatibilityMode mode) override |
| Reset data to its default state. | |
Public Member Functions inherited from istd::THierarchicalBase< IHierarchicalMessageContainer > | |
| THierarchicalBase () | |
| virtual void | SetParentPtr (typename IHierarchicalMessageContainer::InterfaceType *parentPtr) |
| int | GetHierarchicalFlags () const override |
| int | GetChildsCount () const override |
| typename IHierarchicalMessageContainer::InterfaceType * | GetChild (int index) const override |
| typename IHierarchicalMessageContainer::InterfaceType * | GetParent () const override |
Public Member Functions inherited from istd::TChangeDelegator< IHierarchicalMessageContainer > | |
| TChangeDelegator () | |
| TChangeDelegator (istd::IChangeable *slavePtr) | |
| virtual void | OnBeginChanges () |
| Callback function for begin change event. | |
| virtual void | OnEndChanges (const istd::IChangeable::ChangeSet &changeSet) |
| Callback function for end change event. | |
Public Member Functions inherited from istd::CChangeDelegator | |
| CChangeDelegator () | |
| CChangeDelegator (istd::IChangeable *slavePtr) | |
| virtual void | SetSlavePtr (istd::IChangeable *slavePtr) |
| Gets the slave object pointer. | |
| virtual istd::IChangeable * | GetSlavePtr () const |
| Sets the slave object pointer. | |
Public Member Functions inherited from istd::IChangeDelegator | |
Public Member Functions inherited from istd::IChangeable | |
| virtual QMutex * | GetChangesLock () const |
| Get mutex beeing locked during changes, if available. | |
| 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. | |
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 |
| istd::IInformationProvider::InformationCategory | m_worstCategory |
Protected Attributes inherited from istd::THierarchicalBase< IHierarchicalMessageContainer > | |
| typename IHierarchicalMessageContainer::InterfaceType * | m_parentPtr |
Additional Inherited Members | |
Public Types inherited from istd::THierarchicalBase< IHierarchicalMessageContainer > | |
| typedef istd::TChangeDelegator< IHierarchicalMessageContainer > | BaseClass |
Public Types inherited from istd::TChangeDelegator< IHierarchicalMessageContainer > | |
| typedef IHierarchicalMessageContainer | BaseClass |
| typedef CChangeDelegator | BaseClass2 |
Public Types inherited from istd::CChangeDelegator | |
| typedef istd::IChangeable | BaseClass |
Public Types inherited from istd::IChangeable | |
| enum | ChangeFlags { CF_ICF_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 , SO_CHANGE_LOCK = 1 << 5 } |
| 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... | |
Protected Member Functions inherited from istd::IChangeable | |
Basic implementation of a message container.
Definition at line 35 of file CMessageContainer.h.
|
protected |
Definition at line 115 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 item to the container.
Implements ilog::IMessageConsumer.
|
override |
|
overridevirtual |
Make a copy of this object.
You may check, if this functionality is supported over GetSupportedOperations().
Reimplemented from istd::IChangeable.
Reimplemented in imod::TModelWrap< ilog::CMessageContainer >.
|
overridevirtual |
Copy this object from another one.
Default implementation in istd::IChangeable does nothing. You may check, if this functionality is supported over GetSupportedOperations().
Reimplemented from istd::IChangeable.
Reimplemented in iser::TCopySerializedWrap< ilog::CMessageContainer >.
|
override |
|
override |
| const istd::IInformationProvider * ilog::CMessageContainer::GetMessage | ( | int | index | ) | const |
Get access to the message stored in this container.
|
override |
| 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.
Reimplemented in imod::TModelWrap< ilog::CMessageContainer >, and iser::TCopySerializedWrap< ilog::CMessageContainer >.
|
override |
|
overridevirtual |
Compare this object with another object.
| object | Object to be compared You may check, if this functionality is supported over GetSupportedOperations(). |
true if the objects are identical and false otherwise. Reimplemented from istd::IChangeable.
Reimplemented in iser::TCopySerializedWrap< ilog::CMessageContainer >.
|
overridevirtual |
Check if some messge is supported.
| messageCategory | category of message or -1 if undefined, |
| messageId | ID of message as defined in istd::IInformationProvider or -1 if undefined. |
| senderId | optional ID identifying the sender object. |
Implements ilog::IMessageConsumer.
|
static |
Register a new message type.
Only messages of known (registered) types can be serialized.
Definition at line 127 of file CMessageContainer.h.
References istd::CClassInfo::GetName(), and istd::TComposedFactory< InterfaceType >::RegisterFactory().
|
overridevirtual |
Reset data to its default state.
Default implementation in istd::IChangeable does nothing. You may check, if this functionality is supported over GetSupportedOperations().
true if the operation was successful, and false otherwise. Reimplemented from istd::IChangeable.
|
override |
| 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 116 of file CMessageContainer.h.
|
protected |
Definition at line 119 of file CMessageContainer.h.
|
protected |
Definition at line 113 of file CMessageContainer.h.
|
protected |
Definition at line 118 of file CMessageContainer.h.
|
mutableprotected |
Definition at line 120 of file CMessageContainer.h.
© Witold Gantzke and Kirill Lepskiy