HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HgiShaderSection Class Reference

#include <shaderSection.h>

Public Member Functions

virtual HGI_API ~HgiShaderSection ()
 
virtual HGI_API void WriteType (std::ostream &ss) const
 
virtual HGI_API void WriteIdentifier (std::ostream &ss) const
 Writes the unique name of an instance of the section. More...
 
virtual HGI_API void WriteDeclaration (std::ostream &ss) const
 Writes a decleration statement for a member or in global scope. More...
 
virtual HGI_API void WriteParameter (std::ostream &ss) const
 Writes the section as a parameter to a function. More...
 
virtual HGI_API void WriteArraySize (std::ostream &ss) const
 Writes the arraySize to a function. More...
 
virtual HGI_API void WriteBlockInstanceIdentifier (std::ostream &ss) const
 Writes the block instance name of an instance of the section. More...
 
const std::stringGetIdentifier () const
 Returns the identifier of the section. More...
 
HGI_API const
HgiShaderSectionAttributeVector
GetAttributes () const
 Returns the attributes of the section. More...
 
const std::stringGetArraySize () const
 Returns the arraySize of the section. More...
 
bool HasBlockInstanceIdentifier () const
 Returns whether the section has a block instance identifier. More...
 

Protected Member Functions

HGI_API HgiShaderSection (const std::string &identifier, const HgiShaderSectionAttributeVector &attributes={}, const std::string &defaultValue=std::string(), const std::string &arraySize=std::string(), const std::string &blockInstanceIdentifier=std::string())
 
HGI_API const std::string_GetDefaultValue () const
 

Detailed Description

A base class for a Shader Section. In its simplest form then it is a construct that knows how to declare itself, define and pass as param. Can be subclassed to add more behaviour for complex cases and to hook into the visitor tree.

Definition at line 55 of file shaderSection.h.

Constructor & Destructor Documentation

virtual HGI_API HgiShaderSection::~HgiShaderSection ( )
virtual
HGI_API HgiShaderSection::HgiShaderSection ( const std::string identifier,
const HgiShaderSectionAttributeVector attributes = {},
const std::string defaultValue = std::string(),
const std::string arraySize = std::string(),
const std::string blockInstanceIdentifier = std::string() 
)
explicitprotected

Member Function Documentation

HGI_API const std::string& HgiShaderSection::_GetDefaultValue ( ) const
protected
const std::string& HgiShaderSection::GetArraySize ( ) const
inline

Returns the arraySize of the section.

Definition at line 97 of file shaderSection.h.

HGI_API const HgiShaderSectionAttributeVector& HgiShaderSection::GetAttributes ( ) const

Returns the attributes of the section.

const std::string& HgiShaderSection::GetIdentifier ( ) const
inline

Returns the identifier of the section.

Definition at line 88 of file shaderSection.h.

bool HgiShaderSection::HasBlockInstanceIdentifier ( ) const
inline

Returns whether the section has a block instance identifier.

Definition at line 102 of file shaderSection.h.

virtual HGI_API void HgiShaderSection::WriteArraySize ( std::ostream &  ss) const
virtual

Writes the arraySize to a function.

virtual HGI_API void HgiShaderSection::WriteBlockInstanceIdentifier ( std::ostream &  ss) const
virtual

Writes the block instance name of an instance of the section.

virtual HGI_API void HgiShaderSection::WriteDeclaration ( std::ostream &  ss) const
virtual

Writes a decleration statement for a member or in global scope.

virtual HGI_API void HgiShaderSection::WriteIdentifier ( std::ostream &  ss) const
virtual

Writes the unique name of an instance of the section.

virtual HGI_API void HgiShaderSection::WriteParameter ( std::ostream &  ss) const
virtual

Writes the section as a parameter to a function.

virtual HGI_API void HgiShaderSection::WriteType ( std::ostream &  ss) const
virtual

Write out the type, shader section does not hold a type string as how a type is defined is fully controlled by sub classes and no assumptions are made


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