本文整理汇总了C++中TType::getCompleteString方法的典型用法代码示例。如果您正苦于以下问题:C++ TType::getCompleteString方法的具体用法?C++ TType::getCompleteString怎么用?C++ TType::getCompleteString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TType
的用法示例。
在下文中一共展示了TType::getCompleteString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OutputSpecification
bool OutputSpecification(TIntermSpecification* node, TIntermTraverser* it)
{
TOutputTraverser* oit = static_cast<TOutputTraverser*>(it);
TInfoSink& out = oit->infoSink;
OutputExtensionText(out, node);
OutputTreeText(out, node, oit->depth);
TType* t = node->getType();
out.debug << "specify '" << t->getTypeName().c_str() << "' (" << t->getCompleteString() << ")\n";
return true;
#if 0
TTypeList* tl = t->getStruct();
TTypeList::iterator iter = tl->begin();
for(; iter < tl->end(); iter++) {
out.debug << FormatSourceRange(iter->line);
for (i = 0; i < (oit->depth+1); ++i) out.debug << " ";
out.debug << "'" << iter->type->getFieldName().c_str() << "' (" <<
iter->type->getCompleteString().c_str() << ")\n";
}
#endif
}
示例2: visitUnary
bool TConstTraverser::visitUnary(Visit visit, TIntermUnary* node)
{
TString buf;
buf.append("'constructor' : assigning non-constant to ");
buf.append(type.getCompleteString());
infoSink.info.message(EPrefixError, node->getLine(), buf.c_str());
error = true;
return false;
}
示例3: OutputParameter
void OutputParameter(TIntermParameter* node, TIntermTraverser* it)
{
TOutputTraverser* oit = static_cast<TOutputTraverser*>(it);
TInfoSink& out = oit->infoSink;
OutputExtensionText(out, node);
OutputTreeText(out, node, oit->depth);
TType* t = node->getType();
if (t->getBasicType() != EbtStruct) {
out.debug << "param '" << t->getFieldName() << "' (" <<
t->getCompleteString() << ")\n";
} else {
out.debug << "param '" << t->getFieldName() << "' (" <<
t->getCompleteString() << " '" <<
t->getTypeName() << "')\n";
}
}
示例4: visitAggregate
bool TConstTraverser::visitAggregate(Visit visit, TIntermAggregate *node)
{
if (!node->isConstructor() && node->getOp() != EOpComma)
{
TString buf;
buf.append("'constructor' : assigning non-constant to ");
buf.append(mType.getCompleteString());
mInfoSink.info.message(EPrefixError, node->getLine(), buf.c_str());
error = true;
return false;
}
if (node->getSequence()->size() == 0)
{
error = true;
return false;
}
bool flag = node->getSequence()->size() == 1 &&
(*node->getSequence())[0]->getAsTyped()->getAsConstantUnion();
if (flag)
{
mSingleConstantParam = true;
mConstructorType = node->getOp();
mSize = node->getType().getObjectSize();
if (node->getType().isMatrix())
{
mIsDiagonalMatrixInit = true;
mMatrixCols = node->getType().getCols();
mMatrixRows = node->getType().getRows();
}
}
for (TIntermSequence::iterator p = node->getSequence()->begin();
p != node->getSequence()->end(); p++)
{
if (node->getOp() == EOpComma)
mIndex = 0;
(*p)->traverse(this);
}
if (flag)
{
mSingleConstantParam = false;
mConstructorType = EOpNull;
mSize = 0;
mIsDiagonalMatrixInit = false;
mMatrixCols = 0;
mMatrixRows = 0;
}
return false;
}
示例5: visitAggregate
bool TConstTraverser::visitAggregate(Visit visit, TIntermAggregate* node)
{
if (!node->isConstructor() && node->getOp() != EOpComma) {
TString buf;
buf.append("'constructor' : assigning non-constant to ");
buf.append(type.getCompleteString());
infoSink.info.message(EPrefixError, buf.c_str(), node->getLine());
error = true;
return false;
}
if (node->getSequence().size() == 0) {
error = true;
return false;
}
bool flag = node->getSequence().size() == 1 && node->getSequence()[0]->getAsTyped()->getAsConstantUnion();
if (flag)
{
singleConstantParam = true;
constructorType = node->getOp();
size = node->getType().getObjectSize();
if (node->getType().isMatrix()) {
isMatrix = true;
matrixSize = node->getType().getNominalSize();
}
}
for (TIntermSequence::iterator p = node->getSequence().begin();
p != node->getSequence().end(); p++) {
if (node->getOp() == EOpComma)
index = 0;
(*p)->traverse(this);
}
if (flag)
{
singleConstantParam = false;
constructorType = EOpNull;
size = 0;
isMatrix = false;
matrixSize = 0;
}
return false;
}
示例6: visitBinary
bool TConstTraverser::visitBinary(Visit visit, TIntermBinary* node)
{
TQualifier qualifier = node->getType().getQualifier();
if (qualifier != EvqConst) {
TString buf;
buf.append("'constructor' : assigning non-constant to ");
buf.append(type.getCompleteString());
infoSink.info.message(EPrefixError, node->getLine(), buf.c_str());
error = true;
return false;
}
infoSink.info.message(EPrefixInternalError, node->getLine(), "Binary Node found in constant constructor");
return false;
}