HDK
|
#include <ShaderStage.h>
Public Member Functions | |
VariableBlock (const string &name, const string &instance) | |
const string & | getName () const |
Get the name of this block. More... | |
void | setName (const string &name) |
Set the name of this block. More... | |
const string & | getInstance () const |
Get the instance name of this block. More... | |
void | setInstance (const string &instance) |
Set the instance name of this block. More... | |
bool | empty () const |
Return true if the block has no variables. More... | |
size_t | size () const |
Return the number of variables in this block. More... | |
ShaderPort * | operator[] (size_t index) |
Return a variable by index. More... | |
const ShaderPort * | operator[] (size_t index) const |
Return a variable by index. More... | |
const vector< ShaderPort * > & | getVariableOrder () const |
Return a const reference to our variable order vector. More... | |
ShaderPort * | operator[] (const string &name) |
const ShaderPort * | operator[] (const string &name) const |
ShaderPort * | find (const string &name) |
const ShaderPort * | find (const string &name) const |
ShaderPort * | find (const ShaderPortPredicate &predicate) |
Find a port based on a predicate. More... | |
ShaderPort * | add (const TypeDesc *type, const string &name, ValuePtr value=nullptr) |
Add a new shader port to this block. More... | |
void | add (ShaderPortPtr port) |
Add an existing shader port to this block. More... | |
A block of variables in a shader stage
Definition at line 51 of file ShaderStage.h.
Definition at line 54 of file ShaderStage.h.
ShaderPort* VariableBlock::add | ( | const TypeDesc * | type, |
const string & | name, | ||
ValuePtr | value = nullptr |
||
) |
Add a new shader port to this block.
void VariableBlock::add | ( | ShaderPortPtr | port | ) |
Add an existing shader port to this block.
|
inline |
Return true if the block has no variables.
Definition at line 72 of file ShaderStage.h.
ShaderPort* VariableBlock::find | ( | const string & | name | ) |
Return a variable by name. Returns nullptr if no variable is found by the given name.
const ShaderPort* VariableBlock::find | ( | const string & | name | ) | const |
Return a variable by name. Returns nullptr if no variable is found by the given name.
ShaderPort* VariableBlock::find | ( | const ShaderPortPredicate & | predicate | ) |
Find a port based on a predicate.
Get the instance name of this block.
Definition at line 66 of file ShaderStage.h.
Get the name of this block.
Definition at line 60 of file ShaderStage.h.
|
inline |
Return a const reference to our variable order vector.
Definition at line 84 of file ShaderStage.h.
|
inline |
Return a variable by index.
Definition at line 78 of file ShaderStage.h.
|
inline |
Return a variable by index.
Definition at line 81 of file ShaderStage.h.
ShaderPort* VariableBlock::operator[] | ( | const string & | name | ) |
Return a variable by name. Throws exception if no variable is found by the given name.
const ShaderPort* VariableBlock::operator[] | ( | const string & | name | ) | const |
Return a variable by name. Throws exception if no variable is found by the given name.
Set the instance name of this block.
Definition at line 69 of file ShaderStage.h.
Set the name of this block.
Definition at line 63 of file ShaderStage.h.
|
inline |
Return the number of variables in this block.
Definition at line 75 of file ShaderStage.h.