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


C++ KOutMsg函数代码示例

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


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


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