Kanzi 3.9.10
kanzi::RenderPassTemplate Class Reference

Use RenderPassTemplate to instantiate a single render pass. More...

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

Public Types

typedef vector< BindingLoadInfoBindingContainer
 Container type for bindings.
 
typedef vector< RenderPassTemplateSharedPtrChildContainer
 Container type for children.
 
typedef BindingContainer::const_iterator ConstBindingIterator
 Iterator type for container of bindings.
 
typedef ChildContainer::const_iterator ConstChildIterator
 Iterator type for children.
 
typedef PropertyContainer::const_iterator ConstPropertyIterator
 Iterator type for container of property values.
 
typedef vector< PropertyEntryPropertyContainer
 Container type for property values.
 
typedef pair< AbstractPropertyType, VariantPropertyEntry
 Type for property value.
 

Public Member Functions

void addBinding (BindingLoadInfo binding)
 Adds a binding to add when instantiating the template.
 
void addChild (RenderPassTemplateSharedPtr child)
 Adds a child to the template.
 
void addPropertyValue (AbstractPropertyType propertyType, Variant value)
 Adds a property to set when instantiating the template.
 
ConstBindingIterator beginBindings () const
 Gets iterator to the beginning of bindings container of 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.
 
ConstBindingIterator endBindings () const
 Gets iterator to the end of bindings 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.
 
RenderPassSharedPtr instantiate (Domain *domain, RenderPassSharedPtr root)
 Instantiates the template recursively.
 
bool isRoot () const
 Indicates whether a template is the root of the render pass tree.
 
bool removePropertyValue (AbstractPropertyType propertyType)
 Removes a value from the properties to be set to the instantiated render pass.
 
void setMetaclassName (string_view name)
 Sets the metaclass name of the template.
 
void setName (string_view name)
 Sets the name of the template.
 
void setRoot (bool flag)
 Sets the root flag of the template.
 
virtual ~RenderPassTemplate ()
 Destructor.
 

Static Public Member Functions

static RenderPassTemplateSharedPtr create ()
 Creates a render pass template and sets the mataclass name to empty.
 
static RenderPassTemplateSharedPtr create (string_view metaclassName)
 Creates a render pass template.
 
static RenderPassTemplateSharedPtr create (string_view metaclassName, string_view name)
 Creates a render pass template.
 
static RenderPassTemplateSharedPtr createFromKZB (Domain *domain, KzbFile &kzbFile, ReadOnlyMemoryFile &file, KzbMemoryParser &parser)
 

Protected Member Functions

void collectResourceUrls (ResourceManager::UrlContainer &basket) const
 
void loadFromKZB (Domain *domain, KzbFile &kzbFile, ReadOnlyMemoryFile &file, KzbMemoryParser &parser)
 
 RenderPassTemplate (string_view metaclassName, string_view name)
 Constructor.
 

Friends

class RenderPassPrefab
 

Detailed Description

Use RenderPassTemplate to instantiate a single render pass.

RenderPassTemplate contains the type of the RenderPass to instantiate and all property values and bindings that belong to the RenderPass.

RenderPassPrefab contains a root RenderPassTemplate that contains all the render passes that make up the RenderPass tree.

See also
RenderPass, RenderPassPrefab
Since
Kanzi 3.7.0

Member Typedef Documentation

◆ ChildContainer

◆ ConstChildIterator

Iterator type for children.

◆ BindingContainer

◆ ConstBindingIterator

typedef BindingContainer::const_iterator kanzi::RenderPassTemplate::ConstBindingIterator

Iterator type for container of bindings.

◆ PropertyEntry

◆ PropertyContainer

Container type for property values.

◆ ConstPropertyIterator

typedef PropertyContainer::const_iterator kanzi::RenderPassTemplate::ConstPropertyIterator

Iterator type for container of property values.

Constructor & Destructor Documentation

◆ ~RenderPassTemplate()

virtual kanzi::RenderPassTemplate::~RenderPassTemplate ( )
virtual

Destructor.

◆ RenderPassTemplate()

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

Constructor.

Parameters
metaclassNameName of the metaclass to use.
nameName of the render pass to be created.

Member Function Documentation

◆ create() [1/3]

static RenderPassTemplateSharedPtr kanzi::RenderPassTemplate::create ( string_view metaclassName,
string_view name )
static

Creates a render pass template.

Parameters
metaclassNameName of metaclass to use.
nameName of the render pass to be created.
Returns
The render pass template.

◆ create() [2/3]

static RenderPassTemplateSharedPtr kanzi::RenderPassTemplate::create ( string_view metaclassName)
inlinestatic

Creates a render pass template.

Parameters
metaclassNameName of metaclass to use.
Returns
The render pass template.

◆ create() [3/3]

static RenderPassTemplateSharedPtr kanzi::RenderPassTemplate::create ( )
inlinestatic

Creates a render pass template and sets the mataclass name to empty.

Returns
The render pass template.

◆ isRoot()

bool kanzi::RenderPassTemplate::isRoot ( ) const
inline

Indicates whether a template is the root of the render pass tree.

Returns
If the template is the root of the render pass tree, true, otherwise false.

◆ setRoot()

void kanzi::RenderPassTemplate::setRoot ( bool flag)
inline

Sets the root flag of the template.

Parameters
flagRoot flag.

◆ addChild()

void kanzi::RenderPassTemplate::addChild ( RenderPassTemplateSharedPtr child)
inline

Adds a child to the template.

Parameters
childChild to add.

◆ getName()

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

Gets the name of the template.

Returns
Name of the template.

◆ setName()

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

Sets the name of the template.

Parameters
nameName to use.

◆ getMetaclassName()

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

Gets the metaclass name of the template.

Returns
Name of the metaclass.

◆ setMetaclassName()

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

Sets the metaclass name of the template.

Parameters
nameName of the metaclass.

◆ addBinding()

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

Adds a binding to add when instantiating the template.

Parameters
bindingThe Binding to add.

◆ addPropertyValue()

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

Adds a property to set when instantiating the template.

Parameters
propertyTypeProperty type.
valueProperty value.

◆ removePropertyValue()

bool kanzi::RenderPassTemplate::removePropertyValue ( AbstractPropertyType propertyType)
inline

Removes a value from the properties to be set to the instantiated render pass.

Parameters
propertyTypeProperty type to remove value for.
Returns
If value existed and was removed true, otherwise false.

◆ beginChildren()

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

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

Returns
Const iterator to the beginning of children container.

◆ endChildren()

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

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

Returns
Const iterator to the end of children container.

◆ beginProperties()

ConstPropertyIterator kanzi::RenderPassTemplate::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::RenderPassTemplate::endProperties ( ) const
inline

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

Returns
Const iterator to the end of properties container.

◆ beginBindings()

ConstBindingIterator kanzi::RenderPassTemplate::beginBindings ( ) const
inline

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

Returns
Const iterator to the beginning of bindings container.

◆ endBindings()

ConstBindingIterator kanzi::RenderPassTemplate::endBindings ( ) const
inline

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

Returns
Const iterator to the end of bindings container.

◆ instantiate()

RenderPassSharedPtr kanzi::RenderPassTemplate::instantiate ( Domain * domain,
RenderPassSharedPtr root )

Instantiates the template recursively.

Parameters
domainDomain to use.
rootRoot render pass for this render pass tree. Empty for top-level instantiation.
Returns
Instantiated render pass.

◆ createFromKZB()

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

◆ collectResourceUrls()

void kanzi::RenderPassTemplate::collectResourceUrls ( ResourceManager::UrlContainer & basket) const
protected

◆ loadFromKZB()

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

Friends And Related Symbol Documentation

◆ RenderPassPrefab


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