本文整理汇总了C++中Indent函数的典型用法代码示例。如果您正苦于以下问题:C++ Indent函数的具体用法?C++ Indent怎么用?C++ Indent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Indent函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrintTree
static void PrintTree (DirEntry_s *direntry, int indent)
{
if (!direntry) return;
if (Option.print) {
Indent(indent);
printf("%s %s\n", direntry->type == T_DIR ? "D" : "F",
direntry->name);
}
PrintTree(direntry->child, indent + 1);
PrintTree(direntry->sibling, indent);
}
示例2: Indent
void PicturePrinter::SetFontSpacing(int32 spacing) {
Indent(); Print("SetFontSpacing");
switch(spacing) {
case B_CHAR_SPACING: Print("B_CHAR_SPACING"); break;
case B_STRING_SPACING: Print("B_STRING_SPACING"); break;
case B_BITMAP_SPACING: Print("B_BITMAP_SPACING"); break;
case B_FIXED_SPACING: Print("B_FIXED_SPACING"); break;
default: Print("Unknown: ", (float)spacing);
}
Cr();
}
示例3: DumpStatementStart
static TRI_aql_node_t* DumpStatementStart (TRI_aql_statement_walker_t* const walker,
TRI_aql_node_t* const node) {
if (node == NULL) {
return node;
}
assert(walker);
Indent((TRI_aql_dump_t*) walker->_data);
return DumpNode(walker, node);
}
示例4: PrintPos
// Update current position, printing it if it's significantly different
// from the previous position.
void PrintPos(IRInst* inst, unsigned int indent)
{
const IRPos& newPos = inst->GetPos();
if (newPos.GetFile() != mLastPos.GetFile() ||
newPos.GetLine() > mLastPos.GetLine() + 5 ||
newPos.GetLine() < mLastPos.GetLine()) {
Indent(indent) << "#line " << newPos.GetLine() << " "
<< '"' << newPos.GetFile() << '"' << "\n";
}
mLastPos = newPos;
}
示例5: Indent
void MP4Integer64Property::Dump(FILE* pFile, u_int8_t indent,
bool dumpImplicits, u_int32_t index)
{
if (m_implicit && !dumpImplicits) {
return;
}
Indent(pFile, indent);
fprintf(pFile,
"%s = "U64" (0x%016"X64F")\n",
m_name, m_values[index], m_values[index]);
}
示例6: Indent
void XmlWriter::WriteVector(const std::vector<T>& val) {
Indent();
typename std::vector<T>::const_iterator it;
bool first = true;
for (it = val.begin(); it != val.end(); it++) {
if (!first)
stream.put(' ');
first = false;
Write<T>(*it);
}
}
示例7: SaveStart
void SaveStart(char const* name)
{
if (name == 0) return;
if(m_depth > 0){
this->This()->Save("\n");
Indent();
}
++m_depth;
this->This()->Save("[");
this->This()->Save(name);
this->This()->Save("]:");
}
示例8: Indent
void AstIfStatement::PrintInternal(ostream& o, int indentation)
{
o << Indent(indentation) << "if (";
condition->Print(o, indentation, shared_from_this());
o << endl;
trueBranch->Print(o, indentation + 1, shared_from_this());
if (falseBranch)
{
o << endl;
falseBranch->Print(o, indentation + 1, shared_from_this());
}
}
示例9: assert
//---------------------------------------------------------
DocumentXML& DocumentXML::toParent() {
assert(NodeStack.size() > 1 && "too much backtracking");
if (HasCurrentNodeSubNodes) {
Indent();
Out << "</" << NodeStack.top() << ">\n";
} else
Out << "/>\n";
NodeStack.pop();
HasCurrentNodeSubNodes = true;
return *this;
}
示例10: ChunkHModelNode
void ChunkHModelNode(BYTE *data, DWORD size)
{
W3dHModelNodeStruct *node = (W3dHModelNodeStruct *) data;
int num_nodes = size / sizeof(W3dHModelNodeStruct);
for (int i=0; i<num_nodes; i++)
{
printf("HModelNode.Name: \"%s\"\n", node->RenderObjName);
fprintf(outf,"%sHModelNode.Name: \"%s\"\n", Indent(), node->RenderObjName);
}
}
示例11: DataLengthException
void CameraRange::Process( uint32_t inStartOffset,
uint32_t inEndOffset )
{
if (inEndOffset != inStartOffset + 8)
{
throw DataLengthException( Name(), inStartOffset, inEndOffset, 8 );
}
Out() << Indent() << Name() << " ( " <<
FetchFloat32( inStartOffset ) << " " <<
FetchFloat32( inStartOffset+4 ) << " )\n";
}
示例12: va_start
void CXMLExporterBase::Write(const char* lpszFormat, ...)
{
va_list argList;
va_start(argList, lpszFormat);
Indent();
// Write the data
vfprintf(m_pFile, lpszFormat, argList);
va_end(argList);
}
示例13: StartElement
void StartElement(PCWSTR name)
{
if(!m_isTagClosed)
{
m_stream << ">\r\n";
}
Indent(m_stack.size());
m_stream << '<' << name;
m_stack.push_back(string(name));
m_isTagClosed = false;
m_hasChild = false;
}
示例14: ChunkPivot
void ChunkPivot(BYTE *data, DWORD size)
{
W3dPivotStruct *pivot = (W3dPivotStruct *) data;
int num_pivots = size / sizeof(W3dPivotStruct);
for (int i=0; i<num_pivots; i++)
{
printf("Pivot.Name: \"%s\"\n", pivot[i].Name);
fprintf(outf,"%sPivot.Name: \"%s\"\n", Indent(), pivot[i].Name);
}
}
示例15: FunctionLogger
FunctionLogger(const char *name, const char *fmt=NULL, ...) : mName(name) {
Indent();
printf("-> %s ", name);
if (fmt) {
va_list args;
va_start(args, fmt);
vprintf(fmt, args);
va_end(args);
}
printf("\n");
++sIndent;
}