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


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

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


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

示例1: GetContext

// Fetches a previously constructed context by name.
Context* GetContext(const String& name)
{
	ContextMap::iterator i = contexts.find(name);
	if (i == contexts.end())
		return NULL;

	return (*i).second;
}
开发者ID:UIKit0,项目名称:librocket-1,代码行数:9,代码来源:Core.cpp

示例2: releaseContext

void KJavaServerMaintainer::releaseContext(QObject *w, const QString &doc)
{
    ContextMap::iterator it = m_contextmap.find(qMakePair(w, doc));
    if(it != m_contextmap.end() && --(*it).second <= 0)
    {
        kdDebug(6100) << "KJavaServerMaintainer::releaseContext" << endl;
        (*it).first->deleteLater();
        m_contextmap.remove(it);
    }
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例3: retrace_glXDestroyContext

static void retrace_glXDestroyContext(trace::Call &call) {
    ContextMap::iterator it;
    it = context_map.find(call.arg(1).toUIntPtr());
    if (it == context_map.end()) {
        return;
    }

    it->second->release();

    context_map.erase(it);
}
开发者ID:janesma,项目名称:apitrace,代码行数:11,代码来源:glretrace_glx.cpp

示例4: return

static Context *
getContext(unsigned long long context_ptr) {
    if (context_ptr == 0) {
        return NULL;
    }

    ContextMap::const_iterator it;
    it = context_map.find(context_ptr);

    return (it != context_map.end()) ? it->second : NULL;
}
开发者ID:Dhanasekahar,项目名称:apitrace,代码行数:11,代码来源:glretrace_egl.cpp

示例5: retrace_wglDeleteContext

static void retrace_wglDeleteContext(trace::Call &call) {
    unsigned long long hglrc = call.arg(0).toUIntPtr();

    ContextMap::iterator it;
    it = context_map.find(hglrc);
    if (it == context_map.end()) {
        return;
    }

    it->second->release();
    
    context_map.erase(it);
}
开发者ID:janesma,项目名称:apitrace,代码行数:13,代码来源:glretrace_wgl.cpp

示例6: qMakePair

KJavaAppletContext *KJavaServerMaintainer::getContext(QObject *w, const QString &doc)
{
    ContextMap::key_type key = qMakePair(w, doc);
    ContextMap::iterator it = m_contextmap.find(key);
    if(it != m_contextmap.end())
    {
        ++((*it).second);
        return (*it).first;
    }
    KJavaAppletContext *const context = new KJavaAppletContext();
    m_contextmap.insert(key, qMakePair(context, 1));
    return context;
}
开发者ID:,项目名称:,代码行数:13,代码来源:

示例7: return

static glws::Context *
getContext(unsigned long long context_ptr) {
    if (context_ptr == 0) {
        return NULL;
    }

    ContextMap::const_iterator it;
    it = context_map.find(context_ptr);
    if (it == context_map.end()) {
        return (context_map[context_ptr] = ws->createContext(visual, NULL));
    }

    return it->second;
}
开发者ID:pzick,项目名称:apitrace,代码行数:14,代码来源:glretrace_glx.cpp

示例8: return

static Context *
getContext(unsigned long long context_ptr) {
    if (context_ptr == 0) {
        return NULL;
    }

    ContextMap::const_iterator it;
    it = context_map.find(context_ptr);
    if (it == context_map.end()) {
        return (context_map[context_ptr] = glretrace::createContext());
    }

    return it->second;
}
开发者ID:janesma,项目名称:apitrace,代码行数:14,代码来源:glretrace_glx.cpp

示例9: assert

static Context *
getContext(unsigned long long context_ptr) {
    if (context_ptr == 0) {
        return NULL;
    }

    ContextMap::const_iterator it;
    it = context_map.find(context_ptr);
    if (it == context_map.end()) {
        assert(false);
        return NULL;
    }

    return it->second;
}
开发者ID:janesma,项目名称:apitrace,代码行数:15,代码来源:glretrace_wgl.cpp

示例10: retrace_eglDestroyContext

static void retrace_eglDestroyContext(trace::Call &call) {
    unsigned long long orig_context = call.arg(1).toUIntPtr();

    ContextMap::iterator it;
    it = context_map.find(orig_context);

    if (it != context_map.end()) {
        glretrace::Context *currentContext = glretrace::getCurrentContext();
        if (it->second != currentContext) {
            // TODO: reference count
            delete it->second;
        }
        context_map.erase(it);
    }
}
开发者ID:Dhanasekahar,项目名称:apitrace,代码行数:15,代码来源:glretrace_egl.cpp

示例11: retrace_CGLDestroyContext

static void retrace_CGLDestroyContext(trace::Call &call) {
    if (call.ret->toUInt() != kCGLNoError) {
        return;
    }

    unsigned long long ctx = call.arg(0).toUIntPtr();

    ContextMap::iterator it;
    it = context_map.find(ctx);
    if (it == context_map.end()) {
        return;
    }

    delete it->second;

    context_map.erase(it);
}
开发者ID:Dhanasekahar,项目名称:apitrace,代码行数:17,代码来源:glretrace_cgl.cpp

示例12:

static Context *
getContext(unsigned long long ctx) {
    if (ctx == 0) {
        return NULL;
    }

    ContextMap::const_iterator it;
    it = context_map.find(ctx);
    if (it == context_map.end()) {
        Context *context;
        context_map[ctx] = context = glretrace::createContext(sharedContext);
        if (!sharedContext) {
            sharedContext = context;
        }
        return context;
    }

    return it->second;
}
开发者ID:Dhanasekahar,项目名称:apitrace,代码行数:19,代码来源:glretrace_cgl.cpp

示例13: Shutdown

void Shutdown()
{
	// Notify all plugins we're being shutdown.
	PluginRegistry::Instance()->NotifyShutdown();

	// Release all remaining contexts.
	for (ContextMap::iterator itr = contexts.begin(); itr != contexts.end(); ++itr)
		Core::Log::Message(Log::LT_WARNING, "Context '%s' still active on shutdown.", (*itr).first.CString());
	contexts.clear();

	TemplateCache::Shutdown();
	StyleSheetFactory::Shutdown();
	StyleSheetSpecification::Shutdown();
	FontDatabase::Shutdown();
	TextureDatabase::Shutdown();
	Factory::Instance()->Shutdown();
  Factory::DestroyInstance();

	Log::Shutdown();

  PluginRegistry::DestroyInstance();
  PropertyParserColour::DestroyInstance();
  PropCounterSingleton::DestroyInstance();

	initialised = false;

	if (render_interface != NULL)
		render_interface->RemoveReference();

	if (file_interface != NULL)
		file_interface->RemoveReference();

	if (system_interface != NULL)
		system_interface->RemoveReference();
	
	render_interface = NULL;
	file_interface = NULL;
	system_interface = NULL;
}
开发者ID:UIKit0,项目名称:librocket-1,代码行数:39,代码来源:Core.cpp


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