OpenASIP
2.0
|
#include <UnconditionalGuardEncoding.hh>
Public Member Functions | |
UnconditionalGuardEncoding (bool inverted, unsigned int encoding, GuardField &parent) | |
UnconditionalGuardEncoding (const ObjectState *state, GuardField &parent) | |
virtual | ~UnconditionalGuardEncoding () |
virtual ObjectState * | saveState () const |
Public Member Functions inherited from GuardEncoding | |
virtual | ~GuardEncoding () |
GuardField * | parent () const |
bool | isGuardInverted () const |
unsigned int | encoding () const |
Static Public Attributes | |
static const std::string | OSNAME_UNCONDITIONAL_GUARD_ENCODING = "uc_guard_encoding" |
ObjectState name for unconditional guard encoding. More... | |
Static Public Attributes inherited from GuardEncoding | |
static const std::string | OSNAME_GUARD_ENCODING = "guard_encoding" |
ObjectState name for guard encoding. More... | |
static const std::string | OSKEY_INVERTED = "inverted" |
ObjectState attribute key for invert flag. More... | |
static const std::string | OSKEY_ENCODING = "encoding" |
ObjectState attribute key for encoding. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from GuardEncoding | |
GuardEncoding (bool inverted, unsigned int encoding) | |
GuardEncoding (const ObjectState *state) | |
void | setParent (GuardField *parent) |
The UnconditionalGuardEncoding class maps always true guard term to a control code.
Instances of this class are always registered to a guard field.
Definition at line 47 of file UnconditionalGuardEncoding.hh.
UnconditionalGuardEncoding::UnconditionalGuardEncoding | ( | bool | inverted, |
unsigned int | encoding, | ||
GuardField & | parent | ||
) |
The constructor.
Registers the encoding to the given guard field automatically.
inverted | Indicates whether the encoding is for always-true or always-false guard expression. |
encoding | The encoding for unconditional guard. |
parent | The parent guard field. |
ObjectAlreadyExists | If the guard field has an encoding for the same unconditional guard expression already, or if the given encoding is already assigned. |
Definition at line 58 of file UnconditionalGuardEncoding.cc.
References GuardField::addGuardEncoding(), GuardEncoding::parent(), and GuardEncoding::setParent().
UnconditionalGuardEncoding::UnconditionalGuardEncoding | ( | const ObjectState * | state, |
GuardField & | parent | ||
) |
The constructor.
Loads the state of the object from the given ObjectState instance.
state | The ObjectState instance. |
parent | The parent guard field. |
ObjectStateLoadingException | If an error occurs while loading the state. |
ObjectAlreadyExists | If the guard field has an encoding for the same unconditional guard expression already, of if the encoding in the ObjectState instance is already assigned. |
Definition at line 79 of file UnconditionalGuardEncoding.cc.
References GuardField::addGuardEncoding(), ObjectState::name(), OSNAME_UNCONDITIONAL_GUARD_ENCODING, GuardEncoding::parent(), and GuardEncoding::setParent().
|
virtual |
The destructor.
Definition at line 95 of file UnconditionalGuardEncoding.cc.
References GuardEncoding::parent(), GuardField::removeUnconditionalGuardEncoding(), and GuardEncoding::setParent().
|
virtual |
Saves the state of the object to an ObjectState instance.
Reimplemented from GuardEncoding.
Definition at line 108 of file UnconditionalGuardEncoding.cc.
References OSNAME_UNCONDITIONAL_GUARD_ENCODING, GuardEncoding::saveState(), and ObjectState::setName().
|
static |
ObjectState name for unconditional guard encoding.
Definition at line 57 of file UnconditionalGuardEncoding.hh.
Referenced by BEMSerializer::guardFieldToFile(), saveState(), and UnconditionalGuardEncoding().