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


C++ AttrListPrintMask::has_headings方法代码示例

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


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

示例1: ppDisplayHeadings

static void ppDisplayHeadings(FILE* file, ClassAd *ad, const char * pszExtra)
{
    if (ad) {
        // render the first ad to a string so the column widths update
        std::string tmp;
        pm.display(tmp, ad, NULL);
    }
    if (pm.has_headings()) {
        pm.display_Headings(file);
    } else {
        pm.display_Headings(file, pm_head);
    }
    if (pszExtra)
        printf("%s", pszExtra);
}
开发者ID:valtri,项目名称:htcondor,代码行数:15,代码来源:prettyPrint.cpp

示例2: printHeader

static void printHeader()
{
    // Print header
    if ( ! longformat) {
        if ( ! customFormat) {
            // hack to get backward-compatible formatting
            if ( ! wide_format && 80 == wide_format_width)
                short_header();
            else {
                init_default_custom_format();
                if ( ! wide_format || 0 != wide_format_width) {
                    int console_width = wide_format_width;
                    if (console_width <= 0) console_width = getConsoleWindowSize()-1; // -1 because we get double spacing if we use the full width.
                    if (console_width < 0) console_width = 1024;
                    mask.SetOverallWidth(console_width);
                }
            }
        }
        if (customFormat && mask.has_headings()) {
            mask.display_Headings(stdout);
        }
    }
}
开发者ID:duncanrand,项目名称:htcondor,代码行数:23,代码来源:history.cpp

示例3: if

void
prettyPrint (ClassAdList &adList, TrackTotals *totals)
{
    ppOption pps = using_print_format ? PP_CUSTOM : ppStyle;
    ClassAd	*ad;
    int     classad_index;
    int     last_classad_index;
    bool    fPrintHeadings = pm.has_headings() || (pm_head.Length() > 0);

    classad_index = 0;
    last_classad_index = adList.Length() - 1;
    adList.Open();
    while ((ad = adList.Next())) {
        if (!wantOnlyTotals) {
            switch (pps) {
              case PP_STARTD_NORMAL:
                if (absentMode) {
                    printStartdAbsent (ad, (classad_index == 0));
                } else if( offlineMode ) {
                    printStartdOffline( ad, (classad_index == 0));
                } else {
                    printStartdNormal (ad, (classad_index == 0));
                }
                break;

              case PP_STARTD_SERVER:
                printServer (ad, (classad_index == 0));
                break;

              case PP_STARTD_RUN:
                printRun (ad, (classad_index == 0));
                break;

              case PP_STARTD_COD:
                printCOD (ad);
                break;

              case PP_STARTD_STATE:
                printState(ad, (classad_index == 0));
                break;

#ifdef HAVE_EXT_POSTGRESQL
              case PP_QUILL_NORMAL:
                printQuillNormal (ad);
                break;
#endif /* HAVE_EXT_POSTGRESQL */

              case PP_SCHEDD_NORMAL:
                printScheddNormal (ad, (classad_index == 0));
                break;

              case PP_NEGOTIATOR_NORMAL:
                printNegotiatorNormal (ad, (classad_index == 0));
                break;


              case PP_SCHEDD_SUBMITTORS:
                printScheddSubmittors (ad, (classad_index == 0));
                break;

              case PP_VERBOSE:
                printVerbose (ad);
                break;

              case PP_XML:
                printXML (ad, (classad_index == 0),
                    (classad_index == last_classad_index));
                break;

              case PP_MASTER_NORMAL:
                printMasterNormal(ad, (classad_index == 0));
                break;

              case PP_COLLECTOR_NORMAL:
                printCollectorNormal(ad, (classad_index == 0));
                break;

              case PP_CKPT_SRVR_NORMAL:
                printCkptSrvrNormal(ad, (classad_index == 0));
                break;

              case PP_STORAGE_NORMAL:
                printStorageNormal(ad, (classad_index == 0));
                break;

              case PP_GRID_NORMAL:
                printGridNormal(ad, (classad_index == 0));
                break;

              case PP_GENERIC_NORMAL:
              case PP_GENERIC:
              case PP_ANY_NORMAL:
                printAnyNormal(ad, (classad_index == 0));
                break;

              case PP_CUSTOM:
                  // hack: print a single item to a string, then discard the string
                  // this makes sure that the headings line up correctly over the first
                  // line of data.
                if (fPrintHeadings) {
//.........这里部分代码省略.........
开发者ID:valtri,项目名称:htcondor,代码行数:101,代码来源:prettyPrint.cpp


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