Skip to content

Inscoper::Recipe

Recipe class represents the protocol to create a sequence of operations. More...

#include <Recipe.h>

Public Functions

Name
Recipe()
Default constructor.
Recipe(const std::string & name)
Constructor with name.
~Recipe()
Default destructor.
void fromXML(Inscoper::XMLNode & xml)
Load from XML.
void toXML(Inscoper::XMLNode & xmlParent)
Save to XML.
const std::string & getName() const
Get the recipe name.
void setName(const std::string & name)
Set the recipe name.
const std::vector< Inscoper::RecipeElementPtr > & getRecipeElements() const
Get recipe elements.
void setRecipeElementList(const std::vector< Inscoper::RecipeElementPtr > & recipeElements)
Set recipe elements.
void addRecipeElement(const Inscoper::RecipeElementPtr & recipeElement)
Add a recipe element.

Detailed Description

class Inscoper::Recipe;

Recipe class represents the protocol to create a sequence of operations.

A Recipe defines an ordered list of recipe elements that controls the creation of a sequence of operations.

Public Functions Documentation

function Recipe

Recipe()

Default constructor.

Initializes a new instance of the Recipe class.

function Recipe

explicit Recipe(
    const std::string & name
)

Constructor with name.

Parameters:

  • name : The name of the recipe

Initializes a new instance of the Recipe class with a specified name.

function ~Recipe

~Recipe()

Default destructor.

function fromXML

void fromXML(
    Inscoper::XMLNode & xml
)

Load from XML.

Parameters:

  • xml : The XML node containing recipe information

Exceptions:

Populates the recipe information from an XML node.

function toXML

void toXML(
    Inscoper::XMLNode & xmlParent
)

Save to XML.

Parameters:

  • xmlParent : The parent XML node

Exceptions:

Exports the recipe information to an XML node attached to the parent node.

function getName

const std::string & getName() const

Get the recipe name.

Return: The name of the recipe

Retrieves the name of the recipe.

function setName

void setName(
    const std::string & name
)

Set the recipe name.

Parameters:

  • name : The name of the recipe

Sets the name of the recipe.

function getRecipeElements

const std::vector< Inscoper::RecipeElementPtr > & getRecipeElements() const

Get recipe elements.

Return: The list of recipe elements

Retrieves the list of elements that compose the recipe.

function setRecipeElementList

void setRecipeElementList(
    const std::vector< Inscoper::RecipeElementPtr > & recipeElements
)

Set recipe elements.

Parameters:

  • recipeElements : The list of recipe elements

Replaces the current list of recipe elements.

function addRecipeElement

void addRecipeElement(
    const Inscoper::RecipeElementPtr & recipeElement
)

Add a recipe element.

Parameters:

  • recipeElement : The recipe element to add

Appends a recipe element at the end of the recipe's list.


Updated on 2026-04-02 at 10:55:36 +0200