Kanzi  3.9.9
Kanzi Engine C++ 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

Container type for children.

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

Iterator type for children.

Container type for bindings.

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

Iterator type for container of bindings.

Container type for property values.

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

Iterator type for container of property values.

Constructor & Destructor Documentation

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

Destructor.

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

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.
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.
static RenderPassTemplateSharedPtr kanzi::RenderPassTemplate::create ( )
inlinestatic

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

Returns
The render pass template.
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.
void kanzi::RenderPassTemplate::setRoot ( bool  flag)
inline

Sets the root flag of the template.

Parameters
flagRoot flag.
void kanzi::RenderPassTemplate::addChild ( RenderPassTemplateSharedPtr  child)
inline

Adds a child to the template.

Parameters
childChild to add.
string kanzi::RenderPassTemplate::getName ( ) const
inline

Gets the name of the template.

Returns
Name of the template.
void kanzi::RenderPassTemplate::setName ( string_view  name)
inline

Sets the name of the template.

Parameters
nameName to use.
string kanzi::RenderPassTemplate::getMetaclassName ( ) const
inline

Gets the metaclass name of the template.

Returns
Name of the metaclass.
void kanzi::RenderPassTemplate::setMetaclassName ( string_view  name)
inline

Sets the metaclass name of the template.

Parameters
nameName of the metaclass.
void kanzi::RenderPassTemplate::addBinding ( BindingLoadInfo  binding)
inline

Adds a binding to add when instantiating the template.

Parameters
bindingThe Binding to add.
void kanzi::RenderPassTemplate::addPropertyValue ( AbstractPropertyType  propertyType,
Variant  value 
)
inline

Adds a property to set when instantiating the template.

Parameters
propertyTypeProperty type.
valueProperty value.
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.
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.
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.
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.
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.
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.
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.
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.
static RenderPassTemplateSharedPtr kanzi::RenderPassTemplate::createFromKZB ( Domain domain,
KzbFile kzbFile,
ReadOnlyMemoryFile file,
KzbMemoryParser parser 
)
static
void kanzi::RenderPassTemplate::collectResourceUrls ( ResourceManager::UrlContainer basket) const
protected
void kanzi::RenderPassTemplate::loadFromKZB ( Domain domain,
KzbFile kzbFile,
ReadOnlyMemoryFile file,
KzbMemoryParser parser 
)
protected

Friends And Related Function Documentation

friend class RenderPassPrefab
friend

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