• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ KOutMsg函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中KOutMsg函数的典型用法代码示例。如果您正苦于以下问题:C++ KOutMsg函数的具体用法?C++ KOutMsg怎么用?C++ KOutMsg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: vdb_info_print_xml_uint64

static rc_t vdb_info_print_xml_uint64( const char * tag, const uint64_t value )
{
    if ( value != 0 )
        return KOutMsg( "<%s>%lu<%s>\n", tag, value, tag );
    else
        return 0;
}
开发者ID:DCGenomics,项目名称:sra-tools,代码行数:7,代码来源:vdb_info.c


示例2: vdb_info_print_json_s

static rc_t vdb_info_print_json_s( const char * tag, const char * value )
{
    if ( value[ 0 ] != 0 )
        return KOutMsg( "\"%s\":\"%s\",\n", tag, value );
    else
        return 0;
}
开发者ID:DCGenomics,项目名称:sra-tools,代码行数:7,代码来源:vdb_info.c


示例3: copy_metadata_attribs

static rc_t copy_metadata_attribs ( const KMDataNode *snode, KMDataNode *dnode,
                                    const char *node_path, const bool show_meta )
{
    KNamelist *attrs;
    uint32_t i, count;
    rc_t rc = KMDataNodeListAttr ( snode, & attrs );
    DISP_RC( rc, "copy_metadata_child:KMDataNodeListAttr(src) failed" );
    if ( rc != 0 ) return rc;
    rc = KNamelistCount ( attrs, & count );
    for ( i = 0; rc == 0 && i < count; ++ i )
    {
        const char *attr;
        rc = KNamelistGet ( attrs, i, & attr );
        if ( rc == 0 )
        {
            char buffer [ 1024 ];
            size_t bytes;
            /* test for attr existence */
            rc = KMDataNodeReadAttr ( dnode, attr, buffer, sizeof buffer, & bytes );
            if ( rc != 0 )
            {
                rc = KMDataNodeReadAttr ( snode, attr, buffer, sizeof buffer, & bytes );
                if ( rc == 0 )
                {
                    if ( show_meta )
                        KOutMsg( "copy atr %s : %s\n", node_path, attr );
                    rc = KMDataNodeWriteAttr ( dnode, attr, buffer );
                }
            }
        }
        DISP_RC( rc, "copy_metadata_child:failed to copy attribute" );
    }
    KNamelistRelease ( attrs );
    return rc;
}
开发者ID:gconcepcion,项目名称:sratoolkit,代码行数:35,代码来源:copy_meta.c


示例4: vdb_info_print_xml_s

static rc_t vdb_info_print_xml_s( const char * tag, const char * value )
{
    if ( value[ 0 ] != 0 )
        return KOutMsg( "<%s>%s</%s>\n", tag, value, tag );
    else
        return 0;
}
开发者ID:DCGenomics,项目名称:sra-tools,代码行数:7,代码来源:vdb_info.c


示例5: pileup_v2_exit_ref_pos

static rc_t CC pileup_v2_exit_ref_pos( ref_walker_data * rwd )
{
    pileup_v2_ctx * ctx = rwd->data;
    rc_t rc = KOutMsg( "%s\t%u\t%c\t%u\t", rwd->ref_name, rwd->pos + 1, rwd->ascii_ref_base, rwd->depth );
    if ( rc == 0 )
        rc = print_dyn_string( ctx->bases );
    if ( rc == 0 && ctx->print_qual )
    {
        rc = KOutMsg( "\t" );
        if ( rc == 0 )
            rc = print_dyn_string( ctx->qual );
    }
    if ( rc == 0 )
        rc = KOutMsg( "\n" );
    return rc;
}
开发者ID:Bhumi28,项目名称:sra-tools,代码行数:16,代码来源:pileup_v2.c


示例6: enter_vdbcopy_node

static rc_t enter_vdbcopy_node( KMetadata *dst_meta, const bool show_meta )
{
    rc_t rc;
    KMDataNode *hist_node;

    if ( show_meta )
        KOutMsg( "--- entering Copy entry...\n" );

    rc = KMetadataOpenNodeUpdate ( dst_meta, &hist_node, "HISTORY" );
    DISP_RC( rc, "enter_vdbcopy_node:KMetadataOpenNodeUpdate('HISTORY') failed" );
    if ( rc == 0 )
    {
        char event_name[ 32 ];
        uint32_t index = get_child_count( hist_node ) + 1;
        rc = string_printf ( event_name, sizeof( event_name ), NULL, "EVENT_%u", index );
        DISP_RC( rc, "enter_vdbcopy_node:string_printf(EVENT_NR) failed" );
        if ( rc == 0 )
        {
            KMDataNode *event_node;
            rc = KMDataNodeOpenNodeUpdate ( hist_node, &event_node, event_name );
            DISP_RC( rc, "enter_vdbcopy_node:KMDataNodeOpenNodeUpdate('EVENT_NR') failed" );
            if ( rc == 0 )
            {
                rc = enter_date_name_vers( event_node );
                KMDataNodeRelease ( event_node );
            }
        }
        KMDataNodeRelease ( hist_node );
    }
    return rc;
}
开发者ID:gconcepcion,项目名称:sratoolkit,代码行数:31,代码来源:copy_meta.c


示例7: Usage

rc_t CC Usage (const Args * args)
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if (args == NULL)
        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
    else
        rc = ArgsProgram (args, &fullpath, &progname);
    if (rc)
        progname = fullpath = UsageDefaultName;

    UsageSummary (progname);

    KOutMsg ("Options:\n");

    HelpOptionLine (ALIAS_LITE, OPTION_LITE, NULL, lite_usage);
#if USE_FORCE
    HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, force_usage);
#endif
    HelpOptionsStandard ();
    HelpVersion (fullpath, KAppVersion());
    return rc;
}
开发者ID:ncbi,项目名称:sra-tools,代码行数:25,代码来源:sra-kar.c


示例8: UsageSummary

rc_t CC UsageSummary ( const char * progname )
{
    return KOutMsg ( 	"\n"
						"Usage:\n"
						"  %s <sra-accession> <gtf-file> [options]\n"
						"\n", progname );
}
开发者ID:Jingyu9,项目名称:sra-tools,代码行数:7,代码来源:main_fkt.c


示例9: temp_registry_merge

/* -------------------------------------------------------------------- */
rc_t temp_registry_merge( temp_registry * self,
                          KDirectory * dir,
                          const char * output_filename,
                          size_t buf_size,
                          bool show_progress,
                          bool force,
                          compress_t compress )
{
    rc_t rc = 0;
    if ( self == NULL )
        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcSelf, rcNull );
    else if ( output_filename == NULL )
        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
    else
    {
        struct bg_progress * progress = NULL;
        
        if ( show_progress )
        {
            rc = KOutMsg( "concat :" );
            if ( rc == 0 )
            {
                uint64_t total = total_size( dir, &self -> lists );
                rc = bg_progress_make( &progress, total, 0, 0 ); /* progress_thread.c */
            }
        }
        
        if ( rc == 0 )
        {
            uint32_t first;
            uint32_t count = count_valid_entries( &self -> lists, &first ); /* above */
            if ( count == 1 )
            {
                /* we have only ONE set of files... */
                VNamelist * l = VectorGet ( &self -> lists, first );
                VNamelistReorder ( l, false );
                rc = execute_concat( dir,
                    output_filename,
                    l,
                    buf_size,
                    progress,
                    force,
                    compress ); /* concatenator.c */
            }
            else if ( count > 1 )
            {
                /* we have MULTIPLE sets of files... */
                cmn_merge cmn = { dir, output_filename, buf_size, progress, force, compress };
                on_merge_ctx omc = { &cmn, 0 };
                VectorInit( &omc . threads, 0, count );
                VectorForEach ( &self -> lists, false, on_merge, &omc );
                join_and_release_threads( &omc . threads ); /* helper.c */
            }
            
            bg_progress_release( progress ); /* progress_thread.c ( ignores NULL )*/
        }
    }
    return rc;
}
开发者ID:ncbi,项目名称:sra-tools,代码行数:60,代码来源:temp_registry.c


示例10: on_history_path

static rc_t CC on_history_path( const String * part, void *data )
{
    tool_options * options = data;
    rc_t rc = add_tool_options_path( options, part->addr );
    if ( options -> detailed )
        KOutMsg( "source: %S\n", part );
    return rc;
}
开发者ID:ncbi,项目名称:sra-tools,代码行数:8,代码来源:cache-mgr.c


示例11: UsageSummary

rc_t CC UsageSummary ( const char * progname )
{
    return KOutMsg (
        "\n"
        "Usage:\n"
        "  %s [options] -f <url | accession> -d <dst_path> -c no\n"
        "\n", progname );
}
开发者ID:mariux,项目名称:sratoolkit,代码行数:8,代码来源:refseq-load.c


示例12: Usage

rc_t CC Usage ( const Args * args )
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if ( args == NULL )
        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
    else
    {
        rc = ArgsProgram ( args, &fullpath, &progname );

        if ( rc != 0 )
            progname = fullpath = UsageDefaultName;

        rc = UsageSummary ( progname );
        if ( rc != 0 )
        {
            PLOGERR( klogErr, ( klogErr, rc,
                     "UsageSummary() failed in $(func)", "func=%s", __func__ ) );

        }
        else
            rc = KOutMsg ( "Options:\n" );

        if ( rc == 0 )
        {
            uint32_t idx, count = sizeof ToolOptions / sizeof ToolOptions [ 0 ];
            for ( idx = 0; idx < count; ++idx )
            {
                OptDef * o = &ToolOptions[ idx ];
                HelpOptionLine ( o->aliases, o->name, NULL, o->help );
            }
        }

        if ( rc == 0 )
            rc = KOutMsg ( "\n" );

        if ( rc == 0 )
        {
            HelpOptionsStandard ();
            HelpVersion ( fullpath, KAppVersion() );
        }
    }
    return rc;
}
开发者ID:DCGenomics,项目名称:sra-tools,代码行数:46,代码来源:cache-mgr.c


示例13: print_header_callback

static void CC print_header_callback( BSTNode *n, void *data )
{
    seq_id_node * node = ( seq_id_node * )n;
    hdr_print_ctx * hctx = ( hdr_print_ctx * )data;
    if ( hctx->rc == 0 )
    {
        if ( hctx->use_seq_id )
            hctx->rc = KOutMsg( "@SQ\tSN:%s\tLN:%u\n", node->seq_id, node->seq_len );
        else
        {
            if ( cmp_pchar_0( node->seq_id, node->name ) == 0 )
                hctx->rc = KOutMsg( "@SQ\tSN:%s\tLN:%u\n", node->name, node->seq_len );
            else
                hctx->rc = KOutMsg( "@SQ\tSN:%s\tAS:%s\tLN:%u\n", node->name, node->seq_id, node->seq_len );
        }
    }
}
开发者ID:DCGenomics,项目名称:sra-tools,代码行数:17,代码来源:sam-hdr.c


示例14: report_ref_loc

static rc_t report_ref_loc( const VDBManager *vdb_mgr, VFSManager * vfs_mgr, const char * seq_id )
{
    const String * path;
    rc_t rc = resolve_accession( vfs_mgr, seq_id, &path );
    if ( rc == 0 )
    {
        rc = KOutMsg( "location:\t%S\n", path );
        if ( rc == 0 )
        {
            uint32_t pt = VDBManagerPathType ( vdb_mgr, "%S", path );
            const char * spt = path_type_2_str( pt );
            rc = KOutMsg( "pathtype:\t%s\n", spt );
        }
        free ( (void*) path );
    }
    return rc;
}
开发者ID:mariux,项目名称:sratoolkit,代码行数:17,代码来源:reref.c


示例15: UsageSummary

rc_t CC UsageSummary(const char *progname) {
    KOutMsg("Update user's NCBI VDB crypto password\n"
            "If not run with --quiet recommendations\n"
            "are given if errors are detected.\n"
            "\n");

    return 0;
}
开发者ID:Bhumi28,项目名称:sra-tools,代码行数:8,代码来源:vdb-passwd.c


示例16: perform_unlock

static rc_t perform_unlock( visit_ctx * octx )
{
    rc_t rc = 0;
    unlock_data data;

    memset( &data, 0, sizeof data );
    octx->data = &data;
    if ( rc == 0 )
        rc = foreach_path( octx, on_unlock_path );

    if ( rc == 0 )
        rc = KOutMsg( "-----------------------------------\n" );
    if ( rc == 0 )
        rc = KOutMsg( "%,u lock-files removed\n", data.lock_count );

    return rc;
}
开发者ID:DCGenomics,项目名称:sra-tools,代码行数:17,代码来源:cache-mgr.c


示例17: vdb_fastq_loop_with_name

static rc_t vdb_fastq_loop_with_name( const p_dump_context ctx, const fastq_ctx * fctx )
{
    rc_t rc = 0;
    int64_t row_id;

    vdn_start( ctx->row_generator );
    while ( vdn_next( ctx->row_generator, (uint64_t*)&row_id ) && rc == 0 )
    {
        rc = Quitting();
        if ( rc == 0 )
        {
            uint32_t elem_bits, boff, row_len, name_len;
            const char * data;
            const char * name;

            rc = VCursorCellDataDirect( fctx->cursor, row_id, fctx->idx_name, &elem_bits,
                                        (const void**)&name, &boff, &name_len );
            if ( rc != 0 )
                vdb_fastq_row_error( "VCursorCellDataDirect( row#$(row_nr), NAME ) failed", rc, row_id );
            else
            {
                rc = VCursorCellDataDirect( fctx->cursor, row_id, fctx->idx_read, &elem_bits,
                                            (const void**)&data, &boff, &row_len );
                if ( rc != 0 )
                    vdb_fastq_row_error( "VCursorCellDataDirect( row#$(row_nr), READ ) failed", rc, row_id );
                else
                {
                    rc = KOutMsg( "@%s.%li %.*s length=%u\n%.*s\n",
                                  fctx->run_name, row_id, name_len, name, row_len, row_len, data );
                    if ( rc == 0 )
                    {
                        rc = VCursorCellDataDirect( fctx->cursor, row_id, fctx->idx_qual, &elem_bits,
                                                    (const void**)&data, &boff, &row_len );
                        if ( rc != 0 )
                            vdb_fastq_row_error( "VCursorCellDataDirect( row#$(row_nr), QUALITY ) failed", rc, row_id );
                        else
                            rc = KOutMsg( "+%s.%li %.*s length=%u\n%.*s\n",
                                          fctx->run_name, row_id, name_len, name, row_len, row_len, data );
                    }
                }
            }
        }
    }
    return rc;
}
开发者ID:sungsoo,项目名称:sratoolkit,代码行数:45,代码来源:vdb-dump-fastq.c


示例18: perform_report

static rc_t perform_report( visit_ctx * octx )
{
    rc_t rc = 0;
    report_data data;

    memset( &data, 0, sizeof data );
    octx->data = &data;

    if ( octx->options->detailed )
        rc = KOutMsg( "\n-----------------------------------\n" );
    if ( rc == 0 )
        rc = foreach_path( octx, on_report_path );

    if ( rc == 0 )
        rc = KOutMsg( "-----------------------------------\n" );
    if ( rc == 0 )
        rc = KOutMsg( "%,u cached file(s)\n", data.partial_count );
    if ( rc == 0 )
        rc = KOutMsg( "%,u complete file(s)\n", data.full_count );
    if ( rc == 0 )
        rc = KOutMsg( "%,u bytes in cached files\n", data.file_size );
    if ( rc == 0 )
        rc = KOutMsg( "%,u bytes used in cached files\n", data.used_file_size );
    if ( rc == 0 )
        rc = KOutMsg( "%,u lock files\n", data.lock_count );

    return rc;
}
开发者ID:DCGenomics,项目名称:sra-tools,代码行数:28,代码来源:cache-mgr.c


示例19: UsageSummary

rc_t CC UsageSummary (const char * progname) {
    return KOutMsg (
        "Usage:\n"
        "  %s [options] [<query> ...]\n"
        "\n"
        "Summary:\n"
        "  Display VDB configuration information\n"
        "\n", progname);
}
开发者ID:mariux,项目名称:sratoolkit,代码行数:9,代码来源:vdb-config.c


示例20: UsageSummary

rc_t CC UsageSummary ( const char *prog_name )
{
    return KOutMsg ( "Usage: %s [options] src-object dst-object\n"
                     "       %s [options] src-object [src-object...] dst-dir\n"
                     "\n"
                     , prog_name
                     , prog_name
        );
}
开发者ID:DCGenomics,项目名称:sra-tools,代码行数:9,代码来源:sra-sort.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ KPrintF函数代码示例发布时间:2022-05-30
下一篇:
C++ KOBJMETHOD函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap