|
HAL
v4.5.0-254-g8f9f6a423
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
#include </home/runner/work/hal/hal/plugins/gui/include/gui/user_action/action_set_object_data.h>


Public Types | |
| enum | ActionType { UnknownAction , DeleteAction , CreateAction , ModifyAction , MoveAction } |
Public Member Functions | |
| ActionSetObjectData (ActionType act=UnknownAction, const DataTableEntry &dataEntry=DataTableEntry()) | |
| bool | exec () override |
| QString | tagname () const override |
| void | writeToXml (QXmlStreamWriter &xmlOut) const override |
| void | readFromXml (QXmlStreamReader &xmlIn) override |
| void | addToHash (QCryptographicHash &cryptoHash) const override |
| void | setChangeKeyAndOrCategory (QString oldCategory, QString oldKey) |
Public Member Functions inherited from hal::UserAction | |
| virtual | ~UserAction () |
| virtual UserActionObject | object () const |
| virtual void | setObject (const UserActionObject &obj) |
| int | compoundOrder () const |
| void | setCompoundOrder (int cmpord) |
| qint64 | timeStamp () const |
| QString | cryptographicHash (int recordNo) const |
| UserAction * | undoAction () const |
| QString | debugDump () const |
| void | setObjectLock (bool lock) |
| void | setParentObjectLock (bool lock) |
| bool | hasProjectModified () const |
Additional Inherited Members | |
Protected Member Functions inherited from hal::UserAction | |
| UserAction () | |
| void | writeParentObjectToXml (QXmlStreamWriter &xmlOut) const |
| void | readParentObjectFromXml (QXmlStreamReader &xmlIn) |
Static Protected Member Functions inherited from hal::UserAction | |
| static QString | setToText (const QSet< u32 > &set) |
| static QSet< u32 > | setFromText (const QString &s) |
| static QString | gridToText (const QHash< hal::Node, QPoint > &grid) |
| static QHash< hal::Node, QPoint > | gridFromText (const QString &txt) |
Protected Attributes inherited from hal::UserAction | |
| UserActionObject | mObject |
| UserActionObject | mParentObject |
| int | mCompoundOrder |
| UserAction * | mUndoAction |
| qint64 | mTimeStamp |
| bool | mObjectLock |
| bool | mParentObjectLock |
| bool | mProjectModified |
A user action that sets a data entry on a gate, net, module, or netlist.
Definition at line 37 of file action_set_object_data.h.
| Enumerator | |
|---|---|
| UnknownAction | |
| DeleteAction | |
| CreateAction | |
| ModifyAction | |
| MoveAction | |
Definition at line 41 of file action_set_object_data.h.
| hal::ActionSetObjectData::ActionSetObjectData | ( | ActionType | act = UnknownAction, |
| const DataTableEntry & | dataEntry = DataTableEntry() |
||
| ) |
Definition at line 17 of file action_set_object_data.cpp.
Referenced by exec().
|
overridevirtual |
Hook for derived classes to add parameter to cryptographic hash.
| cryptoHash | - Additional hash data. |
Reimplemented from hal::UserAction.
Definition at line 156 of file action_set_object_data.cpp.
References QCryptographicHash::addData(), hal::DataTableEntry::category, hal::DataTableEntry::dataType, hal::DataTableEntry::key, MoveAction, QString::toUtf8(), and hal::DataTableEntry::value.
|
overridevirtual |
Executes user interaction and returns true on success. Note: Each implementation of exec() must include a call to the exec() method of base class to store the UserAction object in history and to transfer its ownership.
true on success, false otherwise. Reimplemented from hal::UserAction.
Definition at line 26 of file action_set_object_data.cpp.
References ActionSetObjectData(), hal::DataTableEntry::category, CreateAction, hal::DataContainer::delete_data(), DeleteAction, hal::UserAction::exec(), hal::DataTableEntry::fromContainer(), hal::UserActionObjectType::Gate, hal::NetlistRelay::gateBooleanFunctionChanged(), hal::Netlist::get_gate_by_id(), hal::Netlist::get_module_by_id(), hal::Netlist::get_net_by_id(), hal::gNetlist, hal::gNetlistRelay, hal::UserActionObject::id(), hal::DataTableEntry::isNull(), hal::DataTableEntry::key, hal::UserAction::mObject, ModifyAction, hal::UserActionObjectType::Module, MoveAction, hal::UserAction::mUndoAction, hal::UserActionObjectType::Net, hal::UserAction::setObject(), hal::DataTableEntry::toContainer(), QString::toStdString(), hal::UserActionObject::type(), hal::UserAction::undoAction(), and UnknownAction.
|
overridevirtual |
Reads user interaction as well as arguments from xml macro file.
| xmlIn | - The xml reader. |
Reimplemented from hal::UserAction.
Definition at line 130 of file action_set_object_data.cpp.
References hal::DataTableEntry::category, hal::DataTableEntry::dataType, QStringList::indexOf(), hal::DataTableEntry::key, QXmlStreamReader::name(), QXmlStreamReader::readElementText(), QXmlStreamReader::readNextStartElement(), UnknownAction, and hal::DataTableEntry::value.
This function must be called when the key and/or category property of an already existing entry shall to be modified. Otherwise, instead of changing the 4 tupel from (oldKey, oldCat, oldType, oldVal) to (newKey, newCat, newType, newVal), a new entry would be inserted and both of them would coexist. (This also applies if, for example, one wants to only modify the category)
| oldKey | - The old key that is to "potentionally" overwritten. |
| oldCategory | - The old category that is to "potentionally" overwritten. |
Definition at line 177 of file action_set_object_data.cpp.
References MoveAction.
|
overridevirtual |
The xml tagname for the action is purely virtual and needs to be implemented in derived class.
Implements hal::UserAction.
Definition at line 110 of file action_set_object_data.cpp.
References hal::ActionSetObjectDataFactory::sFactory, and hal::UserActionFactory::tagname().
|
overridevirtual |
Persist user interaction in xml macro file.
| xmlOut | - The xml writer. |
Reimplemented from hal::UserAction.
Definition at line 115 of file action_set_object_data.cpp.
References hal::DataTableEntry::category, hal::DataTableEntry::dataType, hal::DataTableEntry::key, MoveAction, hal::DataTableEntry::value, and QXmlStreamWriter::writeTextElement().