本文整理汇总了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);
}
}
示例2: StartNextTestIfNecessary
void MyClient::StartNextTestIfNecessary()
{
while ( !m_tests.empty() )
{
MyClientTestFunc testfunc = m_tests.front();
m_tests.erase(m_tests.begin());
(this->*testfunc)();
}
}
示例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);
}
}
}
示例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;
}
}
}
示例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();
}
示例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);
}
}
}