Inscoper::RecipeElementSimple¶
RecipeElementSimple class represents a basic recipe step with actions and conditions. More...
#include <RecipeElementSimple.h>
Inherits from Inscoper::RecipeElement
Public Functions¶
| Name | |
|---|---|
| RecipeElementSimple() Default constructor. |
|
| virtual | ~RecipeElementSimple() Default destructor. |
| virtual void | fromXML(Inscoper::XMLNode & xml) override Load from XML. |
| virtual void | toXML(Inscoper::XMLNode & xmlParent) override Save to XML. |
| virtual Inscoper::ERecipeElementType | getType() override Get the element type. |
| const std::string & | getDescription() const Get the description. |
| void | setDescription(const std::string & description) Set the description. |
| const Inscoper::SubDeviceId | getSubDeviceId() const Get the sub-device ID. |
| void | setSubDeviceId(const Inscoper::SubDeviceId subDeviceId) Set the sub-device ID. |
| const std::string & | getRecipeId() const Get the recipe ID. |
| void | setRecipeId(const std::string & recipeId) Set the recipe ID. |
| Inscoper::EFunctionType | getFunction() const Get the function type. |
| void | setFunction(Inscoper::EFunctionType function) Set the function type. |
| const std::string & | getValue() const Get the value. |
| void | setValue(const std::string & value) Set the value. |
| bool | getImage() const Check if this element will generate an image. |
| void | setImage(bool image) Set the image generation flag. |
| const std::vector< Inscoper::ValueConditionPtr > & | getValueConditionList() const Get value conditions. |
| void | setValueConditionList(const std::vector< Inscoper::ValueConditionPtr > & valueConditionList) Set value conditions. |
| void | addValueCondition(const Inscoper::ValueConditionPtr & valueCondition) Add a value condition. |
| const std::string & | getTagCondition() const Get the tag condition. |
| void | setTagCondition(const std::string & tagCondition) Set the tag condition. |
| bool | getOptimisation() const Check the optimization flag. |
| void | setOptimisation(bool optimisation) Set the optimization flag. |
| bool | hasValueCondition() Check for value conditions. |
| const std::string & | getCallId() Get the call ID. |
| void | setCallId(const std::string & callId) Set the call ID. |
| void | addOnCallSubRecipes(const std::vector< std::shared_ptr< RecipeElementSimple > > & elems) Add recipe elements to notify on call. |
| void | addOnCallSubRecipe(const std::shared_ptr< RecipeElementSimple > & elem) Add a recipe element to notify on call. |
| std::vector< std::string > | getDependencies() Get the list of recipe element call IDs that will, when called, notify this recipe element. |
| void | setRecipeCalled(const std::string & id) Set the recipe element as called. |
| const std::string & | getRecipeCallCondition() Get recipe call condition. |
| void | setRecipeCallCondition(const std::string & recipeCallCondition) Set recipe call condition. |
| std::map< std::string, bool > & | getRecipeCallState() Get recipe call states. |
| const std::vector< std::shared_ptr< RecipeElementSimple > > & | getRecipeCallSubRecipes() Get the recipe elements to notify when this element is called. |
Detailed Description¶
RecipeElementSimple class represents a basic recipe step with actions and conditions.
Note: This class is non-copyable and non-movable.
This is the main recipe element type, supporting actions on sub-devices, conditional execution based on tags or values, and optimization settings.
Public Functions Documentation¶
function RecipeElementSimple¶
Default constructor.
Initializes a new instance of the RecipeElementSimple class.
function ~RecipeElementSimple¶
Default destructor.
function fromXML¶
Load from XML.
Parameters:
- xml : The XML node containing the simple recipe element
Exceptions:
- InscoperException If an error occurs
Reimplements: Inscoper::RecipeElement::fromXML
Populates the simple recipe element from an XML node.
function toXML¶
Save to XML.
Parameters:
- xmlParent : The parent XML node
Exceptions:
- InscoperException If an error occurs
Reimplements: Inscoper::RecipeElement::toXML
Exports the simple recipe element to an XML node attached to the parent XML node.
function getType¶
Get the element type.
Return: The type (SIMPLE)
Reimplements: Inscoper::RecipeElement::getType
Retrieves the type of this recipe element.
function getDescription¶
Get the description.
Return: The description
Retrieves the description of the recipe element.
function setDescription¶
Set the description.
Parameters:
- description : The description
Sets the description of the recipe element.
function getSubDeviceId¶
Get the sub-device ID.
Return: The sub-device ID
Retrieves the ID of the sub-device associated with this element.
function setSubDeviceId¶
Set the sub-device ID.
Parameters:
- subDeviceId : The sub-device ID
Sets the ID of the sub-device associated with this element.
function getRecipeId¶
Get the recipe ID.
Return: The recipe ID
Retrieves the identifier of the recipe element.
function setRecipeId¶
Set the recipe ID.
Parameters:
- recipeId : The recipe ID
Sets the identifier of the recipe element.
function getFunction¶
Get the function type.
Return: The function type
Retrieves the function type to be executed on the sub-device.
function setFunction¶
Set the function type.
Parameters:
- function : The function type
Sets the function type to be executed on the sub-device.
function getValue¶
Get the value.
Return: The value
Retrieves the parameter value associated with the function call.
function setValue¶
Set the value.
Parameters:
- value : The value
Sets the parameter value associated with the function call.
function getImage¶
Check if this element will generate an image.
Return: True if an image will be generated, false otherwise
Determines if the function to be called by the element generates an image.
function setImage¶
Set the image generation flag.
Parameters:
- image : True if an image will be generated, false otherwise
Sets whether the function to be called will generate an image.
function getValueConditionList¶
Get value conditions.
Return: The list of value conditions
Retrieves the list of value conditions that must be met for this element to execute.
function setValueConditionList¶
Set value conditions.
Parameters:
- valueConditionList : The list of value conditions
Sets the list of value conditions that must be met for this element to execute.
function addValueCondition¶
Add a value condition.
Parameters:
- valueCondition : The value condition to add
Adds a value condition to the list.
function getTagCondition¶
Get the tag condition.
Return: The tag condition
Retrieves the tag condition required for execution.
function setTagCondition¶
Set the tag condition.
Parameters:
- tagCondition : The tag condition
Sets the tag condition required for execution.
function getOptimisation¶
Check the optimization flag.
Return: True if optimization is enabled, false otherwise
Determines if optimization is enabled for this element.
function setOptimisation¶
Set the optimization flag.
Parameters:
- optimisation : True to enable optimization, false to disable
Enables or disables optimization for this element.
function hasValueCondition¶
Check for value conditions.
Return: True if value conditions exist, false otherwise
Returns whether there are value conditions associated with this recipe element.
function getCallId¶
Get the call ID.
Return: The call ID
Retrieves the call ID associated with this element.
function setCallId¶
Set the call ID.
Parameters:
- callId : The call ID
Sets the call ID associated with this element.
function addOnCallSubRecipes¶
Add recipe elements to notify on call.
Parameters:
- elems : The list of recipe elements to add
Adds a list of simple recipe elements to notify when this recipe element is called.
function addOnCallSubRecipe¶
Add a recipe element to notify on call.
Parameters:
- elem : The recipe element to add
Adds a simple recipe element to notify when this recipe element is called.
function getDependencies¶
Get the list of recipe element call IDs that will, when called, notify this recipe element.
Return: The list of recipe element call IDs
Retrieves the list of recipe element call IDs that will, when called, notify this recipe element.
function setRecipeCalled¶
Set the recipe element as called.
Parameters:
- id : The call ID of the recipe element
Marks the recipe associated to the call ID as called.
function getRecipeCallCondition¶
Get recipe call condition.
Return: The recipe call condition
Retrieves the call condition of the recipe.
function setRecipeCallCondition¶
Set recipe call condition.
Parameters:
- recipeCallCondition : The recipe call condition
Sets the call condition of the recipe.
function getRecipeCallState¶
Get recipe call states.
Return: A map pairing the call ID with the execution state
Retrieves the states of recipe calls.
function getRecipeCallSubRecipes¶
Get the recipe elements to notify when this element is called.
Return: The list of recipe elements
Retrieves the list of recipe elements to notify when this element is called.
Updated on 2026-04-02 at 10:55:36 +0200