本文整理汇总了C++中StringBuilder::setColor方法的典型用法代码示例。如果您正苦于以下问题:C++ StringBuilder::setColor方法的具体用法?C++ StringBuilder::setColor怎么用?C++ StringBuilder::setColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringBuilder
的用法示例。
在下文中一共展示了StringBuilder::setColor方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: print
void DesignatedInitExpr::print(StringBuilder& buffer, unsigned indent) const {
buffer.indent(indent);
buffer.setColor(COL_EXPR);
buffer << "DesignatedInitExpr ";
Expr::print(buffer, 0);
if (getDesignatorKind() == ARRAY_DESIGNATOR) {
buffer << " array";
} else {
buffer << " field";
}
buffer << '\n';
buffer.indent(indent);
buffer.setColor(COL_ATTR);
if (getDesignatorKind() == ARRAY_DESIGNATOR) {
buffer << "Designator = [" << index.getSExtValue() << "]\n";
designator->print(buffer, indent + INDENT);
} else {
buffer << "field = ";
buffer.setColor(COL_VALUE);
buffer << '\'' << field << '\'' << '\n';
}
buffer.indent(indent);
buffer.setColor(COL_ATTR);
buffer << "InitValue=\n";
initValue->print(buffer, indent + INDENT);
}
示例2: fullDebugImpl
void PointerType::fullDebugImpl(StringBuilder& buffer, int indent) const {
buffer.indent(indent);
buffer.setColor(COL_STMT);
buffer << "[PointerType] " << (void*)this << '\n';
buffer.indent(indent);
buffer.setColor(COL_ATTR);
buffer << "pointee=\n";
PointeeType.fullDebug(buffer, indent+INDENT);
Type::fullDebugImpl(buffer, indent);
}
示例3: debugPrint
void QualType::debugPrint(StringBuilder& buffer) const {
if (isNull()) {
buffer.setColor(ANSI_RED);
buffer << "??";
buffer.setColor(ANSI_NORMAL);
} else {
printQualifiers(buffer);
getTypePtr()->debugPrint(buffer);
}
}
示例4: print
void QualType::print(StringBuilder& buffer) const {
buffer.setColor(COL_TYPE);
buffer << '\'';
debugPrint(buffer);
buffer << '\'';
const Type* T = getTypePtrOrNull();
if (T && T != T->canonicalType.getTypePtrOrNull()) {
buffer.setColor(COL_CANON);
buffer << "=>";
getCanonicalType().debugPrint(buffer);
}
}
示例5: fullDebug
void QualType::fullDebug(StringBuilder& buffer, int indent) const {
buffer.indent(indent);
buffer.setColor(COL_EXPR);
buffer << "[QualType] " << (void*)this;
buffer.setColor(COL_ATTR);
buffer << " qualifiers=";
printQualifiers(buffer);
buffer << '\n';
if (isNull()) {
buffer.indent(indent);
buffer.setColor(ANSI_RED);
buffer << "type=NULL\n";
} else {
getTypePtr()->fullDebug(buffer, indent);
}
}
示例6: fullDebug
void EnumType::fullDebug(StringBuilder& buffer, int indent) const {
buffer.indent(indent);
buffer.setColor(COL_STMT);
buffer << "[EnumType] " << (void*)this << '\n';
buffer << "TODO\n";
Type::fullDebug(buffer, indent);
}
示例7: debugPrint
void Type::debugPrint(StringBuilder& buffer) const {
// only used to print canonical type (called by Sub-Class::debugPrint())
buffer << " canonical=";
if (canonicalType.isNull()) {
buffer.setColor(ANSI_RED);
buffer << "???";
} else {
const Type* Canon = canonicalType.getTypePtr();
buffer.setColor(COL_ATTR);
if (Canon == this) {
buffer << "this";
} else {
Canon->printName(buffer);
}
}
buffer << '\n';
}
示例8: debugPrint
void UnresolvedType::debugPrint(StringBuilder& buffer) const {
if (decl) {
buffer << "(Unresolved)" << decl->getName();
} else {
buffer.setColor(ANSI_RED);
printLiteral(buffer);
}
}