Kanzi  3.9.4
Kanzi Engine API
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. More...
 
typedef vector< RenderPassTemplateSharedPtrChildContainer
 Container type for children. More...
 
typedef BindingContainer::const_iterator ConstBindingIterator
 Iterator type for container of bindings. More...
 
typedef ChildContainer::const_iterator ConstChildIterator
 Iterator type for children. More...
 
typedef PropertyContainer::const_iterator ConstPropertyIterator
 Iterator type for container of property values. More...
 
typedef vector< PropertyEntryPropertyContainer
 Container type for property values. More...
 
typedef pair< AbstractPropertyType, VariantPropertyEntry
 Type for property value. More...
 

Public Member Functions

void addBinding (BindingLoadInfo binding)
 Adds a binding to add when instantiating the template. More...
 
void addChild (RenderPassTemplateSharedPtr child)
 Adds a child to the template. More...
 
void addPropertyValue (AbstractPropertyType propertyType, Variant value)
 Adds a property to set when instantiating the template. More...
 
ConstBindingIterator beginBindings () const
 Gets iterator to the beginning of bindings container of the template. More...
 
ConstChildIterator beginChildren () const
 Gets iterator to the beginning of children container of the template. More...
 
ConstPropertyIterator beginProperties () const
 Gets iterator to the beginning of properties container of the template. More...
 
ConstBindingIterator endBindings () const
 Gets iterator to the end of bindings container of the template. More...
 
ConstChildIterator endChildren () const
 Gets iterator to the end of children container of the template. More...
 
ConstPropertyIterator endProperties () const
 Gets iterator to the end of properties container of the template. More...
 
string getMetaclassName () const
 Gets the metaclass name of the template. More...
 
string getName () const
 Gets the name of the template. More...
 
RenderPassSharedPtr instantiate (Domain *domain, RenderPassSharedPtr root)
 Instantiates the template recursively. More...
 
bool isRoot () const
 Indicates whether a template is the root of the render pass tree. More...
 
bool removePropertyValue (AbstractPropertyType propertyType)
 Removes a value from the properties to be set to the instantiated render pass. More...
 
void setMetaclassName (string_view name)
 Sets the metaclass name of the template. More...
 
void setName (string_view name)
 Sets the name of the template. More...
 
void setRoot (bool flag)
 Sets the root flag of the template. More...
 
virtual ~RenderPassTemplate ()
 Destructor. More...
 

Static Public Member Functions

static RenderPassTemplateSharedPtr create (string_view metaclassName, string_view name)
 Creates a render pass template. More...
 
static RenderPassTemplateSharedPtr create (string_view metaclassName)
 Creates a render pass template. More...
 
static RenderPassTemplateSharedPtr create ()
 Creates a render pass template and sets the mataclass name to empty. More...
 
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. More...
 

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

Container type for children.

◆ ConstChildIterator

typedef ChildContainer::const_iterator kanzi::RenderPassTemplate::ConstChildIterator

Iterator type for children.

◆ BindingContainer

Container type for bindings.

◆ 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 Function Documentation

◆ RenderPassPrefab

friend class RenderPassPrefab
friend

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