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


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

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


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

示例1: OnExit

    virtual void OnExit()
    {
        if ( gs_heventShutdown.IsOk() )
        {
            // stop any threads waiting for the termination of asynchronously
            // running processes
            if ( !gs_heventShutdown.Set() )
            {
                wxLogDebug(wxT("Failed to set shutdown event in wxExecuteModule"));
            }

            gs_heventShutdown.Close();

            // now wait until they terminate
            if ( !gs_asyncThreads.empty() )
            {
                const size_t numThreads = gs_asyncThreads.size();

                if ( ::WaitForMultipleObjects
                       (
                        numThreads,
                        &gs_asyncThreads[0],
                        TRUE,   // wait for all of them to become signalled
                        3000    // long but finite value
                       ) == WAIT_TIMEOUT )
                {
                    wxLogDebug(wxT("Failed to stop all wxExecute monitor threads"));
                }

#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 n = 0; n < numThreads; n++ )
                {
                    ::CloseHandle(gs_asyncThreads[n]);
                }

                gs_asyncThreads.clear();
            }
        }

        if ( gs_classForHiddenWindow )
        {
            if ( !::UnregisterClass(wxMSWEXEC_WNDCLASSNAME, wxGetInstance()) )
            {
                wxLogLastError(wxT("UnregisterClass(wxExecClass)"));
            }

            gs_classForHiddenWindow = NULL;
        }
    }
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:57,代码来源:utilsexc.cpp

示例2: glBegin

void wxGLAPI::glBegin(GLenum mode)
{
#if wxUSE_OPENGL_EMULATION
    if ( s_mode != 0xFF )
    {
        wxFAIL_MSG("nested glBegin");
    }
    
    s_mode = mode;
    s_texCoordsUsed = false;
    s_colorsUsed = false;
    s_normalsUsed = false;
    
    s_texCoords.clear();
    s_normals.clear();
    s_colors.clear();
    s_vertices.clear();
#else
    ::glBegin(mode);
#endif
}
开发者ID:BloodRedd,项目名称:gamekit,代码行数:21,代码来源:glcmn.cpp

示例3: OnExit

    virtual void OnExit()
    {
        if ( gs_heventShutdown )
        {
            // stop any threads waiting for the termination of asynchronously
            // running processes
            if ( !::SetEvent(gs_heventShutdown) )
            {
                wxLogDebug(wxT("Failed to set shutdown event in wxExecuteModule"));
            }

            ::CloseHandle(gs_heventShutdown);
            gs_heventShutdown = NULL;

            // now wait until they terminate
            if ( !gs_asyncThreads.empty() )
            {
                const size_t numThreads = gs_asyncThreads.size();

                if ( ::WaitForMultipleObjects
                        (
                            numThreads,
                            &gs_asyncThreads[0],
                            TRUE,   // wait for all of them to become signalled
                            3000    // long but finite value
                        ) == WAIT_TIMEOUT )
                {
                    wxLogDebug(wxT("Failed to stop all wxExecute monitor threads"));
                }

                for ( size_t n = 0; n < numThreads; n++ )
                {
                    ::CloseHandle(gs_asyncThreads[n]);
                }

                gs_asyncThreads.clear();
            }
        }

        if ( gs_classForHiddenWindow )
        {
            if ( !::UnregisterClass(wxMSWEXEC_WNDCLASSNAME, wxGetInstance()) )
            {
                wxLogLastError(wxT("UnregisterClass(wxExecClass)"));
            }

            gs_classForHiddenWindow = NULL;
        }
    }
开发者ID:,项目名称:,代码行数:49,代码来源:


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