HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TypeSyntax Class Referenceabstract

#include <Syntax.h>

+ Inheritance diagram for TypeSyntax:

Public Member Functions

virtual ~TypeSyntax ()
 
const stringgetName () const
 Returns the type name. More...
 
const stringgetTypeAlias () const
 Returns a type alias if needed to define the type in the target language. More...
 
const stringgetTypeDefinition () const
 Returns a type definition if needed to define the type in the target language. More...
 
const stringgetDefaultValue (bool uniform) const
 Returns the default value for this type. More...
 
const StringVecgetMembers () const
 
virtual string getValue (const ShaderPort *port, bool uniform) const
 
virtual string getValue (const Value &value, bool uniform) const =0
 
virtual string getValue (const StringVec &values, bool uniform) const =0
 

Protected Member Functions

 TypeSyntax (const string &name, const string &defaultValue, const string &uniformDefaultValue, const string &typeAlias, const string &typeDefinition, const StringVec &members)
 Protected constructor. More...
 

Protected Attributes

string _name
 
string _defaultValue
 
string _uniformDefaultValue
 
string _typeAlias
 
string _typeDefinition
 
StringVec _members
 

Static Protected Attributes

static const StringVec EMPTY_MEMBERS
 

Detailed Description

Base class for syntax handling of types.

Definition at line 218 of file Syntax.h.

Constructor & Destructor Documentation

virtual TypeSyntax::~TypeSyntax ( )
inlinevirtual

Definition at line 221 of file Syntax.h.

TypeSyntax::TypeSyntax ( const string name,
const string defaultValue,
const string uniformDefaultValue,
const string typeAlias,
const string typeDefinition,
const StringVec members 
)
protected

Protected constructor.

Member Function Documentation

const string& TypeSyntax::getDefaultValue ( bool  uniform) const
inline

Returns the default value for this type.

Definition at line 233 of file Syntax.h.

const StringVec& TypeSyntax::getMembers ( ) const
inline

Returns the syntax for accessing type members if the type can be swizzled.

Definition at line 237 of file Syntax.h.

const string& TypeSyntax::getName ( ) const
inline

Returns the type name.

Definition at line 224 of file Syntax.h.

const string& TypeSyntax::getTypeAlias ( ) const
inline

Returns a type alias if needed to define the type in the target language.

Definition at line 227 of file Syntax.h.

const string& TypeSyntax::getTypeDefinition ( ) const
inline

Returns a type definition if needed to define the type in the target language.

Definition at line 230 of file Syntax.h.

virtual string TypeSyntax::getValue ( const ShaderPort port,
bool  uniform 
) const
virtual

Returns a value formatted according to this type syntax. The value is constructed from the given shader port object.

virtual string TypeSyntax::getValue ( const Value value,
bool  uniform 
) const
pure virtual

Returns a value formatted according to this type syntax. The value is constructed from the given value object.

Implemented in AggregateTypeSyntax, StringTypeSyntax, and ScalarTypeSyntax.

virtual string TypeSyntax::getValue ( const StringVec values,
bool  uniform 
) const
pure virtual

Returns a value formatted according to this type syntax. The value is constructed from the given list of value entries with one entry for each member of the type.

Implemented in AggregateTypeSyntax, and ScalarTypeSyntax.

Member Data Documentation

string TypeSyntax::_defaultValue
protected

Definition at line 258 of file Syntax.h.

StringVec TypeSyntax::_members
protected

Definition at line 262 of file Syntax.h.

string TypeSyntax::_name
protected

Definition at line 257 of file Syntax.h.

string TypeSyntax::_typeAlias
protected

Definition at line 260 of file Syntax.h.

string TypeSyntax::_typeDefinition
protected

Definition at line 261 of file Syntax.h.

string TypeSyntax::_uniformDefaultValue
protected

Definition at line 259 of file Syntax.h.

const StringVec TypeSyntax::EMPTY_MEMBERS
staticprotected

Definition at line 264 of file Syntax.h.


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