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 () |
StatusObject & | operator= (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) |
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).
YGP::StatusObject::StatusObject | ( | ) |
Default constructor.
YGP::StatusObject::StatusObject | ( | type | t, | |
const std::string & | message | |||
) |
Constructor from a type and a message.
t | Type of the object | |
message | Message of the object |
YGP::StatusObject::StatusObject | ( | const StatusObject & | other | ) |
Copy constructor.
other | Object to copy |
YGP::StatusObject::~StatusObject | ( | ) | [virtual] |
Destructor.
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").
message | Message of the object |
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.
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).
t | Type of the object | |
message | Message of the object |