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


C++ Ostream::StandardOutput方法代码示例

本文整理汇总了C++中Ostream::StandardOutput方法的典型用法代码示例。如果您正苦于以下问题:C++ Ostream::StandardOutput方法的具体用法?C++ Ostream::StandardOutput怎么用?C++ Ostream::StandardOutput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ostream的用法示例。


在下文中一共展示了Ostream::StandardOutput方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: IncrementalRecompilation

//
// Check whether or not there are files to be recompiled.
//
bool Control::IncrementalRecompilation()
{
    //
    // Empty out the type lookup table so that it does not continue
    // to point to a type that is deleted here.
    //
    type_table.SetEmpty();

    SymbolSet candidates(input_java_file_set.Size() +
                         input_class_file_set.Size() +
                         recompilation_file_set.Size());

    if (! recompilation_file_set.IsEmpty())
        candidates = recompilation_file_set;
    else
    {
        Ostream out;
        out.StandardOutput();
        out << endl << "Incremental: Enter to continue or q + Enter to quit: "
            << flush;

        char ch;
        // See if the user types Q or presses enter/escape or sends an EOF
        while (1) {
            cin.get(ch);
            if (cin.eof() || (ch == U_q) || (ch == U_Q)) {
                return false;
            }
            if ((ch == U_ESCAPE) || (ch == U_LINE_FEED)) {
                break;
            }
        }

        candidates = input_java_file_set;
        candidates.Union(input_class_file_set);
    }

    if (!candidates.IsEmpty())
    {
        TypeDependenceChecker dependence_checker(this, candidates,
                                                 type_trash_bin);
        dependence_checker.PartialOrder();

        //
        // Compute the initial set of files that need to be recompiled. Place
        // them in recompilation_file_set.
        //
        RereadDirectories();

        ComputeRecompilationSet(dependence_checker);
    }

    //
    // Starting with the initial recompilation_file_set, complete the
    // computation of the set of files that need to be recompiled. (Add all
    // new files to recompilation_file_set). Also, complete the computation of
    // type_trash_set, the set of files that should be removed from the
    // database as they will be recompiled.
    //
    fprintf(stderr, "%s", (recompilation_file_set.IsEmpty() &&
                           expired_file_set.IsEmpty()
                           ? "\nnothing changed...\n" : "\nok...\n"));
    fflush(stderr);
    return true;
}
开发者ID:prog012,项目名称:jikes,代码行数:68,代码来源:incrmnt.cpp


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