本文整理汇总了C++中do_indent函数的典型用法代码示例。如果您正苦于以下问题:C++ do_indent函数的具体用法?C++ do_indent怎么用?C++ do_indent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了do_indent函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: do_indent
void IRPrinter::visit(const Pipeline *op) {
do_indent();
stream << "produce " << op->name << " {" << endl;
indent += 2;
print(op->produce);
indent -= 2;
if (op->update.defined()) {
do_indent();
stream << "} update {" << endl;
indent += 2;
print(op->update);
indent -= 2;
}
do_indent();
stream << "} consume {" << endl;
indent += 2;
print(op->consume);
indent -= 2;
do_indent();
stream << "}" << endl;
}
示例2: debug_each_source_column
static void
debug_each_source_column()
{
do_indent ();
fprintf (ipf->output_fp, "<s_col %d cindex=%d text=\"%s\" ",
iterate_source_column->index,
iterate_source_column->cindex,
iterate_source_column->filler_flag ? (Uchar*)"<filler>" : iterate_source_column->text);
if (!iterate_source_column->index && *iterate_line->altsig)
fprintf (ipf->output_fp, "(aka `%s') ", iterate_line->altsig);
fprintf (ipf->output_fp, "cols=%d viswidth=%d zero=%s space=%s phant=%s",
iterate_source_column->columns_occupied,
iterate_source_column->visible_width,
t_or_f(iterate_composite_column->zero_flag),
t_or_f(iterate_composite_column->space_flag),
t_or_f(iterate_source_column->needs_phantom));
fprintf (ipf->output_fp, "\n");
do_indent ();
fprintf (ipf->output_fp, "\tcomposite = %p; composite_end = %p\n",
iterate_source_column->composite,
iterate_source_column->composite_end);
do_indent ();
fprintf (ipf->output_fp, " complex = %p ", iterate_source_column->complex);
if (iterate_source_column->complex_text)
{
fprintf (ipf->output_fp, "complex_has_variant=%s complex_text = `%s'>\n",
t_or_f(iterate_source_column->complex_has_variant),
print_escaped(iterate_source_column->complex_text));
}
else
fprintf (ipf->output_fp, ">\n");
}
示例3: json_line_open_windows
static void json_line_open_windows(FILE *f, int indent, const char *key,
const List<SettingsFileOpenWindow> &open_windows)
{
do_indent(f, indent);
fprintf(f, "%s: ", key);
json_line_indent(f, &indent, "[");
for (int i = 0; i < open_windows.length(); i += 1) {
const SettingsFileOpenWindow *open_window = &open_windows.at(i);
do_indent(f, indent);
json_line_indent(f, &indent, "{");
json_line_comment(f, indent, "which perspective this window uses");
json_line_int(f, indent, "perspective", open_window->perspective_index);
fprintf(f, "\n");
json_line_comment(f, indent, "position of the window on the screen");
json_line_int(f, indent, "left", open_window->left);
json_line_int(f, indent, "top", open_window->top);
json_line_int(f, indent, "width", open_window->width);
json_line_int(f, indent, "height", open_window->height);
json_line_bool(f, indent, "maximized", open_window->maximized);
fprintf(f, "\n");
json_line_comment(f, indent, "whether to show dockable pane tabs when there is only one");
json_line_bool(f, indent, "always_show_tabs", open_window->always_show_tabs);
fprintf(f, "\n");
json_line_outdent(f, &indent, "},");
}
json_line_outdent(f, &indent, "],");
}
示例4: debug_each_composite_column
static void
debug_each_composite_column()
{
List *vlist;
do_indent ();
fprintf (ipf->output_fp,
"<comp_col %d text=\"%s\" delim=\"%s\" viswidth=%d maxwidth=%d zero=%s space=%s\n",
iterate_composite_column->index,
iterate_composite_column->text,
print_escaped(iterate_composite_column->delim),
iterate_composite_column->visible_width,
iterate_composite_column->maxwidth,
t_or_f(iterate_composite_column->zero_flag),
t_or_f(iterate_composite_column->space_flag));
do_indent ();
fprintf (ipf->output_fp,
"\tcomplex_index=%d complex_columns=%d complex_has_variant=%s s_l_d=%s phant=%s>\n",
iterate_composite_column->complex_index,
iterate_composite_column->complex_columns,
t_or_f(iterate_composite_column->complex->complex_has_variant),
t_or_f(iterate_composite_column->short_line_divider),
t_or_f(iterate_composite_column->needs_phantom));
do_indent ();
fprintf (ipf->output_fp, "\tcomplex = %p\n", iterate_composite_column);
vlist = vars_lookup2(iterate_line->name, iterate_composite_column->index);
if (list_len(vlist))
{
indent += 2;
vars_normalize_length(vlist);
list_exec (vlist, debug_print_variant);
indent -= 2;
}
}
示例5: json_line_dock
static void json_line_dock(FILE *f, int indent, const char *key, const SettingsFileDock *dock) {
assert(dock);
do_indent(f, indent);
fprintf(f, "%s: ", key);
json_line_indent(f, &indent, "{");
json_line_str(f, indent, "dock_type", dock_type_to_str(dock->dock_type));
switch (dock->dock_type) {
case SettingsFileDockTypeTabs:
do_indent(f, indent);
fprintf(f, "tabs: [");
for (int i = 0; i < dock->tabs.length(); i += 1) {
json_inline_str(f, dock->tabs.at(i).encode());
if (i < dock->tabs.length() - 1)
fprintf(f, ", ");
}
fprintf(f, "],\n");
break;
case SettingsFileDockTypeHoriz:
case SettingsFileDockTypeVert:
json_line_float(f, indent, "split_ratio", dock->split_ratio);
json_line_dock(f, indent, "child_a", dock->child_a);
json_line_dock(f, indent, "child_b", dock->child_b);
break;
}
json_line_outdent(f, &indent, "},");
}
示例6: json_line_str_list
static void json_line_str_list(FILE *f, int indent, const char *key, const List<ByteBuffer> &value) {
do_indent(f, indent);
fprintf(f, "%s: ", key);
json_line_indent(f, &indent, "[");
for (int i = 0; i < value.length(); i += 1) {
do_indent(f, indent);
json_inline_str(f, value.at(i));
fprintf(f, ",\n");
}
json_line_outdent(f, &indent, "],\n");
}
示例7: debug_before_block
static void
debug_before_block()
{
do_indent ();
fprintf (ipf->output_fp, "<block %d>\n", iterate_block->index);
indent += 2;
}
示例8: debug_after_reconstructed
static void
debug_after_reconstructed()
{
indent -= 2;
do_indent ();
fprintf (ipf->output_fp, "</reconstructed %d>\n", iterate_line->index);
}
示例9: debug_after_source
static void
debug_after_source()
{
indent -= 2;
do_indent ();
fprintf (ipf->output_fp, "</source %d>\n", iterate_line->index);
}
示例10: debug_after_block
static void
debug_after_block()
{
indent -= 2;
do_indent ();
fprintf (ipf->output_fp, "</block %d>\n", iterate_block->index);
}
示例11: debug_after_outers
static void
debug_after_outers()
{
indent -= 2;
do_indent ();
fprintf (ipf->output_fp, "</outer %d>\n", iterate_outer->index);
}
示例12: SDL_GetTicks
void scope_logger::do_log_exit()
{
const int ticks = SDL_GetTicks() - ticks_;
--indent;
do_indent();
if (timestamp) (*output_) << get_timestamp(time(nullptr));
(*output_) << "} END: " << str_ << " (took " << ticks << "ms)\n";
}
示例13: debug_each_reconstructed_column
static void
debug_each_reconstructed_column()
{
do_indent ();
fprintf (ipf->output_fp, "<recons_col %d text=\"%s\" delim=\"%s\" maxwidth=%d\n",
iterate_reconstructed_column->index,
iterate_reconstructed_column->text,
print_escaped(iterate_reconstructed_column->delim),
iterate_reconstructed_column->maxwidth);
do_indent ();
fprintf (ipf->output_fp, "\tcomplex_index=%d complex_columns=%d zero=%s space=%s phant=%s>\n",
iterate_reconstructed_column->complex_index,
iterate_reconstructed_column->complex_columns,
t_or_f(iterate_reconstructed_column->zero_flag),
t_or_f(iterate_reconstructed_column->space_flag),
t_or_f(iterate_reconstructed_column->needs_phantom));
}
示例14: debug_each_outer
static void
debug_each_outer ()
{
indent -= 2;
do_indent ();
fprintf (ipf->output_fp, "<outer %d>\n", iterate_outer->index);
indent += 2;
}
示例15: do_indent
void scope_logger::do_log_exit()
{
const long ticks = (boost::posix_time::microsec_clock::local_time() - ticks_).total_milliseconds();
--indent;
do_indent();
if (timestamp) (*output_) << get_timestamp(time(nullptr));
(*output_) << "} END: " << str_ << " (took " << ticks << "ms)\n";
}