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


C++ Indent函数代码示例

本文整理汇总了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);
}
开发者ID:taysom,项目名称:tau,代码行数:11,代码来源:dir.c

示例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();
}
开发者ID:AmirAbrams,项目名称:haiku,代码行数:11,代码来源:PicturePrinter.cpp

示例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);
}
开发者ID:eranshir,项目名称:ArangoDB,代码行数:11,代码来源:ahuacatl-statement-dump.c

示例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;
 }
开发者ID:MarkLeone,项目名称:PostHaste,代码行数:13,代码来源:IRStmt.cpp

示例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]);
}
开发者ID:BOTCrusher,项目名称:sagetv,代码行数:11,代码来源:mp4property.cpp

示例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);
	}
}
开发者ID:EasyRPG,项目名称:liblcf,代码行数:11,代码来源:writer_xml.cpp

示例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("]:");
 }
开发者ID:sudarkoff,项目名称:serialization,代码行数:12,代码来源:BasicTextOutArchive.hpp

示例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());
			}
		}
开发者ID:umissthestars,项目名称:tinymoe,代码行数:12,代码来源:TinymoeAst.cpp

示例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;
}
开发者ID:HenderOrlando,项目名称:clamav-bytecode-compiler,代码行数:13,代码来源:DocumentXML.cpp

示例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);
    }
}
开发者ID:RavenB,项目名称:Earth-and-Beyond-server,代码行数:12,代码来源:ChunkTypes.cpp

示例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";
}
开发者ID:refnum,项目名称:quesa,代码行数:12,代码来源:CameraRange.cpp

示例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);
}
开发者ID:ragekit,项目名称:SketchupOutlines,代码行数:12,代码来源:XMLExporterBase.cpp

示例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;
	}
开发者ID:tablacus,项目名称:Avestan,代码行数:12,代码来源:xmlwriter.cpp

示例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);
    }
}
开发者ID:RavenB,项目名称:Earth-and-Beyond-server,代码行数:12,代码来源:ChunkTypes.cpp

示例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;
		}
开发者ID:gesius,项目名称:AudioComplete,代码行数:12,代码来源:CAAudioFile.cpp


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