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


C++ wxVector::erase方法代码示例

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


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

示例1: DestroyWindow

// window procedure of a hidden window which is created just to receive
// the notification message when a process exits
LRESULT APIENTRY
wxExecuteWindowCbk(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    if ( message == wxWM_PROC_TERMINATED )
    {
        DestroyWindow(hWnd);    // we don't need it any more

        wxExecuteData * const data = (wxExecuteData *)lParam;
        if ( data->handler )
        {
            data->handler->OnTerminate((int)data->dwProcessId,
                                       (int)data->dwExitCode);
        }

        if ( data->state )
        {
            // we're executing synchronously, tell the waiting thread
            // that the process finished
            data->state = false;
        }
        else
        {
            // asynchronous execution - we should do the clean up
#if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */
#   pragma ivdep
#   pragma swp
#   pragma unroll
#   pragma prefetch
#   if 0
#       pragma simd noassert
#   endif
#endif /* VDM auto patch */
            for ( wxVector<HANDLE>::iterator it = gs_asyncThreads.begin();
                  it != gs_asyncThreads.end();
                  ++it )
            {
                if ( *it == data->hThread )
                {
                    gs_asyncThreads.erase(it);
                    if ( !::CloseHandle(data->hThread) )
                    {
                        wxLogLastError(wxT("CloseHandle(hThread)"));
                    }
                    break;
                }
            }

            delete data;
        }

        return 0;
    }
    else
    {
        return ::DefWindowProc(hWnd, message, wParam, lParam);
    }
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:59,代码来源:utilsexc.cpp

示例2: StartNextTestIfNecessary

void MyClient::StartNextTestIfNecessary()
{
    while ( !m_tests.empty() )
    {
        MyClientTestFunc testfunc = m_tests.front();
        m_tests.erase(m_tests.begin());
        (this->*testfunc)();
    }
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例3:

 virtual ~MyClass()
 {
     for ( size_t i=0; i<gs_myClassInstances.size(); i++ )
     {
         if ( gs_myClassInstances[i] == this )
         {
             gs_myClassInstances.erase(gs_myClassInstances.begin()+i);
         }
     }
 }
开发者ID:euler0,项目名称:Helium,代码行数:10,代码来源:anytest.cpp

示例4: SoundStopped

// Notification when a sound has stopped
void wxSound::SoundStopped(const wxSoundData* data)
{
    for ( wxVector<wxSoundData*>::iterator s = s_soundsPlaying.begin();
         s != s_soundsPlaying.end(); ++s )
    {
        if ( (*s) == data )
        {
            s_soundsPlaying.erase(s);
            break;
        }
    }
}
开发者ID:beanhome,项目名称:dev,代码行数:13,代码来源:sound_osx.cpp

示例5: RemoveVisibleNotification

void wxNotificationMessageWindow::RemoveVisibleNotification(wxNotificationMessageWindow* notif)
{
    for ( wxVector<wxNotificationMessageWindow*>::iterator it = ms_visibleNotifications.begin();
        it != ms_visibleNotifications.end(); ++it )
    {
        if ( *it == notif )
        {
            ms_visibleNotifications.erase(it);
            break;
        }
    }
    ResizeAndFitVisibleNotifications();
}
开发者ID:CodeSmithyIDE,项目名称:wxWidgets,代码行数:13,代码来源:notifmsgg.cpp

示例6: defined

    virtual ~MyClass()
    {
#if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */
#   pragma ivdep
#   pragma swp
#   pragma unroll
#   pragma prefetch
#   if 0
#       pragma simd noassert
#   endif
#endif /* VDM auto patch */
        for ( size_t i=0; i<gs_myClassInstances.size(); i++ )
        {
            if ( gs_myClassInstances[i] == this )
            {
                gs_myClassInstances.erase(gs_myClassInstances.begin()+i);
            }
        }
    }
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:19,代码来源:anytest.cpp


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