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


C++ wxFFile::Flush方法代码示例

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


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

示例1: ExecuteCmd

bool DbgGdb::ExecuteCmd( const wxString &cmd )
{
    if( m_gdbProcess ) {
        if ( m_info.enableDebugLog ) {
#if DBG_LOG
            if(gfp.IsOpened()) {
                gfp.Write(wxString::Format( wxT( "DEBUG>>%s\n" ), cmd.c_str() ));
                gfp.Flush();
            }
#else
            m_observer->UpdateAddLine( wxString::Format( wxT( "DEBUG>>%s" ), cmd.c_str() ) );
#endif
        }
        return m_gdbProcess->Write( cmd );
    }
    return false;
}
开发者ID:LoviPanda,项目名称:codelite,代码行数:17,代码来源:debuggergdb.cpp

示例2: Poke

void DbgGdb::Poke()
{
    static wxRegEx reCommand( wxT( "^([0-9]{8})" ) );



    //poll the debugger output
    wxString curline;
    if ( !m_gdbProcess || m_gdbOutputArr.IsEmpty() ) {
        return;
    }

    while ( DoGetNextLine( curline ) ) {

        GetDebugeePID(curline);

        // For string manipulations without damaging the original line read
        wxString tmpline ( curline );
        StripString( tmpline );
        tmpline.Trim().Trim( false );
        if ( m_info.enableDebugLog ) {
            //Is logging enabled?

            if ( curline.IsEmpty() == false && !tmpline.StartsWith( wxT( ">" ) ) ) {
                wxString strdebug( wxT( "DEBUG>>" ) );
                strdebug << curline;
#if DBG_LOG
                if(gfp.IsOpened()) {
                    gfp.Write(strdebug);
                    gfp.Flush();
                }
#else
                m_observer->UpdateAddLine( strdebug );
#endif
            }
        }

        if ( reConnectionRefused.Matches( curline ) ) {
            StripString( curline );
#ifdef __WXGTK__
            m_consoleFinder.FreeConsole();
#endif
            m_observer->UpdateAddLine( curline );
            m_observer->UpdateGotControl( DBG_EXITED_NORMALLY );
            return;
        }

        // Check for "Operation not permitted" usually means
        // that the process does not have enough permission to
        // attach to the process
        if( curline.Contains(wxT("Operation not permitted")) ) {
#ifdef __WXGTK__
            m_consoleFinder.FreeConsole();
#endif
            m_observer->UpdateAddLine( _("Failed to start debugger: permission denied") );
            m_observer->UpdateGotControl( DBG_EXITED_NORMALLY );
            return;

        }

        if( tmpline.StartsWith( wxT( ">" ) ) ) {
            // Shell line, probably user command line
            continue;
        }

        if ( curline.StartsWith( wxT( "~" ) ) || curline.StartsWith( wxT( "&" ) ) || curline.StartsWith("@") ) {

            // lines starting with ~ are considered "console stream" message
            // and are important to the CLI handler
            bool consoleStream( false );
            bool targetConsoleStream(false);

            if ( curline.StartsWith( wxT( "~" ) ) ) {
                consoleStream = true;
            }

            if ( curline.StartsWith( wxT( "@" ) ) ) {
                targetConsoleStream = true;
            }

            // Filter out some gdb error lines...
            if ( FilterMessage( curline ) ) {
                continue;
            }

            StripString( curline );

            // If we got a valid "CLI Handler" instead of writing the output to
            // the output view, concatenate it into the handler buffer
            if ( targetConsoleStream ) {
                m_observer->UpdateAddLine( curline );

            } else if ( consoleStream && GetCliHandler()) {
                GetCliHandler()->Append( curline );

            } else if ( consoleStream ) {
                // log message
                m_observer->UpdateAddLine( curline );

            }
//.........这里部分代码省略.........
开发者ID:LoviPanda,项目名称:codelite,代码行数:101,代码来源:debuggergdb.cpp


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