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


C++ WrapperMap::end方法代码示例

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


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

示例1: visitAllPyObjects

void BindingManager::visitAllPyObjects(ObjectVisitor visitor, void* data)
{
    WrapperMap copy = m_d->wrapperMapper;
    for (WrapperMap::iterator it = copy.begin(); it != copy.end(); ++it) {
        if (hasWrapper(it->first))
            visitor(it->second, data);
    }
}
开发者ID:renatofilho,项目名称:Shiboken,代码行数:8,代码来源:bindingmanager.cpp

示例2: showWrapperMap

static void showWrapperMap(const WrapperMap& wrapperMap)
{
    if (Py_VerboseFlag > 0) {
        fprintf(stderr, "-------------------------------\n");
        fprintf(stderr, "WrapperMap: %p (size: %d)\n", &wrapperMap, (int) wrapperMap.size());
        WrapperMap::const_iterator iter;
        for (iter = wrapperMap.begin(); iter != wrapperMap.end(); ++iter) {
            fprintf(stderr, "key: %p, value: %p (%s, refcnt: %d)\n", iter->first,
                                                            iter->second,
                                                            Py_TYPE(iter->second)->tp_name,
                                                            (int) ((PyObject*)iter->second)->ob_refcnt);
        }
        fprintf(stderr, "-------------------------------\n");
    }
}
开发者ID:renatofilho,项目名称:Shiboken,代码行数:15,代码来源:bindingmanager.cpp

示例3: GetProcessesXML

//--------------------------------------------------------------
/// Generates XML that describes the injected processes and which
/// plugins were injected.
/// \return string containing the XML
//--------------------------------------------------------------
gtASCIIString ProcessTracker::GetProcessesXML()
{
    std::unordered_map< DWORD, gtASCIIString > procXMLMap;

    this->UpdateListOfInjectedProcesses();

    ProcessInfoList injectedProcesses = this->GetListOfInjectedProcesses();

    WrapperMap wrappers = GetWrapperMap();

    // the strPlatform is named this way to match options in the client.
#ifdef X64
    gtASCIIString strPlatform = "Win64";
#else
    gtASCIIString strPlatform = "Win32";
#endif

#ifndef CODEXL_GRAPHICS

    if (injectedProcesses.empty() == true)
    {
        LogConsole(logERROR, "There are no processes running which have been injected with the GPU PerfStudio server plugin\n");
        LogConsole(logERROR, "Please ensure that the server has the same bitness as the target application\n");
        LogConsole(logERROR, "For example, use the 64-bit GPU PerfStudio server with a 64-bit application\n");
    }

#endif

    for (ProcessInfoList::iterator procIter = injectedProcesses.begin();
         procIter != injectedProcesses.end();
         ++procIter)
    {

        DWORD pid = procIter->th32ProcessID;

        // only add the process info if it wasn't already found.
        if (procXMLMap.find(pid) == procXMLMap.end())
        {
            // insert new process and the process info
            gtASCIIString tmpString = XML("Name", XMLEscape(procIter->szExeFile).asCharArray());
            tmpString += XML("PID", pid);
            tmpString += XML("Path", XMLEscape(procIter->szPath).asCharArray());
            tmpString += XML("Platform",  strPlatform.asCharArray());
            procXMLMap[ pid ] = tmpString;

            // if this process is the one that was launched, then we know what the args and working directory were.
            // we could probably get the actual args and working dir from MicroDLL if it is a different app though, which
            // would be the case if this app uses a launcher app.
            if (m_injectedAppName.compare(procIter->szPath) == 0)
            {
                tmpString = XML("Args", XMLEscape(m_injectedAppArgs.c_str()).asCharArray());
                tmpString += XML("WDir", XMLEscape(m_injectedAppDir.c_str()).asCharArray());
                procXMLMap[ pid ] += tmpString.asCharArray();
            }
        }

        // add an API node for each of the wrappers that are injected into the app
        for (WrapperMap::const_iterator wrapperIter = wrappers.begin(); wrapperIter != wrappers.end(); ++wrapperIter)
        {
            // List of plugin extensions to check for. On Windows, test for 32 and 64 bit plugins.
            // On linux, just check for the plugin corresponding to the server bitness
            static const char* pluginExtensions[] =
            {
#ifdef WIN32
                GDT_DEBUG_SUFFIX GDT_BUILD_SUFFIX "." DLL_EXTENSION,
                "-x64" GDT_DEBUG_SUFFIX GDT_BUILD_SUFFIX "." DLL_EXTENSION
#else
                GDT_PROJECT_SUFFIX "." DLL_EXTENSION
#endif
            };

            int numPlugins = sizeof(pluginExtensions) / sizeof(pluginExtensions[0]);

            for (int loop = 0; loop < numPlugins; loop++)
            {
                // check to see if this wrapper is in the application
                gtASCIIString strPluginName = wrapperIter->second.strPluginName;

                if (SG_GET_BOOL(OptionDllReplacement) == false)
                {
                    strPluginName += pluginExtensions[loop];
                }

                if (IsLibraryLoadedInProcess(pid, strPluginName.asCharArray(), NULL))
                {
                    bool attached = false;

                    if (g_activeWrappersMap.find(FormatText("%lu/%s", pid, wrapperIter->first.c_str()).asCharArray()) != g_activeWrappersMap.end())
                    {
                        // the pid/plugin string was listed in the active wrappers map, so the plugin must be active.
                        attached = true;
                    }

                    procXMLMap[pid] += XMLAttrib("API", FormatText("attached='%s'", attached ? "TRUE" : "FALSE").asCharArray(), wrapperIter->second.strPluginShortDesc.asCharArray());
                }
//.........这里部分代码省略.........
开发者ID:StephenThomasUWTSD,项目名称:CodeXL,代码行数:101,代码来源:ProcessTracker.cpp


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