本文整理汇总了C++中TVariable::getUniqueId方法的典型用法代码示例。如果您正苦于以下问题:C++ TVariable::getUniqueId方法的具体用法?C++ TVariable::getUniqueId怎么用?C++ TVariable::getUniqueId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TVariable
的用法示例。
在下文中一共展示了TVariable::getUniqueId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OutputDeclaration
bool OutputDeclaration(TIntermDeclaration* node, TIntermTraverser* it)
{
TOutputTraverser* oit = static_cast<TOutputTraverser*>(it);
TInfoSink& out = oit->infoSink;
OutputExtensionText(out, node);
OutputTreeText(out, node, oit->depth);
TVariable* v = node->getVariable();
if (v->getType().getBasicType() == EbtInvariant) {
out.debug << "redeclare '" << v->getName() << "' as invariant";
} else if (v->getType().getBasicType() != EbtStruct) {
out.debug << "declare '" << v->getName() << "' (" <<
v->getType().getCompleteString() <<
") [id: " << v->getUniqueId() << "]";
} else {
out.debug << "declare '" << v->getName() << "' (" <<
v->getType().getCompleteString() << " '" <<
v->getType().getTypeName() << "') [id: " <<
v->getUniqueId() << "]";
}
out.debug << " {" << node->isFirst() << "}";
OutputDebugText(out, node);
out.debug << "\n";
#if DEBUG_CHANGEABLE == 1
OutputChangeableText(oit->infoSink, node, oit->depth, 0);
#endif
return true;
}
示例2: ir_grow_declaration
TIntermDeclaration* ir_grow_declaration(TIntermDeclaration* declaration, TSymbol* symbol, TIntermTyped* initializer, TInfoSink& infoSink)
{
TVariable* var = static_cast<TVariable*>(symbol);
TIntermSymbol* sym = ir_add_symbol(var->getUniqueId(), var->getName(), var->getType(), var->getType().getLine());
sym->setGlobal(symbol->isGlobal());
return ir_grow_declaration(declaration, sym, initializer, infoSink);
}
示例3: TIntermSymbol
TIntermSymbol *ReferenceGlobalVariable(const TString &name, const TSymbolTable &symbolTable)
{
TVariable *var = reinterpret_cast<TVariable *>(symbolTable.findGlobal(name));
ASSERT(var);
return new TIntermSymbol(var->getUniqueId(), name, var->getType());
}