Loading...
Searching...
No Matches
SdrShaderNodeQueryResult Class Reference

SdrShaderNodeQueryResult stores the results of an SdrShaderNodeQuery. More...

#include <shaderNodeQuery.h>

Public Member Functions

const TfTokenVectorGetKeys () const &
 Returns keys requested by SelectDistinct calls on SdrShaderNodeQuery in the order they were added to the query.
 
TfTokenVector GetKeys () &&
 Overload for rvalues, move out the keys.
 
const std::vector< std::vector< VtValue > > & GetValues () const &
 Returns distinct "list of values" extracted from SdrShaderNodes corresponding to keys requested by SelectDistinct calls on SdrShaderNodeQuery.
 
std::vector< std::vector< VtValue > > GetValues () &&
 Overload for rvalues, move out the values.
 
template<class T >
std::vector< std::vector< T > > GetValuesAs () const
 Convenience to convert all values to T.
 
SDR_API std::vector< std::vector< std::string > > GetStringifiedValues () const
 Get string representations of all values, as provided by TfStringify.
 
SDR_API std::vector< SdrShaderNodePtrVec > GetShaderNodesByValues () const
 Gets shader nodes, grouped by value rows.
 
SDR_API SdrShaderNodePtrVec GetAllShaderNodes () const
 Returns all shader nodes that match the constraints of the query.
 

Friends

class SdrRegistry
 

Detailed Description

SdrShaderNodeQueryResult stores the results of an SdrShaderNodeQuery.

Definition at line 200 of file shaderNodeQuery.h.

Member Function Documentation

◆ GetAllShaderNodes()

SDR_API SdrShaderNodePtrVec GetAllShaderNodes ( ) const

Returns all shader nodes that match the constraints of the query.

◆ GetKeys() [1/2]

TfTokenVector GetKeys ( ) &&
inline

Overload for rvalues, move out the keys.

Definition at line 209 of file shaderNodeQuery.h.

◆ GetKeys() [2/2]

const TfTokenVector & GetKeys ( ) const &
inline

Returns keys requested by SelectDistinct calls on SdrShaderNodeQuery in the order they were added to the query.

If the query had no calls to SelectDistinct, returns an empty vector.

Definition at line 206 of file shaderNodeQuery.h.

◆ GetShaderNodesByValues()

SDR_API std::vector< SdrShaderNodePtrVec > GetShaderNodesByValues ( ) const

Gets shader nodes, grouped by value rows.

The result is an (N x S) container of shader nodes, where S is the number of shader nodes that have the key-value characteristics represented by the "nth" row of the returned structure of GetValues. S is not constant, and may vary from row to row.

If the query had no calls to SelectDistinct, returns an empty vector.

◆ GetStringifiedValues()

SDR_API std::vector< std::vector< std::string > > GetStringifiedValues ( ) const

Get string representations of all values, as provided by TfStringify.

◆ GetValues() [1/2]

std::vector< std::vector< VtValue > > GetValues ( ) &&
inline

Overload for rvalues, move out the values.

Definition at line 226 of file shaderNodeQuery.h.

◆ GetValues() [2/2]

const std::vector< std::vector< VtValue > > & GetValues ( ) const &
inline

Returns distinct "list of values" extracted from SdrShaderNodes corresponding to keys requested by SelectDistinct calls on SdrShaderNodeQuery.

The result is an (N x M) container of VtValues, where M is the number of keys and N is the number of distinct "list of values" (containing M number of VtValues) that correspond to the keys.

Non-existent values are represented by empty VtValues.

See also
SdrShaderNodeQuery::SelectDistinct

If the query had no calls to SelectDistinct, returns an empty vector.

Definition at line 223 of file shaderNodeQuery.h.

◆ GetValuesAs()

std::vector< std::vector< T > > GetValuesAs ( ) const
inline

Convenience to convert all values to T.

If the query had no calls to SelectDistinct, returns an empty vector.

If any value fails conversion, an empty vector is returned, and a TF_CODING_ERROR is issued. Empty VtValues will always fail conversion.

Definition at line 238 of file shaderNodeQuery.h.

Friends And Related Function Documentation

◆ SdrRegistry

friend class SdrRegistry
friend

Definition at line 280 of file shaderNodeQuery.h.


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