本文整理汇总了C++中FullySpecifiedType::isUnsigned方法的典型用法代码示例。如果您正苦于以下问题:C++ FullySpecifiedType::isUnsigned方法的具体用法?C++ FullySpecifiedType::isUnsigned怎么用?C++ FullySpecifiedType::isUnsigned使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FullySpecifiedType
的用法示例。
在下文中一共展示了FullySpecifiedType::isUnsigned方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: collectFieldNames
static QStringList collectFieldNames(ClassSpecifierAST *classAST, bool onlyTokensAndASTNodes)
{
QStringList fields;
Overview oo;
Class *clazz = classAST->symbol;
for (unsigned i = 0; i < clazz->memberCount(); ++i) {
Symbol *s = clazz->memberAt(i);
if (Declaration *decl = s->asDeclaration()) {
const QString declName = oo(decl->name());
const FullySpecifiedType ty = decl->type();
if (const PointerType *ptrTy = ty->asPointerType()) {
if (onlyTokensAndASTNodes) {
if (const NamedType *namedTy = ptrTy->elementType()->asNamedType()) {
if (oo(namedTy->name()).endsWith(QLatin1String("AST")))
fields.append(declName);
}
} else {
fields.append(declName);
}
} else if (ty.isUnsigned()) {
fields.append(declName);
}
}
}
return fields;
}
示例2: 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;
}
示例3: 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_;
}
示例4: hasReturnType
bool Function::hasReturnType() const
{
const FullySpecifiedType ty = returnType();
return ty.isValid() || ty.isSigned() || ty.isUnsigned();
}