OpenASIP
2.0
|
#include <GuardEncoding.hh>
Public Member Functions | |
virtual | ~GuardEncoding () |
GuardField * | parent () const |
bool | isGuardInverted () const |
unsigned int | encoding () const |
virtual ObjectState * | saveState () const |
Static Public Attributes | |
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... | |
Protected Member Functions | |
GuardEncoding (bool inverted, unsigned int encoding) | |
GuardEncoding (const ObjectState *state) | |
void | setParent (GuardField *parent) |
Private Attributes | |
bool | inverted_ |
The "invert" flag. More... | |
unsigned int | encoding_ |
The encoding. More... | |
GuardField * | parent_ |
The parent guard field. More... | |
GuardEncoding class captures the properties shared by all types of guard encoding.
Definition at line 45 of file GuardEncoding.hh.
|
virtual |
|
protected |
|
protected |
The constructor.
Loads the state of the object from the given ObjectState instance.
state | The ObjectState instance. |
ObjectStateLoadingException | If an error occurs while loading the state. |
Definition at line 65 of file GuardEncoding.cc.
References ObjectState::boolAttribute(), encoding_, Exception::errorMessage(), ObjectState::intAttribute(), inverted_, OSKEY_ENCODING, and OSKEY_INVERTED.
unsigned int GuardEncoding::encoding | ( | ) | const |
Returns the control code of the guard expression.
Definition at line 112 of file GuardEncoding.cc.
References encoding_.
Referenced by CodeCompressorPlugin::addBitsForGuardField(), GuardField::addGuardEncoding(), BEMTester::conflictsWithGuardEncoding(), CodeCompressorPlugin::encodeNOP(), GuardField::isAssigned(), printGuardFieldEncodings(), saveState(), GuardField::width(), DefaultDecoderGenerator::writeSquashSignalGenerationProcess(), and DefaultDecoderGenerator::writeSquashSignalSubstitution().
bool GuardEncoding::isGuardInverted | ( | ) | const |
Tells whether the guard expression is inverted.
Definition at line 101 of file GuardEncoding.cc.
References inverted_.
Referenced by GuardField::addGuardEncoding(), DefaultDecoderGenerator::findGuard(), GuardField::fuGuardEncoding(), GuardField::gprGuardEncoding(), GuardField::hasFUGuardEncoding(), GuardField::hasGPRGuardEncoding(), printGuardFieldEncodings(), GuardField::removeUnconditionalGuardEncoding(), and saveState().
GuardField * GuardEncoding::parent | ( | ) | const |
Returns the parent guard field.
Definition at line 90 of file GuardEncoding.cc.
References parent_.
Referenced by GuardField::addGuardEncoding(), DefaultDecoderGenerator::findGuard(), FUGuardEncoding::FUGuardEncoding(), GPRGuardEncoding::GPRGuardEncoding(), GuardField::removeGuardEncoding(), GuardField::removeUnconditionalGuardEncoding(), setParent(), UnconditionalGuardEncoding::UnconditionalGuardEncoding(), FUGuardEncoding::~FUGuardEncoding(), GPRGuardEncoding::~GPRGuardEncoding(), and UnconditionalGuardEncoding::~UnconditionalGuardEncoding().
|
virtual |
Saves the state of the object to an ObjectState instance.
Reimplemented in FUGuardEncoding, GPRGuardEncoding, and UnconditionalGuardEncoding.
Definition at line 123 of file GuardEncoding.cc.
References encoding(), isGuardInverted(), OSKEY_ENCODING, OSKEY_INVERTED, OSNAME_GUARD_ENCODING, and ObjectState::setAttribute().
Referenced by UnconditionalGuardEncoding::saveState(), FUGuardEncoding::saveState(), and GPRGuardEncoding::saveState().
|
protected |
Sets the parent pointer.
parent | The parent. |
Definition at line 137 of file GuardEncoding.cc.
References parent(), and parent_.
Referenced by FUGuardEncoding::FUGuardEncoding(), GPRGuardEncoding::GPRGuardEncoding(), UnconditionalGuardEncoding::UnconditionalGuardEncoding(), FUGuardEncoding::~FUGuardEncoding(), GPRGuardEncoding::~GPRGuardEncoding(), and UnconditionalGuardEncoding::~UnconditionalGuardEncoding().
|
private |
The encoding.
Definition at line 71 of file GuardEncoding.hh.
Referenced by encoding(), and GuardEncoding().
|
private |
The "invert" flag.
Definition at line 69 of file GuardEncoding.hh.
Referenced by GuardEncoding(), and isGuardInverted().
|
static |
ObjectState attribute key for encoding.
Definition at line 60 of file GuardEncoding.hh.
Referenced by GuardEncoding(), BEMSerializer::guardFieldToFile(), BEMSerializer::guardFieldToOM(), and saveState().
|
static |
ObjectState attribute key for invert flag.
Definition at line 58 of file GuardEncoding.hh.
Referenced by GuardEncoding(), BEMSerializer::guardFieldToFile(), BEMSerializer::guardFieldToOM(), and saveState().
|
static |
ObjectState name for guard encoding.
Definition at line 56 of file GuardEncoding.hh.
Referenced by saveState().
|
private |
The parent guard field.
Definition at line 73 of file GuardEncoding.hh.
Referenced by parent(), and setParent().