当前位置: 首页>>代码示例>>C++>>正文


C++ TType::getCompleteString方法代码示例

本文整理汇总了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
}
开发者ID:jtorresfabra,项目名称:GLSL-Debugger,代码行数:25,代码来源:intermOut.cpp

示例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;  
}
开发者ID:AndriyKalashnykov,项目名称:webkit,代码行数:9,代码来源:parseConst.cpp

示例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";
    }
}
开发者ID:jtorresfabra,项目名称:GLSL-Debugger,代码行数:19,代码来源:intermOut.cpp

示例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;
}
开发者ID:CODECOMMUNITY,项目名称:angle,代码行数:52,代码来源:parseConst.cpp

示例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;
}
开发者ID:0omega,项目名称:platform_external_webkit,代码行数:47,代码来源:parseConst.cpp

示例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;
}
开发者ID:AndriyKalashnykov,项目名称:webkit,代码行数:17,代码来源:parseConst.cpp


注:本文中的TType::getCompleteString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。