| OpenASIP 2.2
    | 
#include <OperationTriggeredFormat.hh>


| Public Member Functions | |
| OperationTriggeredFormat (const std::string &name, Machine &owner) | |
| OperationTriggeredFormat (const ObjectState *state, Machine &owner) | |
| virtual | ~OperationTriggeredFormat () | 
| void | addOperation (const std::string &op) | 
| void | removeOperation (const std::string &op) | 
| int | operationCount () const | 
| std::string | operationAtIndex (int index) const | 
| bool | hasOperation (const std::string &opName) const | 
| void | addOperand (OperationTriggeredOperand &operand) | 
| std::vector< OperationTriggeredOperand * > | operands () const | 
| virtual void | setMachine (Machine &machine) | 
| virtual void | unsetMachine () | 
| virtual void | loadState (const ObjectState *state) | 
| virtual ObjectState * | saveState () const | 
|  Public Member Functions inherited from TTAMachine::Component | |
| virtual | ~Component () | 
| virtual TCEString | name () const | 
| virtual void | setName (const std::string &name) | 
| virtual Machine * | machine () const | 
| virtual void | ensureRegistration (const Component &component) const | 
| virtual bool | isRegistered () const | 
|  Public Member Functions inherited from Serializable | |
| virtual | ~Serializable () | 
| Static Public Attributes | |
| static const std::string | OSNAME_FORMAT = "ota-format" | 
| static const std::string | OSKEY_OPERATION = "ota-operation" | 
|  Static Public Attributes inherited from TTAMachine::Component | |
| static const std::string | OSNAME_COMPONENT = "component" | 
| ObjectState name for component. | |
| static const std::string | OSKEY_NAME = "name" | 
| ObjectState attribute key for the name of the component. | |
| Private Attributes | |
| std::vector< std::string > | operations_ | 
| std::vector< OperationTriggeredOperand * > | operands_ | 
| Additional Inherited Members | |
|  Protected Member Functions inherited from TTAMachine::Component | |
| Component (const std::string &name) | |
| Component (const ObjectState *state) | |
| void | internalSetMachine (Machine &machine) | 
| void | internalUnsetMachine () | 
|  Protected Member Functions inherited from TTAMachine::MachinePart | |
| MachinePart () | |
| virtual | ~MachinePart () | 
Definition at line 44 of file OperationTriggeredFormat.hh.
| TTAMachine::OperationTriggeredFormat::OperationTriggeredFormat | ( | const std::string & | name, | 
| Machine & | owner | ||
| ) | 
The constructor.
Registers the operation code encoding to the parent binary encoding automatically.
| parent | The parent OperationTriggeredFormat. | 
Definition at line 56 of file OperationTriggeredFormat.cc.
References setMachine().

| TTAMachine::OperationTriggeredFormat::OperationTriggeredFormat | ( | const ObjectState * | state, | 
| Machine & | owner | ||
| ) | 
The constructor
Loads the state of the operation code encoding 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 74 of file OperationTriggeredFormat.cc.
References loadState(), TTAMachine::Component::name(), setMachine(), Texts::TextGenerator::text(), MOMTextGenerator::TXT_IT_EXISTS_BY_NAME, and unsetMachine().

| 
 | virtual | 
Destructor.
Definition at line 100 of file OperationTriggeredFormat.cc.
References operands_, and unsetMachine().

| void TTAMachine::OperationTriggeredFormat::addOperand | ( | OperationTriggeredOperand & | operand | ) | 
Definition at line 151 of file OperationTriggeredFormat.cc.
References operands_.
Referenced by TTAMachine::OperationTriggeredOperand::OperationTriggeredOperand(), and TTAMachine::OperationTriggeredOperand::OperationTriggeredOperand().
| void TTAMachine::OperationTriggeredFormat::addOperation | ( | const std::string & | op | ) | 
Definition at line 108 of file OperationTriggeredFormat.cc.
References operations_.
Referenced by OTAOperationDialog::onOK().
| bool TTAMachine::OperationTriggeredFormat::hasOperation | ( | const std::string & | opName | ) | const | 
Definition at line 136 of file OperationTriggeredFormat.cc.
References operations_.
Referenced by OTAOperationDialog::addRISCVBaseOperations(), OTAOperationDialog::onOK(), and OTAOperationDialog::TransferDataToWindow().
| 
 | virtual | 
Loads the name of the component from the given ObjectState instance.
| state | The ObjectState instance. | 
| ObjectStateLoadingException | If the machine already contains same type of component with the same name. | 
Reimplemented from TTAMachine::Component.
Definition at line 185 of file OperationTriggeredFormat.cc.
References ObjectState::child(), ObjectState::childCount(), Exception::errorMessage(), TTAMachine::Component::loadState(), ObjectState::name(), operands_, operations_, OSKEY_OPERATION, OSNAME_FORMAT, TTAMachine::OperationTriggeredOperand::OSNAME_OPERAND, and ObjectState::stringValue().
Referenced by OperationTriggeredFormat().

| std::vector< OperationTriggeredOperand * > TTAMachine::OperationTriggeredFormat::operands | ( | ) | const | 
Definition at line 146 of file OperationTriggeredFormat.cc.
References operands_.
| std::string TTAMachine::OperationTriggeredFormat::operationAtIndex | ( | int | index | ) | const | 
Definition at line 127 of file OperationTriggeredFormat.cc.
References __func__, operationCount(), and operations_.
Referenced by BEMGenerator::addRiscvFormat(), and OTAFormatListDialog::updateOperationList().

| int TTAMachine::OperationTriggeredFormat::operationCount | ( | ) | const | 
Definition at line 122 of file OperationTriggeredFormat.cc.
References operations_.
Referenced by BEMGenerator::addRiscvFormat(), operationAtIndex(), and OTAFormatListDialog::updateOperationList().
| void TTAMachine::OperationTriggeredFormat::removeOperation | ( | const std::string & | op | ) | 
Definition at line 113 of file OperationTriggeredFormat.cc.
References operations_.
Referenced by OTAFormatListDialog::onDeleteOperation().
| 
 | virtual | 
Saves the state of the operation code encoding to an ObjectState tree.
Reimplemented from TTAMachine::Component.
Definition at line 221 of file OperationTriggeredFormat.cc.
References ObjectState::addChild(), operands_, operations_, OSKEY_OPERATION, OSNAME_FORMAT, TTAMachine::Component::saveState(), ObjectState::setName(), and ObjectState::setValue().

| 
 | virtual | 
Adds the OperationTriggeredFormat to the given machine.
| machine | Machine to which the OperationTriggeredFormat Format is added. | 
| ComponentAlreadyExists | If there already is another OperationTriggeredFormat Format by the same name or another empty OperationTriggeredFormat Format in the given machine. | 
Implements TTAMachine::Component.
Definition at line 165 of file OperationTriggeredFormat.cc.
References TTAMachine::Machine::addOperationTriggeredFormat(), TTAMachine::Component::internalSetMachine(), and TTAMachine::Component::machine().
Referenced by OperationTriggeredFormat(), and OperationTriggeredFormat().

| 
 | virtual | 
Removes the OperationTriggeredFormat Format from its machine.
The OperationTriggeredFormat Format is also deleted because it cannot be alone. It must be registered to a machine.
Implements TTAMachine::Component.
Definition at line 177 of file OperationTriggeredFormat.cc.
References assert, TTAMachine::Machine::deleteOperationTriggeredFormat(), TTAMachine::Component::internalUnsetMachine(), and TTAMachine::Component::machine().
Referenced by OperationTriggeredFormat(), and ~OperationTriggeredFormat().

| 
 | private | 
Definition at line 77 of file OperationTriggeredFormat.hh.
Referenced by addOperand(), loadState(), operands(), saveState(), and ~OperationTriggeredFormat().
| 
 | private | 
Definition at line 76 of file OperationTriggeredFormat.hh.
Referenced by addOperation(), hasOperation(), loadState(), operationAtIndex(), operationCount(), removeOperation(), and saveState().
| 
 | static | 
Definition at line 71 of file OperationTriggeredFormat.hh.
Referenced by loadState(), and saveState().
| 
 | static | 
Definition at line 70 of file OperationTriggeredFormat.hh.
Referenced by ADFSerializer::convertToMachineFormat(), ADFSerializer::convertToMDFFormat(), TTAMachine::Machine::loadState(), loadState(), and saveState().