#include <outcome.h>
Public Member Functions | |
| outcome (int value=0) | |
| Represents the completion of an operation as a particular "value". | |
| ~outcome () | |
| destructor resets outcome value. | |
| bool | operator== (const outcome &to_compare) const |
| Returns true if this outcome is equal to "to_compare". | |
| bool | operator!= (const outcome &to_compare) const |
| Returns true if this outcome is not equal to "to_compare". | |
| bool | operator== (int to_compare) const |
| Returns true if this outcome is equal to the integer "to_compare". | |
| bool | operator!= (int to_compare) const |
| Returns true if this outcome is not equal to the integer "to_compare". | |
| int | value () const |
| void | pack (byte_array &packed_form) const |
| bool | unpack (byte_array &packed_form) |
| int | packed_size () const |
NOTE: this class supports packing but is not derived from packable; this is totally intentional. There are absolutely no virtual methods supported by an outcome; it is not intended for extension through inheritance. We would really like the impact of an instantiated outcome object to be about the same as a simple integer.
Definition at line 29 of file outcome.h.
| outcome::outcome | ( | int | value = 0 |
) | [inline] |
Represents the completion of an operation as a particular "value".
The outcomes partition the input space of the operation and represent the different conclusions possible during processing. Values for outcomes must be maintained on a system-wide basis as unique identifiers for them to be meaningful. Note that zero is reserved as a default outcome value. This usually translates to an outcome of OKAY.
| outcome::~outcome | ( | ) | [inline] |
| bool outcome::operator== | ( | const outcome & | to_compare | ) | const [inline] |
| bool outcome::operator!= | ( | const outcome & | to_compare | ) | const [inline] |
| bool outcome::operator== | ( | int | to_compare | ) | const [inline] |
| bool outcome::operator!= | ( | int | to_compare | ) | const [inline] |
| int outcome::value | ( | ) | const [inline] |
Definition at line 56 of file outcome.h.
Referenced by CHECK_STACK_RESULT(), xml_generator::outcome_name(), scheduling_common::outcome_name(), process_manager::outcome_name(), heavy_file_operations::outcome_name(), common::outcome_name(), spocket::outcome_name(), communication_commons::outcome_name(), cromp_transaction::outcome_name(), cromp_common::outcome_name(), file_transfer_infoton::pack(), cromp_common::send_buffer(), and test_stack_with_objects().
| void outcome::pack | ( | byte_array & | packed_form | ) | const |
Definition at line 21 of file outcome.cpp.
References basis::attach().
Referenced by security_infoton::pack(), encryption_infoton::pack(), occurrence::pack(), and unhandled_request::pack().
| bool outcome::unpack | ( | byte_array & | packed_form | ) |
Definition at line 24 of file outcome.cpp.
References basis::detach().
Referenced by security_infoton::unpack(), encryption_infoton::unpack(), occurrence::unpack(), and unhandled_request::unpack().
| int outcome::packed_size | ( | ) | const [inline] |
1.5.1