OpenASIP
2.0
|
#include <OperationTriggeredEncoding.hh>
Public Member Functions | |
OperationTriggeredEncoding (const std::string &name, InstructionFormat &parent) | |
OperationTriggeredEncoding (const ObjectState *state, InstructionFormat &parent) | |
~OperationTriggeredEncoding () | |
std::string | name () const |
void | setName (const std::string &name) |
void | addField (OperationTriggeredField &field) |
virtual int | childFieldCount () const |
virtual int | width () const |
virtual void | loadState (const ObjectState *state) |
virtual ObjectState * | saveState () const |
Public Member Functions inherited from Serializable | |
virtual | ~Serializable () |
Static Public Attributes | |
static const std::string | OSNAME_OTA_ENCODING |
static const std::string | OSKEY_OTA_ENCODING_NAME |
Private Attributes | |
std::string | name_ |
std::vector< OperationTriggeredField * > | fields_ |
Definition at line 44 of file OperationTriggeredEncoding.hh.
OperationTriggeredEncoding::OperationTriggeredEncoding | ( | const std::string & | name, |
InstructionFormat & | parent | ||
) |
The constructor.
Adds the instruction format to the parent binary encoding automatically.
name | Name of the instruction format. |
parent | The parent Instruction Format. |
Definition at line 54 of file OperationTriggeredEncoding.cc.
References InstructionFormat::addEncoding().
OperationTriggeredEncoding::OperationTriggeredEncoding | ( | const ObjectState * | state, |
InstructionFormat & | parent | ||
) |
The constructor.
Loads the state of the instruction format from the given ObjectState tree.
state | The ObjectState tree. |
parent | The parent binary encoding map. |
ObjectStateLoadingException | If an error occurs while loading the state. |
Definition at line 71 of file OperationTriggeredEncoding.cc.
References InstructionFormat::addEncoding(), and loadState().
OperationTriggeredEncoding::~OperationTriggeredEncoding | ( | ) |
void OperationTriggeredEncoding::addField | ( | OperationTriggeredField & | field | ) |
Definition at line 138 of file OperationTriggeredEncoding.cc.
References fields_.
Referenced by OperationTriggeredField::OperationTriggeredField().
|
virtual |
Returns the number of operation triggered fields.
Definition at line 117 of file OperationTriggeredEncoding.cc.
References fields_.
|
virtual |
Loads the state of the instruction format from the given ObjectState tree.
state | The ObjectState tree. |
ObjectStateLoadingException | If an error occurs while loading the state. |
Implements Serializable.
Definition at line 152 of file OperationTriggeredEncoding.cc.
References ObjectState::child(), ObjectState::childCount(), Exception::errorMessage(), ObjectState::name(), OSKEY_OTA_ENCODING_NAME, OperationTriggeredField::OSNAME_FIELD, setName(), and ObjectState::stringAttribute().
Referenced by OperationTriggeredEncoding().
std::string OperationTriggeredEncoding::name | ( | ) | const |
Returns the name of the instruction format.
Definition at line 95 of file OperationTriggeredEncoding.cc.
References name_.
Referenced by setName().
|
virtual |
Saves the state of the instruction format to an ObjectState tree.
Implements Serializable.
Definition at line 177 of file OperationTriggeredEncoding.cc.
References ObjectState::addChild(), fields_, name_, OSKEY_OTA_ENCODING_NAME, OSNAME_OTA_ENCODING, OperationTriggeredField::saveState(), and ObjectState::setAttribute().
Referenced by InstructionFormat::saveState().
void OperationTriggeredEncoding::setName | ( | const std::string & | name | ) |
Sets the name of the instruction format.
name | The name of the instruction format. |
Definition at line 106 of file OperationTriggeredEncoding.cc.
Referenced by loadState().
|
virtual |
Returns the bit width of the instruction format.
Definition at line 128 of file OperationTriggeredEncoding.cc.
References fields_, and OperationTriggeredField::width().
Referenced by InstructionFormat::width().
|
private |
Definition at line 76 of file OperationTriggeredEncoding.hh.
Referenced by addField(), childFieldCount(), saveState(), width(), and ~OperationTriggeredEncoding().
|
private |
Definition at line 74 of file OperationTriggeredEncoding.hh.
Referenced by name(), saveState(), and setName().
|
static |
Definition at line 69 of file OperationTriggeredEncoding.hh.
Referenced by loadState(), and saveState().
|
static |
Definition at line 68 of file OperationTriggeredEncoding.hh.
Referenced by InstructionFormat::loadState(), and saveState().