Kanzi 3.9.10
kanzi::NodeEffectTemplate2D Class Reference

Use NodeEffectTemplate2D to instantiate a node effect. More...

#include <kanzi/core.ui/template/node_effect_template2d.hpp>

Public Types

using BindingContainer
 Container type for bindings.
 
using ChildContainer
 Container type for children.
 
using ConstBindingIterator
 Iterator type for container of bindings.
 
using ConstChildIterator
 Iterator type for children.
 
using ConstPropertyIterator
 Iterator type for container of property values.
 
using PropertyContainer
 Container type for property values.
 
using PropertyEntry
 Type for property value.
 

Public Member Functions

void addBinding (BindingLoadInfo binding)
 Adds a binding to add when instantiating the template.
 
void addChild (NodeEffectTemplate2DSharedPtr child)
 Adds a child to the template.
 
void addPropertyValue (AbstractPropertyType propertyType, Variant value)
 Adds a property to set when instantiating the template.
 
ConstChildIterator beginChildren () const
 Gets iterator to the beginning of children container of the template.
 
ConstPropertyIterator beginProperties () const
 Gets iterator to the beginning of properties container of the template.
 
ConstChildIterator endChildren () const
 Gets iterator to the end of children container of the template.
 
ConstPropertyIterator endProperties () const
 Gets iterator to the end of properties container of the template.
 
string getMetaclassName () const
 Gets the metaclass name of the template.
 
string getName () const
 Gets the name of the template.
 
NodeEffect2DSharedPtr instantiate (Domain *domain)
 Instantiates the template.
 
NodeEffect2DSharedPtr instantiate (Domain *domain, NodeEffect2DSharedPtr root)
 Instantiates the template.
 
void setMetaclassName (string_view name)
 Sets the metaclass name of the template.
 
void setName (string_view name)
 Sets the name of the template.
 
virtual ~NodeEffectTemplate2D ()
 Destructor.
 

Static Public Member Functions

static NodeEffectTemplate2DSharedPtr create ()
 Creates a node effect template and sets the mataclass name to empty.
 
static NodeEffectTemplate2DSharedPtr create (string_view metaclassName)
 Creates a node effect template.
 
static NodeEffectTemplate2DSharedPtr create (string_view metaclassName, string_view name)
 Creates a node effect template.
 
static NodeEffectTemplate2DSharedPtr createFromKZB (Domain *domain, KzbFile &kzbFile, ReadOnlyMemoryFile &file, KzbMemoryParser &parser)
 Creates a template instance and loads it from a file.
 

Protected Member Functions

void loadFromKZB (Domain *domain, KzbFile &kzbFile, ReadOnlyMemoryFile &file, KzbMemoryParser &parser)
 Loads a node effect template from a file.
 
 NodeEffectTemplate2D (string_view metaclassName, string_view name)
 Constructor.
 

Detailed Description

Use NodeEffectTemplate2D to instantiate a node effect.

NodeEffectTemplate2D contains the type of the NodeEffect2D to instantiate and all property values that belong to the NodeEffect2D.

See also
NodeEffect2D, NodeEffectPrefab2D
Since
Kanzi 3.9.0

Member Typedef Documentation

◆ ChildContainer

Container type for children.

◆ ConstChildIterator

◆ BindingContainer

◆ ConstBindingIterator

Iterator type for container of bindings.

◆ PropertyEntry

◆ PropertyContainer

Container type for property values.

◆ ConstPropertyIterator

Iterator type for container of property values.

Constructor & Destructor Documentation

◆ ~NodeEffectTemplate2D()

virtual kanzi::NodeEffectTemplate2D::~NodeEffectTemplate2D ( )
virtual

Destructor.

◆ NodeEffectTemplate2D()

kanzi::NodeEffectTemplate2D::NodeEffectTemplate2D ( string_view metaclassName,
string_view name )
explicitprotected

Constructor.

Parameters
metaclassNameName of the metaclass to use.
nameName of the node effect to create.

Member Function Documentation

◆ create() [1/3]

static NodeEffectTemplate2DSharedPtr kanzi::NodeEffectTemplate2D::create ( string_view metaclassName,
string_view name )
static

Creates a node effect template.

Parameters
metaclassNameName of the metaclass to use.
nameName of the node effect to create.
Returns
The node effect template.

◆ create() [2/3]

static NodeEffectTemplate2DSharedPtr kanzi::NodeEffectTemplate2D::create ( string_view metaclassName)
inlinestatic

Creates a node effect template.

Parameters
metaclassNameName of the metaclass to use.
Returns
The node effect template.

◆ create() [3/3]

static NodeEffectTemplate2DSharedPtr kanzi::NodeEffectTemplate2D::create ( )
inlinestatic

Creates a node effect template and sets the mataclass name to empty.

Returns
The node effect template.

◆ getName()

string kanzi::NodeEffectTemplate2D::getName ( ) const
inline

Gets the name of the template.

Returns
Name of the template.

◆ setName()

void kanzi::NodeEffectTemplate2D::setName ( string_view name)
inline

Sets the name of the template.

Parameters
nameName to use.

◆ getMetaclassName()

string kanzi::NodeEffectTemplate2D::getMetaclassName ( ) const
inline

Gets the metaclass name of the template.

Returns
Name of the metaclass.

◆ setMetaclassName()

void kanzi::NodeEffectTemplate2D::setMetaclassName ( string_view name)
inline

Sets the metaclass name of the template.

Parameters
nameName of the metaclass.

◆ addChild()

void kanzi::NodeEffectTemplate2D::addChild ( NodeEffectTemplate2DSharedPtr child)
inline

Adds a child to the template.

Parameters
childChild to add.
Since
Kanzi 3.9.8.

◆ addBinding()

void kanzi::NodeEffectTemplate2D::addBinding ( BindingLoadInfo binding)
inline

Adds a binding to add when instantiating the template.

Parameters
bindingThe binding to add.
Since
Kanzi 3.9.8.

◆ addPropertyValue()

void kanzi::NodeEffectTemplate2D::addPropertyValue ( AbstractPropertyType propertyType,
Variant value )
inline

Adds a property to set when instantiating the template.

Parameters
propertyTypeProperty type.
valueProperty value.

◆ beginChildren()

ConstChildIterator kanzi::NodeEffectTemplate2D::beginChildren ( ) const
inline

Gets iterator to the beginning of children container of the template.

Returns
Const iterator to the beginning of children container.
Since
Kanzi 3.9.8.

◆ endChildren()

ConstChildIterator kanzi::NodeEffectTemplate2D::endChildren ( ) const
inline

Gets iterator to the end of children container of the template.

Returns
Const iterator to the end of children container.
Since
Kanzi 3.9.8.

◆ beginProperties()

ConstPropertyIterator kanzi::NodeEffectTemplate2D::beginProperties ( ) const
inline

Gets iterator to the beginning of properties container of the template.

Returns
Const iterator to the beginning of properties container.

◆ endProperties()

ConstPropertyIterator kanzi::NodeEffectTemplate2D::endProperties ( ) const
inline

Gets iterator to the end of properties container of the template.

Returns
Const iterator to the end of properties container.

◆ instantiate() [1/2]

NodeEffect2DSharedPtr kanzi::NodeEffectTemplate2D::instantiate ( Domain * domain)

Instantiates the template.

Parameters
domainDomain to use.
Returns
Instantiated node effect.

◆ instantiate() [2/2]

NodeEffect2DSharedPtr kanzi::NodeEffectTemplate2D::instantiate ( Domain * domain,
NodeEffect2DSharedPtr root )

Instantiates the template.

Parameters
domainDomain to use.
rootRoot effect instance associated with the instantiated effect. Must be non-null.
Returns
Instantiated node effect.
Since
Kanzi 3.9.8.

◆ createFromKZB()

static NodeEffectTemplate2DSharedPtr kanzi::NodeEffectTemplate2D::createFromKZB ( Domain * domain,
KzbFile & kzbFile,
ReadOnlyMemoryFile & file,
KzbMemoryParser & parser )
static

Creates a template instance and loads it from a file.

Parameters
domainDomain
kzbFileThe kzb file from which to load the template instance.
fileThe template instance file in the kzb file.
parserFile memory parser.
Returns
Created node effect template.

◆ loadFromKZB()

void kanzi::NodeEffectTemplate2D::loadFromKZB ( Domain * domain,
KzbFile & kzbFile,
ReadOnlyMemoryFile & file,
KzbMemoryParser & parser )
protected

Loads a node effect template from a file.

Parameters
domainDomain
kzbFileKZB file where to load from.
fileEffect preafb file inside KZB file where to load from.
parserFile memory parser.

The documentation for this class was generated from the following file: