Message Class Reference

This interface represents an individual message in a message log. More...

#include <MessageLog.h>

Inheritance diagram for Message:

Inheritance graph

List of all members.

Public Types

enum  ResultEnum { Success, Failure, Abort, Unresolved }
typedef EnumWrapper< ResultEnumResult

Public Member Functions

virtual bool addProperty (const std::string &name, const char *value)=0
virtual bool addProperty (const std::string &name, char value)=0
virtual bool addProperty (const std::string &name, unsigned char value)=0
virtual bool addProperty (const std::string &name, short value)=0
virtual bool addProperty (const std::string &name, unsigned short value)=0
virtual bool addProperty (const std::string &name, int value)=0
virtual bool addProperty (const std::string &name, unsigned int value)=0
virtual bool addProperty (const std::string &name, long value)=0
virtual bool addProperty (const std::string &name, unsigned long value)=0
virtual bool addProperty (const std::string &name, Int64 value)=0
virtual bool addProperty (const std::string &name, UInt64 value)=0
virtual bool addProperty (const std::string &name, float value)=0
virtual bool addProperty (const std::string &name, double value)=0
virtual bool addProperty (const std::string &name, const std::string &value)=0
virtual bool addProperty (const std::string &name, const Filename *value)=0
virtual bool addProperty (const std::string &name, const DateTime *value)=0
virtual bool addProperty (const std::string &name, const std::vector< char > &value)=0
virtual bool addProperty (const std::string &name, const std::vector< unsigned char > &value)=0
virtual bool addProperty (const std::string &name, const std::vector< short > &value)=0
virtual bool addProperty (const std::string &name, const std::vector< unsigned short > &value)=0
virtual bool addProperty (const std::string &name, const std::vector< int > &value)=0
virtual bool addProperty (const std::string &name, const std::vector< unsigned int > &value)=0
virtual bool addProperty (const std::string &name, const std::vector< long > &value)=0
virtual bool addProperty (const std::string &name, const std::vector< unsigned long > &value)=0
virtual bool addProperty (const std::string &name, const std::vector< Int64 > &value)=0
virtual bool addProperty (const std::string &name, const std::vector< UInt64 > &value)=0
virtual bool addProperty (const std::string &name, const std::vector< float > &value)=0
virtual bool addProperty (const std::string &name, const std::vector< double > &value)=0
virtual bool addProperty (const std::string &name, const std::vector< bool > &value)=0
virtual bool addProperty (const std::string &name, const std::vector< std::string > &value)=0
virtual bool addProperty (const std::string &name, const std::vector< const Filename * > &value)=0
virtual bool addBooleanProperty (const std::string &name, bool value)=0
virtual bool finalize ()=0
virtual bool isFinalized () const =0
virtual std::string getComponent () const =0
virtual std::string getKey () const =0
virtual const DynamicObjectgetProperties () const =0
virtual std::string getAction () const =0
virtual std::string propertyToString (const std::string &type, void *pValue) const =0
virtual std::string getStringId ()=0
virtual void serializeDate (std::string &date, std::string &time) const =0

Static Public Member Functions

static const std::string & signalMessageModified ()
static const std::string & signalHidden ()

Protected Member Functions

virtual ~Message ()


Detailed Description

This interface represents an individual message in a message log.

These messages can contain properties which describe the message in greater detail or provide useful parameters associated with a message.

Message is a subclass of Subject It will notify upon the following conditions:

Definition at line 247 of file MessageLog.h.


Member Typedef Documentation

typedef EnumWrapper<ResultEnum> Message::Result

The EnumWrapper contains a given enum value and provides a isValid() method which returns true if the contained enum value is valid.

Please see How To Use EnumWrapper for more information. The wrapped enum values are Message::ResultEnum.

Definition at line 264 of file MessageLog.h.


Member Enumeration Documentation

Specifies the result state of a step.

Enumerator:
Success  The step completed successfully.

Failure  The step failed to complete.

Abort  The step was aborted by the user.

Unresolved  The step has not yet completed.

Definition at line 253 of file MessageLog.h.


Constructor & Destructor Documentation

virtual Message::~Message (  )  [protected, virtual]

This will be cleaned up during application close.

Plug-ins do not need to destroy it.

Definition at line 441 of file MessageLog.h.


Member Function Documentation

static const std::string& Message::signalMessageModified (  )  [static]

Emitted with any<Message*> when a property is added to the message.

Definition at line 270 of file MessageLog.h.

static const std::string& Message::signalHidden (  )  [static]

Emitted with any<Message*> when a message is finalized.

Definition at line 274 of file MessageLog.h.

virtual bool Message::addProperty ( const std::string &  name,
const char *  value 
) [pure virtual]

Adds a property to a message.

Any number of properties can be added to a message.

Parameters:
name A string naming the property being added. These must be unique within a single message.
value The value of the property being added. This will be converted to a textual equivalent and recorded in the log.
Returns:
true if the property was successfully added; false otherwise.
Subject Notifications:
This method will notify signalMessageModified with any<Message*>.
See also:
DynamicObject::set

virtual bool Message::addProperty ( const std::string &  name,
char  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
unsigned char  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
short  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
unsigned short  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
int  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
unsigned int  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
long  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
unsigned long  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
Int64  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
UInt64  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
float  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
double  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::string &  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const Filename value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const DateTime value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::vector< char > &  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::vector< unsigned char > &  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::vector< short > &  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::vector< unsigned short > &  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::vector< int > &  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::vector< unsigned int > &  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::vector< long > &  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::vector< unsigned long > &  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::vector< Int64 > &  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::vector< UInt64 > &  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::vector< float > &  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::vector< double > &  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::vector< bool > &  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::vector< std::string > &  value 
) [pure virtual]

virtual bool Message::addProperty ( const std::string &  name,
const std::vector< const Filename * > &  value 
) [pure virtual]

virtual bool Message::addBooleanProperty ( const std::string &  name,
bool  value 
) [pure virtual]

Adds a property to a message.

Any number of properties can be added to a message. This method has a different name from the others because if C++ cannot find a proper overload for the addProperty method, it will implicitly convert it to a bool. If this method was called addProperty, it would be implicitly called by C++, without displaying a warning of any type during compilation.

Parameters:
name A string naming the property being added. These must be unique within a single message.
value The value of the property being added. This will be converted to a textual equivalent and recorded in the log.
Returns:
true if the property was successfully added; false otherwise.
Subject Notifications:
This method will notify signalMessageModified with any<Message*>.
See also:
DynamicObject::set

virtual bool Message::finalize (  )  [pure virtual]

If the message is a top level message, it is written to the log.

If it is a sub-message, it is closed to further modification. No properties can be added to the message or any submessages after finalization. The message pointer is no longer a valid pointer and must not be de-referenced. Upon finalization of a message, the log will notify all of its observers, passing the message to them.

Returns:
true if successfully closed or written; false otherwise.
Subject Notifications:
This method will notify signalHidden() with any<Message*>.

Implemented in Step.

virtual bool Message::isFinalized (  )  const [pure virtual]

Returns whether the message has been finalized by calling the finalize() method.

Returns:
true if the message has been finalized; false otherwise.

virtual std::string Message::getComponent (  )  const [pure virtual]

Returns the name of the component that created this Message.

Returns:
the name of the component that created this Message.

virtual std::string Message::getKey (  )  const [pure virtual]

Returns the name of the key associated with this Message.

The component and key of this Message should uniquely identify this particular message instance, even between new versions of the software.

Returns:
the name of the key associated with this Message.

virtual const DynamicObject* Message::getProperties (  )  const [pure virtual]

Get reference to the properties.

Returns:
A reference to the property vector

virtual std::string Message::getAction (  )  const [pure virtual]

Returns the string that was passed to the original createMessage or createStep call.

Returns:
The action string that the message was created with.

virtual std::string Message::propertyToString ( const std::string &  type,
void *  pValue 
) const [pure virtual]

Convert a property of an arbitrary (but valid) type to a string.

Parameters:
type the type of pValue
pValue pointer to the value
Returns:
a string representation of pValue
See also:
addProperty

virtual std::string Message::getStringId (  )  [pure virtual]

Return a string representation of the ID number of this Message.

An ID number is a serious of point separated numbers such that sub-messages of Step 1 are numbered 1.1, 1.2, etc. and sub-messages of Step 1.3 are numbered 1.3.1, 1.3.2, etc.

Returns:
a string representation of the ID

virtual void Message::serializeDate ( std::string &  date,
std::string &  time 
) const [pure virtual]

Returns a string reprsentation of the date and time associated with this Message.

Parameters:
date output parameter which will hold the date string
time output parameter which will hold the time string


Software Development Kit - Opticks 4.9.0 Build 16218