Skip to content

RecipeElementGroup

Bases: RecipeElement

RecipeElementGroup class represents a recipe element that holds other recipe elements.

This element allows nesting recipes by defining a group that refers to another recipe.

__init__()

Default constructor.

Initializes a new instance of the RecipeElementGroup class.

fromXML(xml)

Load from XML.

Populates the recipe element group from an XML node.

Parameters:

Name Type Description Default
xml XMLNode

The XML node containing recipe element group

required

Raises:

Type Description
InscoperException

If an error occurs

toXML(xmlParent)

Save to XML.

Exports the recipe element group to an XML node attached to the parent XML node.

Parameters:

Name Type Description Default
xmlParent XMLNode

The parent XML node

required

Raises:

Type Description
InscoperException

If an error occurs

getType()

Get the element type.

Retrieves the type of this recipe element (GROUP).

Returns:

Type Description
int

The type (GROUP)

getRecipeName()

Get the recipe name.

Retrieves the name of the recipe referenced by this group.

Returns:

Type Description
str

The recipe name

setRecipeName(recipeName)

Set the recipe name.

Sets the name of the recipe referenced by this group.

Parameters:

Name Type Description Default
recipeName string

The recipe name

required