zenilib: TType Class Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
TType Class Reference

`#include <Types.h>`

## Public Member Functions

| TType ()
| TType (TBasicType t, TPrecision p, TQualifier q=EvqTemporary, int s=1, bool m=false, bool a=false)
| TType (const TPublicType &p)
| TType (TStructure *userDef, TPrecision p=EbpUndefined)
void | clearArrayness ()
int | elementRegisterCount () const
int | getArraySize () const
const char * | getBasicString () const
TBasicType | getBasicType () const
TString | getCompleteString () const
int | getDeepestStructNesting () const
const TString & | getMangledName () const
int | getNominalSize () const
size_t | getObjectSize () const
TPrecision | getPrecision () const
const char * | getPrecisionString () const
TQualifier | getQualifier () const
const char * | getQualifierString () const
TStructure * | getStruct () const
bool | isArray () const
bool | isMatrix () const
bool | isScalar () const
bool | isStructureContainingArrays () const
bool | isVector () const
bool | operator!= (const TType &right) const
bool | operator< (const TType &right) const
bool | operator== (const TType &right) const
| POOL_ALLOCATOR_NEW_DELETE ()
bool | sameElementType (const TType &right) const
void | setArraySize (int s)
void | setBasicType (TBasicType t)
void | setMatrix (bool m)
void | setNominalSize (int s)
void | setPrecision (TPrecision p)
void | setQualifier (TQualifier q)
void | setStruct (TStructure *s)
int | totalRegisterCount () const

## Detailed Description

Definition at line 93 of file Types.h.

## Constructor & Destructor Documentation

TType::TType | ( |  | ) |

inline

Definition at line 97 of file Types.h.

TType::TType | ( | TBasicType | t,
|  | TPrecision | p,
|  | TQualifier | q = `EvqTemporary`,
|  | int | s = `1`,
|  | bool | m = `false`,
|  | bool | a = `false`
| ) |  |

inline

Definition at line 98 of file Types.h.

TType::TType | ( | const TPublicType & | p | ) |

explicit

Definition at line 22 of file SymbolTable.cpp.

References getStruct(), and TPublicType::userDef.

TType::TType | ( | TStructure * | userDef,
|  | TPrecision | p = `EbpUndefined`
| ) |  |

inline

Definition at line 103 of file Types.h.

## Member Function Documentation

void TType::clearArrayness | ( |  | ) |

inline

Definition at line 165 of file Types.h.

Referenced by TParseContext::addConstArrayNode(), sh::OutputHLSL::addConstructor(), TParseContext::addConstructor(), and CompareStructure().

int TType::elementRegisterCount | ( |  | ) | const

inline

Definition at line 123 of file Types.h.

References TStructure::fields(), getNominalSize(), getStruct(), i, and isMatrix().

Referenced by totalRegisterCount().

int TType::getArraySize | ( |  | ) | const

inline

Definition at line 163 of file Types.h.

Referenced by TParseContext::addConstArrayNode(), TParseContext::addIndexExpression(), TParseContext::arrayErrorCheck(), sh::OutputHLSL::arrayString(), CompareStructure(), TParseContext::constructorErrorCheck(), sh::OutputHLSL::declareUniform(), getBuiltInVariableInfo(), getCompleteString(), getObjectSize(), getVariableInfo(), sh::OutputHLSL::vectorSize(), and TOutputGLSLBase::visitBinary().

const char* TType::getBasicString | ( |  | ) | const

inline

Definition at line 209 of file Types.h.

References getBasicString().

Referenced by TParseContext::constructStruct(), TFunction::dump(), getCompleteString(), TOutputGLSLBase::getTypeName(), and TParseContext::parameterSamplerErrorCheck().

TBasicType TType::getBasicType | ( |  | ) | const

inline

Definition at line 108 of file Types.h.

Referenced by TIntermediate::addConversion(), TIntermediate::addUnaryMath(), sh::OutputHLSL::argumentString(), TParseContext::containsSampler(), sh::OutputHLSL::decorateUniform(), getBuiltInVariableInfo(), getObjectSize(), TOutputGLSLBase::getTypeName(), getUserDefinedVariableInfo(), getVariableDataType(), getVariableInfo(), sh::OutputHLSL::glVariablePrecision(), sh::OutputHLSL::glVariableType(), sh::OutputHLSL::header(), TParseContext::parameterSamplerErrorCheck(), TIntermediate::promoteConstantUnion(), sh::OutputHLSL::samplerRegister(), TParseContext::structNestingErrorCheck(), sh::OutputHLSL::textureString(), sh::OutputHLSL::typeString(), sh::OutputHLSL::uniformRegister(), TOutputGLSLBase::visitAggregate(), TOutputGLSLBase::writeConstantUnion(), sh::OutputHLSL::writeConstantUnion(), and TOutputGLSLBase::writeVariableType().

TString TType::getCompleteString | ( |  | ) | const

Definition at line 38 of file intermOut.cpp.

References EvqGlobal, EvqTemporary, getArraySize(), getBasicString(), getPrecisionString(), and getQualifierString().

Referenced by TParseContext::executeInitializer().

int TType::getDeepestStructNesting | ( |  | ) | const

inline

Definition at line 226 of file Types.h.

References TStructure::deepestNesting().

Referenced by TParseContext::structNestingErrorCheck().

const TString& TType::getMangledName | ( |  | ) | const

inline

Definition at line 173 of file Types.h.

Referenced by TFunction::addParameter().

int TType::getNominalSize | ( |  | ) | const

inline

Definition at line 118 of file Types.h.

Referenced by TParseContext::addConstMatrixNode(), sh::OutputHLSL::addConstructor(), TParseContext::addConstVectorNode(), TParseContext::addIndexExpression(), elementRegisterCount(), TOutputGLSLBase::getTypeName(), getVariableDataType(), sh::OutputHLSL::glVariableType(), TIntermediate::promoteConstantUnion(), sh::OutputHLSL::typeString(), sh::OutputHLSL::vectorSize(), TOutputGLSLBase::visitBinary(), TOutputGLSLBase::visitUnary(), and sh::OutputHLSL::visitUnary().

size_t TType::getObjectSize | ( |  | ) | const

Definition at line 61 of file SymbolTable.cpp.

References EbtStruct, getArraySize(), getBasicType(), isArray(), and TStructure::objectSize().

Referenced by TParseContext::addConstArrayNode(), sh::OutputHLSL::addConstructor(), CompareStructure(), TParseContext::constructorErrorCheck(), TIntermConstantUnion::fold(), TParseContext::foldConstConstructor(), sh::OutputHLSL::initializer(), TIntermediate::promoteConstantUnion(), TOutputGLSLBase::writeConstantUnion(), and sh::OutputHLSL::writeConstantUnion().

TPrecision TType::getPrecision | ( |  | ) | const

inline

Definition at line 111 of file Types.h.

Referenced by sh::OutputHLSL::glVariablePrecision(), TIntermediate::promoteConstantUnion(), and TOutputGLSLBase::writeVariableType().

const char* TType::getPrecisionString | ( |  | ) | const

inline

Definition at line 210 of file Types.h.

References getPrecisionString().

Referenced by getCompleteString().

TQualifier TType::getQualifier | ( |  | ) | const

inline

Definition at line 114 of file Types.h.

Referenced by TIntermediate::addComma(), TParseContext::addIndexExpression(), TParseContext::constructorErrorCheck(), TParseContext::executeInitializer(), TIntermediate::promoteConstantUnion(), switch(), and TOutputGLSLBase::writeVariableType().

const char* TType::getQualifierString | ( |  | ) | const

inline

Definition at line 211 of file Types.h.

References getQualifierString().

Referenced by TParseContext::executeInitializer(), getCompleteString(), and TOutputGLSLBase::writeVariableType().

TStructure* TType::getStruct | ( |  | ) | const

inline

Definition at line 170 of file Types.h.

Referenced by TIntermediate::addBinaryMath(), sh::OutputHLSL::addConstructor(), TParseContext::addConstructor(), TParseContext::addConstStruct(), TIntermediate::addConversion(), TParseContext::addIndexExpression(), CompareStruct(), TParseContext::constructorErrorCheck(), TParseContext::containsSampler(), sh::OutputHLSL::declareUniform(), sh::OutputHLSL::decorateField(), elementRegisterCount(), TOutputGLSLBase::getTypeName(), getUserDefinedVariableInfo(), TType(), sh::OutputHLSL::typeString(), TOutputGLSLBase::visitAggregate(), sh::OutputHLSL::visitAggregate(), TOutputGLSLBase::visitBinary(), sh::OutputHLSL::visitBinary(), TOutputGLSLBase::writeConstantUnion(), sh::OutputHLSL::writeConstantUnion(), and TOutputGLSLBase::writeVariableType().

bool TType::isArray | ( |  | ) | const

inline

Definition at line 162 of file Types.h.

Referenced by TParseContext::addConstructor(), TIntermediate::addConversion(), TIntermediate::addUnaryMath(), TParseContext::arrayErrorCheck(), sh::OutputHLSL::arrayString(), CompareStructure(), TParseContext::constructorErrorCheck(), TStructure::containsArrays(), sh::OutputHLSL::declareUniform(), getBuiltInVariableInfo(), getObjectSize(), getVariableInfo(), TIntermediate::promoteConstantUnion(), switch(), sh::OutputHLSL::vectorSize(), TOutputGLSLBase::visitSymbol(), and TOutputGLSLBase::writeFunctionParameters().

bool TType::isMatrix | ( |  | ) | const

inline

Definition at line 159 of file Types.h.

Referenced by sh::OutputHLSL::addConstructor(), TIntermediate::addUnaryMath(), TParseContext::constructorErrorCheck(), elementRegisterCount(), TOutputGLSLBase::getTypeName(), getVariableDataType(), sh::OutputHLSL::glVariableType(), TIntermediate::promoteConstantUnion(), sh::OutputHLSL::typeString(), and sh::OutputHLSL::vectorSize().

bool TType::isScalar | ( |  | ) | const

inline

Definition at line 168 of file Types.h.

Referenced by sh::OutputHLSL::addConstructor(), and sh::OutputHLSL::glVariableType().

bool TType::isStructureContainingArrays | ( |  | ) | const

inline

Definition at line 230 of file Types.h.

References TStructure::containsArrays().

Referenced by TStructure::containsArrays(), and TPublicType::isStructureContainingArrays().

bool TType::isVector | ( |  | ) | const

inline

Definition at line 167 of file Types.h.

Referenced by sh::OutputHLSL::addConstructor(), TIntermediate::addUnaryMath(), TOutputGLSLBase::getTypeName(), getVariableDataType(), and sh::OutputHLSL::glVariableType().

bool TType::operator!= | ( | const TType & | right | ) | const

inline

Definition at line 195 of file Types.h.

References operator==().

bool TType::operator< | ( | const TType & | right | ) | const

inline

Definition at line 198 of file Types.h.

bool TType::operator== | ( | const TType & | right | ) | const

inline

Definition at line 187 of file Types.h.

Referenced by operator!=().

TType::POOL_ALLOCATOR_NEW_DELETE | ( |  | ) |

bool TType::sameElementType | ( | const TType & | right | ) | const

inline

Definition at line 181 of file Types.h.

Referenced by TParseContext::arrayErrorCheck().

void TType::setArraySize | ( | int | s | ) |

inline

Definition at line 164 of file Types.h.

Referenced by TParseContext::arrayErrorCheck(), IdentifyBuiltIns(), and switch().

void TType::setBasicType | ( | TBasicType | t | ) |

inline

Definition at line 109 of file Types.h.

Referenced by switch().

void TType::setMatrix | ( | bool | m | ) |

inline

Definition at line 160 of file Types.h.

References m.

Referenced by switch().

void TType::setNominalSize | ( | int | s | ) |

inline

Definition at line 119 of file Types.h.

Referenced by switch().

void TType::setPrecision | ( | TPrecision | p | ) |

inline

Definition at line 112 of file Types.h.

Referenced by sh::OutputHLSL::addConstructor(), TIntermBinary::promote(), and switch().

void TType::setQualifier | ( | TQualifier | q | ) |

inline

Definition at line 115 of file Types.h.

Referenced by TIntermediate::addComma(), sh::OutputHLSL::addConstructor(), TParseContext::addIndexExpression(), TIntermediate::addSelection(), TParseContext::constructorErrorCheck(), TParseContext::executeInitializer(), TParseContext::paramErrorCheck(), and TIntermBinary::promote().

void TType::setStruct | ( | TStructure * | s | ) |

inline

Definition at line 171 of file Types.h.

Referenced by switch().

int TType::totalRegisterCount | ( |  | ) | const

inline

Definition at line 147 of file Types.h.

References elementRegisterCount().

Referenced by sh::OutputHLSL::declareUniform().

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

- zenilib/jni/external/angle/src/compiler/Types.h
- zenilib/jni/external/angle/src/compiler/intermOut.cpp
- zenilib/jni/external/angle/src/compiler/SymbolTable.cpp