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


C++ FullySpecifiedType::type方法代码示例

本文整理汇总了C++中FullySpecifiedType::type方法的典型用法代码示例。如果您正苦于以下问题:C++ FullySpecifiedType::type方法的具体用法?C++ FullySpecifiedType::type怎么用?C++ FullySpecifiedType::type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FullySpecifiedType的用法示例。


在下文中一共展示了FullySpecifiedType::type方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: prependSpaceBeforeIndirection

void TypePrettyPrinter::prependSpaceBeforeIndirection(const FullySpecifiedType &type)
{
    const bool elementTypeIsPointerOrReference = type.type()->isPointerType()
        || type.type()->isReferenceType();
    const bool elementIsConstPointerOrReference = elementTypeIsPointerOrReference && type.isConst();
    const bool shouldBindToLeftSpecifier = _overview->starBindFlags & Overview::BindToLeftSpecifier;
    if (elementIsConstPointerOrReference && ! shouldBindToLeftSpecifier)
        _text.prepend(QLatin1String(" "));
}
开发者ID:FlavioFalcao,项目名称:qt-creator,代码行数:9,代码来源:TypePrettyPrinter.cpp

示例2: match

bool FullySpecifiedType::match(const FullySpecifiedType &otherTy, TypeMatcher *matcher) const
{
    if (_flags != otherTy._flags)
        return false;

    return type()->matchType(otherTy.type(), matcher);
}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:7,代码来源:FullySpecifiedType.cpp

示例3: acceptType

void TypePrettyPrinter::acceptType(const FullySpecifiedType &ty)
{
    const FullySpecifiedType previousFullySpecifiedType = _fullySpecifiedType;
    _fullySpecifiedType = ty;
    accept(ty.type());
    _fullySpecifiedType = previousFullySpecifiedType;
}
开发者ID:CNOT,项目名称:julia-studio,代码行数:7,代码来源:TypePrettyPrinter.cpp

示例4: visit

bool CheckDeclaration::visit(ObjCMethodDeclarationAST *ast)
{
    if (!ast->method_prototype)
        return false;

    FullySpecifiedType ty = semantic()->check(ast->method_prototype, _scope);
    ObjCMethod *methodType = ty.type()->asObjCMethodType();
    if (!methodType)
        return false;

    Symbol *symbol;
    if (ast->function_body) {
        if (!semantic()->skipFunctionBodies()) {
            semantic()->check(ast->function_body, methodType->members());
        }

        symbol = methodType;
    } else {
        Declaration *decl = control()->newDeclaration(ast->firstToken(), methodType->name());
        decl->setType(methodType);
        symbol = decl;
    }

    symbol->setStartOffset(tokenAt(ast->firstToken()).offset);
    symbol->setEndOffset(tokenAt(ast->lastToken()).offset);
    symbol->setVisibility(semantic()->currentVisibility());

    if (semantic()->isObjCClassMethod(ast->method_prototype->method_type_token))
        symbol->setStorage(Symbol::Static);

    _scope->enterSymbol(symbol);

    return false;
}
开发者ID:halsten,项目名称:beaverdbg,代码行数:34,代码来源:CheckDeclaration.cpp

示例5: accept

 void accept(const FullySpecifiedType &ty)
 {
     TypeVisitor::accept(ty.type());
     unsigned flags = ty.flags();
     flags |= temps.back().flags();
     temps.back().setFlags(flags);
 }
开发者ID:FlavioFalcao,项目名称:qt-creator,代码行数:7,代码来源:CppRewriter.cpp

示例6: visit

void CloneType::visit(NamedType *type)
{
    const Name *name = _clone->name(type->name(), _subst);
    FullySpecifiedType ty;
    if (_subst)
        ty = _subst->apply(name);
    if (! ty.isValid())
        ty = _control->namedType(name);
    _type.setType(ty.type());
}
开发者ID:Andersbakken,项目名称:rparser,代码行数:10,代码来源:Templates.cpp

示例7: acceptType

void TypePrettyPrinter::acceptType(const FullySpecifiedType &ty)
{
    if (ty.isSigned())
        _text += QLatin1String("signed ");

    else if (ty.isUnsigned())
        _text += QLatin1String("unsigned ");

    const FullySpecifiedType previousFullySpecifiedType = _fullySpecifiedType;
    _fullySpecifiedType = ty;
    accept(ty.type());
    _fullySpecifiedType = previousFullySpecifiedType;
}
开发者ID:,项目名称:,代码行数:13,代码来源:

示例8: spellTypeName

std::string TypeNameSpeller::spellTypeName(const FullySpecifiedType& fullType,
                                           const CPlusPlus::Scope* scope,
                                           std::string* alpha)
{
    spelling_.clear();
    alpha_ = alpha;

    if (fullType.isUnsigned())
        spelling_.append("unsigned ");

    scope_ = scope;
    accept(fullType.type());

    return spelling_;
}
开发者ID:maroar,项目名称:demon,代码行数:15,代码来源:TypeNameSpeller.cpp

示例9: toString

QString CPlusPlus::toString(FullySpecifiedType ty, QString id)
{
    Overview oo;
    return QString::fromLatin1("%0: %1 (a %2)").arg(id, oo.prettyType(ty),
                                                    QLatin1String(ty.type() ? typeid(*ty.type()).name() : "(null)"));
}
开发者ID:kliq2,项目名称:qt-creator,代码行数:6,代码来源:Dumpers.cpp


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