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

Represents the save information for a flow. More...

#include <flow_info.h>

Inheritance diagram for FlowSaveInfo:

Public Member Functions

 FlowSaveInfo ()
 Constructs an empty FlowSaveInfo object.
 FlowSaveInfo (const FlowConfig &config)
 Constructs a FlowSaveInfo object with the given configuration.
QString getid () const override
 Gets the ID of the flow.
QString getname () const override
 Gets the name of the flow.
QString getowner () const override
 Gets the owner of the flow.
bool getmodifiable () const override
 Checks if the flow is modifiable.
int getlinksTo () const override
 Gets the number of links to the flow.
Types::CallType gettype () const override
 Gets the type of the call.
koda::types::TypeReference getreturnType () const override
 Gets the return type of the property.
QVector< std::shared_ptr< IParameter > > getarguments () const override
 Gets the arguments of the flow.
QVector< std::shared_ptr< INode > > getnodes () const override
 Gets the nodes of the flow.
QVector< std::shared_ptr< ITransition > > gettransitions () const override
 Gets the transitions of the flow.
QVector< std::shared_ptr< ITransition > > gettransitions (const QString &id) const override
 Gets the transitions of the flow coming from a specific node.
void setId (const QString &arg)
 Sets the ID of the flow.
void setName (const QString &arg)
 Sets the name of the flow.
void setOwner (const QString &arg)
 Sets the owner of the flow.
void setModifiable (bool arg)
 Sets whether the flow is modifiable.
void setLinksTo (int arg)
 Sets the number of links to the flow.
void setType (Types::CallType arg)
 Sets the type of the call.
void setReturnType (const koda::types::TypeReference &arg)
 Sets the return type of the property.
void addArgument (std::shared_ptr< IParameter > arg)
 Adds an argument to the flow.
void setArgument (uint32_t index, std::shared_ptr< IParameter > arg)
 Sets an argument at a specific index in the flow.
std::shared_ptr< IParameter > getArgument (uint32_t index)
 Gets an argument at a specific index in the flow.
void removeArgument (std::shared_ptr< IParameter > arg)
 Removes an argument from the flow.
void addNode (std::shared_ptr< INode > arg)
 Adds a node to the flow.
void removeNode (std::shared_ptr< INode > arg)
 Removes a node from the flow.
QJsonObject toJson () const
 Converts the flow save info to a JSON object.

Static Public Member Functions

static FlowSaveInfo fromJson (const QJsonObject &data)
 Creates a FlowSaveInfo object from a JSON object.

Private Attributes

QString mName
 The ID of the flow.
QString mOwner
 The name of the flow.
bool mModifiable
 The owner of the flow.
int mLinksTo
 Whether the flow is modifiable.
Types::CallType mType
 The number of links to the flow.
koda::types::TypeReference mReturnType
 The type of the call.
QVector< std::shared_ptr< INode > > mNodes
 The return type of the property.
QVector< std::shared_ptr< IParameter > > mArguments
 A vector of shared pointers to INode objects representing the nodes.
QVector< std::shared_ptr< ITransition > > mTransitions
 A vector of shared pointers to IParameter objects representing the arguments.

Friends

QDataStream & operator<< (QDataStream &out, const FlowSaveInfo &info)
 Overloads the << operator to serialize a FlowSaveInfo object to a QDataStream.
QDataStream & operator>> (QDataStream &in, FlowSaveInfo &info)
 Overloads the >> operator to deserialize a FlowSaveInfo object from a QDataStream.

Detailed Description

Represents the save information for a flow.

Constructor & Destructor Documentation

◆ FlowSaveInfo()

FlowSaveInfo::FlowSaveInfo ( const FlowConfig & config)

Constructs a FlowSaveInfo object with the given configuration.

Parameters
configThe configuration to initialize the flow save info with.

Member Function Documentation

◆ addArgument()

void FlowSaveInfo::addArgument ( std::shared_ptr< IParameter > arg)

Adds an argument to the flow.

Parameters
argA shared pointer to an IParameter object representing the argument to add.

◆ addNode()

void FlowSaveInfo::addNode ( std::shared_ptr< INode > arg)

Adds a node to the flow.

Parameters
argA shared pointer to an INode object representing the node to add.

◆ fromJson()

FlowSaveInfo FlowSaveInfo::fromJson ( const QJsonObject & data)
static

Creates a FlowSaveInfo object from a JSON object.

Parameters
dataThe JSON object representing the flow save info.
Returns
FlowSaveInfo A new FlowSaveInfo object initialized with the data from the JSON object.

◆ getArgument()

std::shared_ptr< IParameter > FlowSaveInfo::getArgument ( uint32_t index)

Gets an argument at a specific index in the flow.

Parameters
indexThe index of the argument to get.
Returns
std::shared_ptr<IParameter> A shared pointer to the IParameter object representing the argument.

◆ getarguments()

QVector< std::shared_ptr< IParameter > > FlowSaveInfo::getarguments ( ) const
override

Gets the arguments of the flow.

Returns
QVector<std::shared_ptr<IParameter>> A vector of shared pointers to IParameter objects representing the arguments.

◆ getid()

QString FlowSaveInfo::getid ( ) const
override

Gets the ID of the flow.

Returns
QString The ID of the flow.

◆ getlinksTo()

int FlowSaveInfo::getlinksTo ( ) const
override

Gets the number of links to the flow.

Returns
int The number of links to the flow.

◆ getmodifiable()

bool FlowSaveInfo::getmodifiable ( ) const
override

Checks if the flow is modifiable.

Returns
bool True if the flow is modifiable, false otherwise.

◆ getname()

QString FlowSaveInfo::getname ( ) const
override

Gets the name of the flow.

Returns
QString The name of the flow.

◆ getnodes()

QVector< std::shared_ptr< INode > > FlowSaveInfo::getnodes ( ) const
override

Gets the nodes of the flow.

Returns
QVector<std::shared_ptr<INode>> A vector of shared pointers to INode objects representing the nodes.

◆ getowner()

QString FlowSaveInfo::getowner ( ) const
override

Gets the owner of the flow.

Returns
QString The owner of the flow.

◆ getreturnType()

koda::types::TypeReference FlowSaveInfo::getreturnType ( ) const
override

Gets the return type of the property.

Returns
Types::PropertyTypes The return type of the property.

◆ gettransitions() [1/2]

QVector< std::shared_ptr< ITransition > > FlowSaveInfo::gettransitions ( ) const
override

Gets the transitions of the flow.

Returns
A QVector of shared pointers to ITransition objects.

◆ gettransitions() [2/2]

QVector< std::shared_ptr< ITransition > > FlowSaveInfo::gettransitions ( const QString & id) const
override

Gets the transitions of the flow coming from a specific node.

Parameters
idThe id of the node of interest.
Returns
A QVector of shared pointers to ITransition objects.

◆ gettype()

Types::CallType FlowSaveInfo::gettype ( ) const
override

Gets the type of the call.

Returns
Types::CallType The type of the call.

◆ removeArgument()

void FlowSaveInfo::removeArgument ( std::shared_ptr< IParameter > arg)

Removes an argument from the flow.

Parameters
argA shared pointer to an IParameter object representing the argument to remove.

◆ removeNode()

void FlowSaveInfo::removeNode ( std::shared_ptr< INode > arg)

Removes a node from the flow.

Parameters
argA shared pointer to an INode object representing the node to remove.

◆ setArgument()

void FlowSaveInfo::setArgument ( uint32_t index,
std::shared_ptr< IParameter > arg )

Sets an argument at a specific index in the flow.

Parameters
indexThe index of the argument to set.
argA shared pointer to an IParameter object representing the new argument.

◆ setId()

void FlowSaveInfo::setId ( const QString & arg)

Sets the ID of the flow.

Parameters
argThe new ID for the flow.

◆ setLinksTo()

void FlowSaveInfo::setLinksTo ( int arg)

Sets the number of links to the flow.

Parameters
argThe new number of links for the flow.

◆ setModifiable()

void FlowSaveInfo::setModifiable ( bool arg)

Sets whether the flow is modifiable.

Parameters
argTrue if the flow should be modifiable, false otherwise.

◆ setName()

void FlowSaveInfo::setName ( const QString & arg)

Sets the name of the flow.

Parameters
argThe new name for the flow.

◆ setOwner()

void FlowSaveInfo::setOwner ( const QString & arg)

Sets the owner of the flow.

Parameters
argThe new owner for the flow.

◆ setReturnType()

void FlowSaveInfo::setReturnType ( const koda::types::TypeReference & arg)

Sets the return type of the property.

Parameters
argThe new return type for the property.

◆ setType()

void FlowSaveInfo::setType ( Types::CallType arg)

Sets the type of the call.

Parameters
argThe new type of the call.

◆ toJson()

QJsonObject FlowSaveInfo::toJson ( ) const

Converts the flow save info to a JSON object.

Returns
QJsonObject The JSON representation of the flow save info.

◆ operator<<

QDataStream & operator<< ( QDataStream & out,
const FlowSaveInfo & info )
friend

Overloads the << operator to serialize a FlowSaveInfo object to a QDataStream.

Parameters
outThe QDataStream to write to.
infoThe FlowSaveInfo object to serialize.
Returns
QDataStream& A reference to the modified QDataStream.

◆ operator>>

QDataStream & operator>> ( QDataStream & in,
FlowSaveInfo & info )
friend

Overloads the >> operator to deserialize a FlowSaveInfo object from a QDataStream.

Parameters
inThe QDataStream to read from.
infoThe FlowSaveInfo object to deserialize into.
Returns
QDataStream& A reference to the modified QDataStream.

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