|
Maki
Formally verified low-code orchestration
|
Represents a save information object that implements IDocument. More...
#include <save_info.h>
Public Member Functions | |
| SaveInfo ()=default | |
| Default constructor. | |
| CanvasSaveInfo | canvasInfo () const |
| Get the canvas save info. | |
| void | setCanvasInfo (const CanvasSaveInfo &info) |
| Set the canvas save info. | |
| QVector< std::shared_ptr< INode > > | getnodes () const override |
| Get all nodes. | |
| const koda::types::TypeRegistry * | getTypesRegistry () const override |
| Get MAKI's type registry. | |
| QVector< const IParameter * > | getparameters () const override |
| Get all user defined mission parameters. | |
| void | addNode (std::shared_ptr< NodeSaveInfo > node) |
| Add a node. | |
| void | removeNode (const QString &nodeId) |
| Remove a node. | |
| QJsonObject | toJson () const |
| Convert the object to JSON format. | |
| QVector< std::shared_ptr< IParameter > > | getPossibleStates (const QString &nodeId) const |
| Get possible states for a node. | |
| QVector< std::shared_ptr< NodeSaveInfo > > | getPossibleCallers (const QString &nodeId, const Types::ControlTypes type) const |
| Get possible callers for a node. | |
| QVector< std::shared_ptr< FlowSaveInfo > > | getEventsFromNode (const QString &nodeId) const |
| Get events from a node. | |
| QVector< std::shared_ptr< FlowSaveInfo > > | getEventsOfTypeFromNode (const QString &nodeId, const QList< Types::CallType > &types) const |
| Get events of a specific type from a node. | |
| std::shared_ptr< FlowSaveInfo > | getEventFromNode (const QString &nodeId, const QString &flowName) const |
| Get an event from a node by name. | |
| std::shared_ptr< NodeSaveInfo > | getNodeWithId (const QString &nodeId) |
| Get a node by ID. | |
| std::shared_ptr< FlowSaveInfo > | getFlowWithId (const QString &flowId) |
| Get a flow by ID. | |
| std::shared_ptr< TransitionSaveInfo > | getTransitionWithId (const QString &transitionId) const |
| Get a transition by ID. | |
Static Public Member Functions | |
| static SaveInfo | fromJson (const QJsonObject &data) |
| Create a SaveInfo object from a JSON object. | |
Private Member Functions | |
| QVector< std::shared_ptr< NodeSaveInfo > > | findFamilyOfFlowNode (const QString &nodeId, const QVector< std::shared_ptr< INode > > &nodes, const Types::ControlTypes type) const |
| Find the family of a construct. | |
| std::shared_ptr< NodeSaveInfo > | findOwnerTaskOfFlowNode (const QString &nodeId, const std::shared_ptr< INode > node) const |
| Find the parent of a construct. | |
| QVector< std::shared_ptr< FlowSaveInfo > > | getEventsFromNode (const QString &nodeId, QVector< std::shared_ptr< INode > > nodes) const |
| Get events from a node. | |
| std::shared_ptr< NodeSaveInfo > | getNodeWithId (const QString &nodeId, const QVector< std::shared_ptr< INode > > &nodes) |
| Get a node by ID. | |
| std::shared_ptr< FlowSaveInfo > | getFlowWithId (const QString &flowId, const QVector< std::shared_ptr< INode > > &nodes) |
| Get a flow by ID. | |
| std::shared_ptr< TransitionSaveInfo > | getTransitionWithId (const QString &transitionId, const QVector< std::shared_ptr< INode > > &nodes) const |
| Get a transition by ID. | |
Private Attributes | |
| QVector< std::shared_ptr< INode > > | mStructuralNodes |
| The canvas save info. | |
| QVector< std::shared_ptr< FlowSaveInfo > > | mPipelines |
| A vector of shared pointers to INode objects representing structural nodes. | |
| QVector< maki::MissionParameter > | mMissionParameters |
| A vector of shared pointers to IFlow objects representing the available pipelines. | |
| std::shared_ptr< EventDispatcher< DocumentEvent > > | mScheduler |
| A vector to the available mission parameters. | |
Friends | |
| QDataStream & | operator<< (QDataStream &out, const SaveInfo &info) |
| Serialize the object to a QDataStream. | |
| QDataStream & | operator>> (QDataStream &in, SaveInfo &info) |
| Deserialize the object from a QDataStream. | |
Represents a save information object that implements IDocument.
| void SaveInfo::addNode | ( | std::shared_ptr< NodeSaveInfo > | node | ) |
Add a node.
| node | The node to add. |
| CanvasSaveInfo SaveInfo::canvasInfo | ( | ) | const |
Get the canvas save info.
|
private |
Find the family of a construct.
| nodeId | The ID of the node. |
| nodes | The vector of nodes to search. |
|
private |
Find the parent of a construct.
| nodeId | The ID of the node. |
| node | The node to search. |
|
static |
| std::shared_ptr< FlowSaveInfo > SaveInfo::getEventFromNode | ( | const QString & | nodeId, |
| const QString & | flowName ) const |
Get an event from a node by name.
| nodeId | The ID of the node. |
| flowName | The name of the event. |
| QVector< std::shared_ptr< FlowSaveInfo > > SaveInfo::getEventsFromNode | ( | const QString & | nodeId | ) | const |
Get events from a node.
| nodeId | The ID of the node. |
|
private |
Get events from a node.
| nodeId | The ID of the node. |
| nodes | The vector of nodes to search. |
| QVector< std::shared_ptr< FlowSaveInfo > > SaveInfo::getEventsOfTypeFromNode | ( | const QString & | nodeId, |
| const QList< Types::CallType > & | types ) const |
Get events of a specific type from a node.
| nodeId | The ID of the node. |
| type | The type of event. |
| std::shared_ptr< FlowSaveInfo > SaveInfo::getFlowWithId | ( | const QString & | flowId | ) |
Get a flow by ID.
| flowId | The ID of the flow. |
|
private |
Get a flow by ID.
| flowId | The ID of the flow. |
| nodes | The vector of nodes to search. |
|
override |
Get all nodes.
| std::shared_ptr< NodeSaveInfo > SaveInfo::getNodeWithId | ( | const QString & | nodeId | ) |
Get a node by ID.
| nodeId | The ID of the node. |
|
private |
Get a node by ID.
| nodeId | The ID of the node. |
| nodes | The vector of nodes to search. |
|
override |
Get all user defined mission parameters.
| QVector< std::shared_ptr< NodeSaveInfo > > SaveInfo::getPossibleCallers | ( | const QString & | nodeId, |
| const Types::ControlTypes | type ) const |
Get possible callers for a node.
| nodeId | The ID of the node. |
| QVector< std::shared_ptr< IParameter > > SaveInfo::getPossibleStates | ( | const QString & | nodeId | ) | const |
Get possible states for a node.
| nodeId | The ID of the node. |
| std::shared_ptr< TransitionSaveInfo > SaveInfo::getTransitionWithId | ( | const QString & | transitionId | ) | const |
Get a transition by ID.
| transitionId | The ID of the transition. |
|
private |
Get a transition by ID.
| transitionId | The ID of the transition. |
| nodes | The vector of nodes to search. |
|
override |
Get MAKI's type registry.
| void SaveInfo::removeNode | ( | const QString & | nodeId | ) |
Remove a node.
| node | The node to remove. |
| void SaveInfo::setCanvasInfo | ( | const CanvasSaveInfo & | info | ) |
Set the canvas save info.
| info | The new canvas save info. |
| QJsonObject SaveInfo::toJson | ( | ) | const |
|
friend |
Serialize the object to a QDataStream.
| out | The output stream. |
| info | The SaveInfo object to serialize. |
|
friend |
Deserialize the object from a QDataStream.
| in | The input stream. |
| info | The SaveInfo object to deserialize. |