本文整理汇总了C++中ContextMap::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ ContextMap::begin方法的具体用法?C++ ContextMap::begin怎么用?C++ ContextMap::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ContextMap
的用法示例。
在下文中一共展示了ContextMap::begin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetContext
// Fetches a context by index.
Context* GetContext(int index)
{
ContextMap::iterator i = contexts.begin();
int count = 0;
if (index >= GetNumContexts())
index = GetNumContexts() - 1;
while (count < index)
{
++i;
++count;
}
if (i == contexts.end())
return NULL;
return (*i).second;
}
示例2: 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;
}