Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
Flow Class Reference

Represents a flow in the system. More...

#include <flow.h>

Public Member Functions

 Flow (const QString &flowName, std::shared_ptr< FlowSaveInfo > storage)
 Constructs a new Flow object.
QString id () const
 Returns the unique identifier of the flow.
int type () const
 Returns the type of the flow.
QString name () const
 Returns the name of the flow.
bool modifiable () const
 Checks if the flow is modifiable.
void removeNode (NodeItem *node)
 Removes a node from the flow.
void updateFlow (NodeItem *node, std::shared_ptr< NodeSaveInfo > storage)
 Updates a node in the flow with new save information.
QVector< std::shared_ptr< NodeSaveInfo > > getNodes () const
 Retrieves a list of all nodes in the flow.
QVector< TransitionItem * > transitions () const
 Returns a list of transitions connected to this node.
void addTransition (TransitionItem *transition)
 Adds a transition to the node.
void removeTransition (TransitionItem *transition)
 Removes a transition from the node.

Private Attributes

const QString mId
 Unique identifier for the flow.
QString mName
 Name of the flow.
std::shared_ptr< FlowSaveInfo > mStorage
 Storage for flow save information.
QVector< TransitionItem * > mTransitions
 List of transitions in this flow.

Detailed Description

Represents a flow in the system.

Constructor & Destructor Documentation

◆ Flow()

Flow::Flow ( const QString & flowName,
std::shared_ptr< FlowSaveInfo > storage )

Constructs a new Flow object.

Parameters
flowNameThe name of the flow.
storageA shared pointer to the flow save information.

Member Function Documentation

◆ addTransition()

void Flow::addTransition ( TransitionItem * transition)

Adds a transition to the node.

Parameters
transitionThe TransitionItem to add.

◆ getNodes()

QVector< std::shared_ptr< NodeSaveInfo > > Flow::getNodes ( ) const

Retrieves a list of all nodes in the flow.

Returns
QVector<std::shared_ptr<NodeSaveInfo>> The list of nodes.

◆ id()

QString Flow::id ( ) const

Returns the unique identifier of the flow.

Returns
const QString& The flow's ID.

◆ modifiable()

bool Flow::modifiable ( ) const

Checks if the flow is modifiable.

Returns
bool True if modifiable, false otherwise.

◆ name()

QString Flow::name ( ) const

Returns the name of the flow.

Returns
QString The flow's name.

◆ removeNode()

void Flow::removeNode ( NodeItem * node)

Removes a node from the flow.

Parameters
nodeThe node to remove.

◆ removeTransition()

void Flow::removeTransition ( TransitionItem * transition)

Removes a transition from the node.

Parameters
transitionThe TransitionItem to remove.

◆ transitions()

QVector< TransitionItem * > Flow::transitions ( ) const

Returns a list of transitions connected to this node.

Returns
The QVector of TransitionItem pointers.

◆ type()

int Flow::type ( ) const

Returns the type of the flow.

Returns
int The flow's type.

◆ updateFlow()

void Flow::updateFlow ( NodeItem * node,
std::shared_ptr< NodeSaveInfo > storage )

Updates a node in the flow with new save information.

Parameters
nodeThe node to update.
storageA shared pointer to the new node save information.

The documentation for this class was generated from the following files:
  • /__w/maki/maki/app/elements/flow.h
  • /__w/maki/maki/app/elements/flow.cpp