Skip to content

RecipeElement

Bases: object

RecipeElement class is the abstract base class for all recipe elements.

Defines the common interface for elements that can be part of a recipe.

fromXML(xml)

Load from XML.

Populates the recipe element information from an XML node.

Parameters:

Name Type Description Default
xml XMLNode

The XML node containing recipe element information

required

Raises:

Type Description
InscoperException

If an error occurs

toXML(xmlParent)

Save to XML.

Exports the recipe element information 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 recipe element type.

Retrieves the type of the recipe element.

Returns:

Type Description
int

The type of the recipe element