本文整理汇总了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;
}
示例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);
}
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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);
}
示例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;
}
示例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;
}