YGP::StatusObject Class Reference

Object holding status information. More...

List of all members.

Public Types

enum  type { UNDEFINED, INFO, WARNING, ERROR }

Public Member Functions

 StatusObject ()
 StatusObject (type t, const std::string &message)
 StatusObject (const StatusObject &other)
virtual ~StatusObject ()
StatusObjectoperator= (const StatusObject &other)
type getType () const
std::string getMessage () const
std::string getDetails () const
bool hasDetails () const
void clean ()
void generalize (const std::string &message)
void setMessage (type t, const std::string &message)


Detailed Description

Object holding status information.

This information can be extended by setting more information or gerneralized (setting a more general error text, while preserving the original information as sort of details).


Member Enumeration Documentation

The type of the object.

Enumerator:
UNDEFINED  The object contains no message.
INFO  The object contains an informational message.
WARNING  The object contains a warning message.
ERROR  The object contains an error.


Constructor & Destructor Documentation

YGP::StatusObject::StatusObject (  ) 

Default constructor.

YGP::StatusObject::StatusObject ( type  t,
const std::string &  message 
)

Constructor from a type and a message.

Parameters:
t Type of the object
message Message of the object

YGP::StatusObject::StatusObject ( const StatusObject other  ) 

Copy constructor.

Parameters:
other Object to copy

YGP::StatusObject::~StatusObject (  )  [virtual]

Destructor.


Member Function Documentation

void YGP::StatusObject::clean (  )  [inline]

Cleans the object (sets it again to undefined).

void YGP::StatusObject::generalize ( const std::string &  message  ) 

Sets a new status message (old messages are preserved as "details").

Parameters:
message Message of the object
Remarks:
- The message replaces existing ones
  • The old messages are accessable as "details"

std::string YGP::StatusObject::getDetails (  )  const [inline]

Returns the details of the message (after the object has been abstracted).

std::string YGP::StatusObject::getMessage (  )  const [inline]

Returns the message.

type YGP::StatusObject::getType (  )  const [inline]

Returns the type of the message.

bool YGP::StatusObject::hasDetails (  )  const [inline]

Returns if the message has details.

StatusObject & YGP::StatusObject::operator= ( const StatusObject other  ) 

Assignment operator.

Parameters:
other Object to copy the values from

void YGP::StatusObject::setMessage ( type  t,
const std::string &  message 
)

Sets a new status message (old messages are preserved).

Parameters:
t Type of the object
message Message of the object
Remarks:
- The message is appended to existing ones
  • If the passed type is more important than the old one, it is changed


The documentation for this class was generated from the following files:

YGP Version 0.9.31 - Generated on Wed Nov 18 11:25:28 2009 by doxygen 1.5.8