#include <MessageLog.h>

Public Types | |
| typedef std::vector< Message * > ::iterator | iterator |
| typedef std::vector< Message * > ::const_iterator | const_iterator |
| typedef ::size_t | size_t |
Public Member Functions | |
| virtual Message * | createMessage (const std::string &action, const std::string &component, const std::string &key, bool finalizeOnCreate=false, bool recurse=true)=0 |
| virtual Step * | createStep (const std::string &action, const std::string &component, const std::string &key, bool recurse=true)=0 |
| virtual const std::string & | getLogName () const =0 |
| virtual MessageLog::size_t | size () const =0 |
| virtual MessageLog::iterator | begin ()=0 |
| virtual MessageLog::const_iterator | begin () const =0 |
| virtual MessageLog::iterator | end ()=0 |
| virtual MessageLog::const_iterator | end () const =0 |
| virtual Message * | operator[] (MessageLog::size_t i)=0 |
| virtual const Message * | operator[] (MessageLog::size_t i) const =0 |
Static Public Member Functions | |
| static const std::string & | signalMessageAdded () |
| static const std::string & | signalMessageModified () |
| static const std::string & | signalMessageHidden () |
| static const std::string & | signalMessageDeleted () |
| static const std::string & | signalMessageDetached () |
Protected Member Functions | |
| virtual | ~MessageLog () |
A message log is displayed as a tab in the message log window and saved to a file of the same name. New messages and steps can be added with this interface. This interface can also be attached to receive Subject/Observer messages as data is added to the message log.
This subclass of Subject will notify upon the following conditions:
Definition at line 46 of file MessageLog.h.
| typedef std::vector<Message*>::iterator MessageLog::iterator |
An STL iterator type.
Has the semantics of an std::vector
Definition at line 52 of file MessageLog.h.
| typedef std::vector<Message*>::const_iterator MessageLog::const_iterator |
An STL iterator type.
Has the semantics of an std::vector
Definition at line 57 of file MessageLog.h.
| typedef ::size_t MessageLog::size_t |
| virtual MessageLog::~MessageLog | ( | ) | [protected, virtual] |
This will be cleaned up during application close.
Plug-ins do not need to destroy it.
Definition at line 234 of file MessageLog.h.
| static const std::string& MessageLog::signalMessageAdded | ( | ) | [static] |
Emitted with any<Message*> when a message is added to the log.
Definition at line 68 of file MessageLog.h.
| static const std::string& MessageLog::signalMessageModified | ( | ) | [static] |
Emitted with any<Message*> when a message in the log changes.
Definition at line 72 of file MessageLog.h.
| static const std::string& MessageLog::signalMessageHidden | ( | ) | [static] |
Emitted with any<Message*> when a message in the log is finalized.
Definition at line 76 of file MessageLog.h.
| static const std::string& MessageLog::signalMessageDeleted | ( | ) | [static] |
Emitted with any<Message*> when a message is deleted from the log.
Definition at line 80 of file MessageLog.h.
| static const std::string& MessageLog::signalMessageDetached | ( | ) | [static] |
Emitted with any<Message*> when a message is detached from the log.
Definition at line 84 of file MessageLog.h.
| virtual Message* MessageLog::createMessage | ( | const std::string & | action, | |
| const std::string & | component, | |||
| const std::string & | key, | |||
| bool | finalizeOnCreate = false, |
|||
| bool | recurse = true | |||
| ) | [pure virtual] |
Creates a new message to be added to a log.
Properties can be added to the message until it is finalized. Messages should be used to log information that is not necessary to repeat a process, but is informative only. This could include intermediate results from an algorithm or detailed information about a failure. A component and key must be provided to uniquely identify a message. The purpose of the component and key is to allow messages to be uniquely identified between versions of the software, so that any code that may subscribe to messages or parses the message log does not need to be regularly updated.
| action | A string describing the nature of the event that triggered the message. | |
| component | A string specifying the component that is requesting a message be created, for example the name of the plug-in suite logging the message. | |
| key | A string that specifies a identifier for this message being created. The key combined with the component shall uniquely identify a message. | |
| finalizeOnCreate | If this is true, the Message will be automatically finalized. | |
| recurse | If this is true, steps are recursed and the Message is added to the deepest un-finalized step. |
| virtual Step* MessageLog::createStep | ( | const std::string & | action, | |
| const std::string & | component, | |||
| const std::string & | key, | |||
| bool | recurse = true | |||
| ) | [pure virtual] |
Creates a new 'step' message to be added to a log.
Properties can be added to the message until it is finalized. 'Step' messages should be used to log information that is necessary to repeat a process. Steps can have sub-steps. After creating a 'step' message, all properties necessary to duplicate that step should be added to the message. A component and key must be provided to uniquely identify a step. The purpose of the component and key is to allow steps to be uniquely identified between versions of the software, so that any code that may subscribe to steps or parses the message log does not need to be regularly updated.
| action | A string describing the nature of the event that triggered the message. | |
| component | A string specifying the component that is requesting a step be created, for example the name of the plug-in suite logging the step. | |
| key | A string that specifies a identifier for this step being created. The key combined with the component shall uniquely identify a step. | |
| recurse | If this is true, steps are recursed and the new Step is added to the deepest un-finalized step. |
| virtual const std::string& MessageLog::getLogName | ( | ) | const [pure virtual] |
Get the name of this message log.
| virtual MessageLog::size_t MessageLog::size | ( | ) | const [pure virtual] |
Obtain the count of Messages in this MessageLog.
| virtual MessageLog::iterator MessageLog::begin | ( | ) | [pure virtual] |
Obtain an STL iterator over Messages in this MessageLog starting at the begining of the vector.
This iterator has the behavior of a std::vector::iterator
| virtual MessageLog::const_iterator MessageLog::begin | ( | ) | const [pure virtual] |
Obtain an STL const_iterator over Messages in this MessageLog starting at the begining of the vector.
This iterator has the behavior of a std::vector::const_iterator
| virtual MessageLog::iterator MessageLog::end | ( | ) | [pure virtual] |
Obtain an STL iterator over Messages in this MessageLog starting at the end of the vector.
This iterator has the behavior of a std::vector::iterator
| virtual MessageLog::const_iterator MessageLog::end | ( | ) | const [pure virtual] |
Obtain an STL const_iterator over Messages in this MessageLog starting at the end of the vector.
This iterator has the behavior of a std::vector::const_iterator
| virtual Message* MessageLog::operator[] | ( | MessageLog::size_t | i | ) | [pure virtual] |
Get the Message at index i.
This function has the same semantics as std::vector::operator[]. It does not ensure that i is a valid index.
| i | The index to return. |
| virtual const Message* MessageLog::operator[] | ( | MessageLog::size_t | i | ) | const [pure virtual] |