Public Slots |
Signals |
Public Member Functions |
Properties |
Private Member Functions |
Private Attributes |
List of all members
dnai::gcore::FunctionHandler Class Reference
#include <functionhandler.h>
Inheritance diagram for dnai::gcore::FunctionHandler:

Collaboration diagram for dnai::gcore::FunctionHandler:

Public Slots | |
void | onEntityAdded (::core::EntityID id, models::Entity &added) |
void | onEntityRemoved (::core::EntityID id, models::Entity &removed) |
Signals | |
void | instructionAdded (dnai::models::Entity *func, dnai::models::gui::Instruction *instruction) |
void | addInstructionError (quint32 func, quint32 instrType, QList< quint32 > const &args, QString const &msg) |
void | instructionRemoved (dnai::models::Entity *func, dnai::models::gui::Instruction *instruction) |
void | entryPointSet (dnai::models::Entity *func, dnai::models::gui::Instruction *entry) |
void | parameterSet (dnai::models::Entity *func, QString param) |
void | returnSet (dnai::models::Entity *func, QString ret) |
Public Member Functions | |
FunctionHandler (EntityManager &manager) | |
~FunctionHandler ()=default | |
void | setup () |
Q_INVOKABLE void | pendingParameter (quint32 func, QString const ¶mName) |
Q_INVOKABLE void | pendindRemoveParam (quint32 func, QString const ¶mName) |
Q_INVOKABLE void | pendingReturn (quint32 func, QString const &returnName) |
Q_INVOKABLE void | pendingRmReturn (quint32 func, QString const &returnName) |
Q_INVOKABLE void | setEntryPoint (quint32 function, quint32 instruction, bool save=true) const |
Q_INVOKABLE void | setParameter (quint32 func, QString const ¶mName, bool save=true) const |
Q_INVOKABLE void | setReturn (quint32 func, QString const &retName, bool save=true) const |
Q_INVOKABLE void | addInstruction (quint32 func, quint32 instrType, QList< quint32 > const &arguments, bool save=true) const |
Q_INVOKABLE void | removeInstruction (quint32 func, quint32 instruction, bool save=true) |
void | rebuildInstructions (QList< models::gui::Instruction * > instructions) |
void | onEntryPointSet (quint32 function, quint32 instruction) |
void | onSetEntryPointError (quint32 function, quint32 instruction, QString const &message) const |
void | onParameterSet (::core::EntityID function, QString const ¶mName) |
void | onSetParameterError (::core::EntityID function, QString const ¶mName, QString const &message) const |
void | onReturnSet (::core::EntityID function, QString const &returnName) |
void | onSetReturnError (::core::EntityID function, QString const &returnName, QString const &message) |
void | onInstructionAdded (::core::EntityID function,::core::INSTRUCTION type, std::list<::core::EntityID > const &arguments,::core::InstructionID instruction) |
void | onAddInstructionError (::core::EntityID function,::core::INSTRUCTION type, std::list<::core::EntityID > const &arguments, QString const &messsage) |
void | onInstructionRemoved (::core::EntityID function,::core::InstructionID instruction) |
void | onRemoveInstructionError (::core::EntityID funtion,::core::InstructionID instruction, QString msg) |
InstructionHandler * | instruction () |
Properties | |
InstructionHandler | instruction |
Private Member Functions | |
models::gui::declarable::Function * | getFunctionData (::core::EntityID function, bool throws=false) const |
std::list< quint32 > | getConstructionList (models::gui::Instruction *instr) const |
QList< QString > | getLinkedEntities (std::list< quint32 > const &construction) const |
models::gui::Instruction * | createInstruction (qint32 type, std::list< quint32 > const &constrution=std::list< quint32 >()) |
void | refreshPendingFunctionInstructions () |
FunctionHandler::refreshPendingFunctionInstructions. More... | |
QString | getInstructionHash (QUuid funcguid, qint32 type) const |
Private Attributes | |
EntityManager & | manager |
InstructionHandler | m_instruction |
std::queue< std::pair< quint32, QString > > | pendingParams |
std::queue< models::Entity * > | params |
std::queue< std::pair< quint32, QString > > | pendingRmParam |
std::queue< std::pair< quint32, QString > > | pendingRet |
std::queue< models::Entity * > | returns |
std::queue< std::pair< quint32, QString > > | pendingRmRet |
std::queue< models::gui::Instruction * > | pendingInstruction |
std::list< models::Entity * > | pendingFunctionInstructions |
QHash< QString, QStack< models::gui::Instruction * > > | removedInstructions |
QHash< QString, QStack< models::gui::Instruction * > > | addedInstructions |
QHash< models::gui::Instruction *, models::Entity * > | instructionsFunction |
QSet< models::gui::Instruction * > | pendingRebuild |
Constructor & Destructor Documentation
dnai::gcore::FunctionHandler::FunctionHandler | ( | EntityManager & | manager | ) |
|
default |
Member Function Documentation
void dnai::gcore::FunctionHandler::addInstruction | ( | quint32 | func, |
quint32 | instrType, | ||
QList< quint32 > const & | arguments, | ||
bool | save = true |
||
) | const |
|
signal |
|
private |
|
signal |
|
private |
|
private |
|
private |
|
private |
InstructionHandler* dnai::gcore::FunctionHandler::instruction | ( | ) |
|
signal |
|
signal |
void dnai::gcore::FunctionHandler::onAddInstructionError | ( | ::core::EntityID | function, |
::core::INSTRUCTION | type, | ||
std::list<::core::EntityID > const & | arguments, | ||
QString const & | messsage | ||
) |
|
slot |
|
slot |
void dnai::gcore::FunctionHandler::onEntryPointSet | ( | quint32 | function, |
quint32 | instruction | ||
) |
void dnai::gcore::FunctionHandler::onInstructionAdded | ( | ::core::EntityID | function, |
::core::INSTRUCTION | type, | ||
std::list<::core::EntityID > const & | arguments, | ||
::core::InstructionID | instruction | ||
) |
void dnai::gcore::FunctionHandler::onInstructionRemoved | ( | ::core::EntityID | function, |
::core::InstructionID | instruction | ||
) |
void dnai::gcore::FunctionHandler::onParameterSet | ( | ::core::EntityID | function, |
QString const & | paramName | ||
) |
void dnai::gcore::FunctionHandler::onRemoveInstructionError | ( | ::core::EntityID | funtion, |
::core::InstructionID | instruction, | ||
QString | msg | ||
) |
void dnai::gcore::FunctionHandler::onReturnSet | ( | ::core::EntityID | function, |
QString const & | returnName | ||
) |
void dnai::gcore::FunctionHandler::onSetEntryPointError | ( | quint32 | function, |
quint32 | instruction, | ||
QString const & | message | ||
) | const |
void dnai::gcore::FunctionHandler::onSetParameterError | ( | ::core::EntityID | function, |
QString const & | paramName, | ||
QString const & | message | ||
) | const |
void dnai::gcore::FunctionHandler::onSetReturnError | ( | ::core::EntityID | function, |
QString const & | returnName, | ||
QString const & | message | ||
) |
|
signal |
void dnai::gcore::FunctionHandler::pendindRemoveParam | ( | quint32 | func, |
QString const & | paramName | ||
) |
void dnai::gcore::FunctionHandler::pendingParameter | ( | quint32 | func, |
QString const & | paramName | ||
) |
void dnai::gcore::FunctionHandler::pendingReturn | ( | quint32 | func, |
QString const & | returnName | ||
) |
void dnai::gcore::FunctionHandler::pendingRmReturn | ( | quint32 | func, |
QString const & | returnName | ||
) |
void dnai::gcore::FunctionHandler::rebuildInstructions | ( | QList< models::gui::Instruction * > | instructions | ) |
|
private |
FunctionHandler::refreshPendingFunctionInstructions.
This function tries to declared function instructions for thoses who needed entity that wasn't created yet
Ex:
- A function has a list of instructions
- A getter is an instruction that need the id of a variable
- If the variable is not created yet, we can't declare the getter
- Then we need to wait until the variable is created
- So we push the function in a list
- Each time an entity is added, we try to redeclare the instructions
- If the redeclaration went fine, we erase the function from the list
- Either, we left the function in place
void dnai::gcore::FunctionHandler::removeInstruction | ( | quint32 | func, |
quint32 | instruction, | ||
bool | save = true |
||
) |
|
signal |
void dnai::gcore::FunctionHandler::setEntryPoint | ( | quint32 | function, |
quint32 | instruction, | ||
bool | save = true |
||
) | const |
void dnai::gcore::FunctionHandler::setParameter | ( | quint32 | func, |
QString const & | paramName, | ||
bool | save = true |
||
) | const |
void dnai::gcore::FunctionHandler::setReturn | ( | quint32 | func, |
QString const & | retName, | ||
bool | save = true |
||
) | const |
void dnai::gcore::FunctionHandler::setup | ( | ) |
Member Data Documentation
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Property Documentation
|
read |
The documentation for this class was generated from the following files:
- Gui/app/include/dnai/core/functionhandler.h
- Gui/app/GeneratedFiles/Debug/moc_functionhandler.cpp
- Gui/app/src/dnai/core/functionhandler.cpp