本文整理汇总了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(" "));
}
示例2: match
bool FullySpecifiedType::match(const FullySpecifiedType &otherTy, TypeMatcher *matcher) const
{
if (_flags != otherTy._flags)
return false;
return type()->matchType(otherTy.type(), matcher);
}
示例3: acceptType
void TypePrettyPrinter::acceptType(const FullySpecifiedType &ty)
{
const FullySpecifiedType previousFullySpecifiedType = _fullySpecifiedType;
_fullySpecifiedType = ty;
accept(ty.type());
_fullySpecifiedType = previousFullySpecifiedType;
}
示例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;
}
示例5: accept
void accept(const FullySpecifiedType &ty)
{
TypeVisitor::accept(ty.type());
unsigned flags = ty.flags();
flags |= temps.back().flags();
temps.back().setFlags(flags);
}
示例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());
}
示例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;
}
示例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_;
}
示例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)"));
}