本文整理汇总了C++中ogre::configfile::SettingsMultiMap::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ SettingsMultiMap::begin方法的具体用法?C++ SettingsMultiMap::begin怎么用?C++ SettingsMultiMap::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::configfile::SettingsMultiMap
的用法示例。
在下文中一共展示了SettingsMultiMap::begin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadResources
KBOOL AppFrame::LoadResources()
{
// Load resource paths from config file
Ogre::ConfigFile cf;
cf.load("resources.cfg");
// Go through all sections & settings in the file
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
Ogre::String secName, typeName, archName;
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i)
{
typeName = i->first;
archName = i->second;
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
archName, typeName, secName);
}
}
return true;
示例2: setupResources
// Resources
//-------------------------------------------------------------------------------------
void BaseApp::setupResources()
{
// Load resource paths from config file
Ogre::ConfigFile cf;
std::string s = PATHMANAGER::GameConfigDir() +
(pSet->tex_size > 0 ? "/resources_ed.cfg" : "/resources_s_ed.cfg");
cf.load(s);
// Go through all sections & settings in the file
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
Ogre::String secName, typeName, archName;
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i)
{
typeName = i->first;
archName = i->second;
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
PATHMANAGER::Data() + "/" + archName, typeName, secName);
}
}
}
示例3: setupResources
void GraphicsManager::setupResources(void)
{
Ogre::ConfigFile cf;
cf.load(RESOURCE_CONFIG);
Ogre::ConfigFile::SectionIterator itSection = cf.getSectionIterator();
Ogre::String section, type, arch;
while (itSection.hasMoreElements()) {
section = itSection.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap* mapSettings = itSection.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator itSettings = mapSettings->begin();
while (itSettings != mapSettings->end()) {
type = itSettings->first;
arch = itSettings->second;
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(arch, type, section);
++itSettings;
}
}
Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
return;
}
示例4: InitializeProgram
void GeneralInitialization::InitializeProgram()
{
Ogre::ConfigFile configFile;
Ogre::String secName;
Ogre::String typeName;
Ogre::String archName;
#ifdef _DEBUG
root = new Ogre::Root(Data::pluginsCfg_d);
configFile.load(Data::resourcesCfg_d);
#else
root = new Ogre::Root(Data::pluginsCfg);
configFile.load(Data::resourcesCfg);
#endif
Ogre::ConfigFile::SectionIterator sectIter = configFile.getSectionIterator();
while (sectIter.hasMoreElements())
{
secName = sectIter.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap *settings = sectIter.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i)
{
typeName = i->first;
archName = i->second;
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(archName, typeName, secName);
}
}
}
示例5: setupResources
//-------------------------------------------------------------------------------------
void BaseApplication::setupResources(void)
{
// Load resource paths from config file
Ogre::ConfigFile cf;
cf.load(mResourcesCfg);
// Go through all sections & settings in the file
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
#if (OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS)
Ogre::String bunPath = Ogre::macBundlePath() ;
bunPath.push_back( '/' ) ;
#endif
Ogre::String secName, typeName, archName;
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i)
{
typeName = i->first;
#if (OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS)
archName = bunPath + i->second;
#else
archName = i->second;
#endif
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
archName, typeName, secName);
}
}
}
示例6: setupResources
void OgreEngine::setupResources(void)
{
// Load resource paths from config file
Ogre::ConfigFile cf;
cf.load(m_resources_cfg);
// Go through all sections & settings in the file
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
Ogre::String secName, typeName, archName;
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i)
{
typeName = i->first;
archName = i->second;
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
archName, typeName, secName);
}
}
Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
}
示例7: setupResources
//-------------------------------------------------------------------------------------
void BaseApplication::setupResources(void)
{
// Load resource paths from config file
Ogre::ConfigFile cf;
cf.load(mResourcesCfg);
// Go through all sections & settings in the file
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
Ogre::String secName, typeName, archName;
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i)
{
typeName = i->first;
archName = i->second;
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
archName, typeName, secName);
}
}
// create the yarp ports
inYarpSceneObjsPort.open("/ogreClient/scene/in");
}
示例8: Load
void CSamples::Load()
{
Ogre::ConfigFile cf;
#ifdef _DEBUG
cf.load("samples_d.cfg");
#else
cf.load("samples.cfg");
#endif
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
Ogre::String secName, typeName, archName;
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
for (Ogre::ConfigFile::SettingsMultiMap::iterator i = settings->begin(); i != settings->end(); ++i)
{
if (i->first == "StartSample")
{
m_app = GetSampleObject(i->second);
if (m_app != 0)
{
RunStartSample();
}
}
}
}
}
示例9: setupResources
//-------------------------------------------------------------------------------------
void THIS::setupResources(void)
{
cout << "<TRACE><LOG><SceneManager><setupResources> " << endl;
// Load resource paths from config file
Ogre::ConfigFile cf;
cf.load(mResourcesCfg);
// Go through all sections & settings in the file
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
Ogre::String secName, typeName, archName;
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i)
{
typeName = i->first;
archName = i->second;
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
archName, typeName, secName);
}
}
}
示例10: setupResources
void TrackerRenderer::setupResources(void) {
// Load resource paths from config file
Ogre::ConfigFile cf;
cf.load(mResourcesCfg);
std::string package_path =
ros::package::getPath(ROS_PACKAGE_NAME) + +"/ogre_media/";
// Go through all sections & settings in the file
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
Ogre::String secName, typeName, archName;
while (seci.hasMoreElements()) {
secName = seci.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap* settings = seci.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i) {
typeName = i->first;
archName = i->second;
archName = package_path + archName;
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
archName, typeName, secName);
}
}
}
示例11: SetupResources
void OneLeftApplication::SetupResources() {
Ogre::ConfigFile config;
config.load("resources.cfg");
Ogre::ConfigFile::SectionIterator section_iterator =
config.getSectionIterator();
Ogre::String section_name, type_name, arch_name;
while (section_iterator.hasMoreElements()) {
section_name = section_iterator.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap* settings =
section_iterator.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator iterator;
for (iterator = settings->begin();
iterator != settings->end();
++iterator) {
type_name = iterator->first;
arch_name = iterator->second;
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
arch_name, type_name, section_name);
}
}
}
示例12: preloadResources
void GameManager::preloadResources()
{
/* Load resource paths from config file */
Ogre::ConfigFile cf;
cf.load("resources.cfg");
/* go through all settings in the file */
Ogre::ConfigFile::SectionIterator itSection = cf.getSectionIterator();
Ogre::String sSection, sType, sArch;
while(itSection.hasMoreElements())
{
sSection = itSection.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap *mapSettings = itSection.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator itSetting = mapSettings->begin();
while(itSetting != mapSettings->end())
{
sType = itSetting->first;
sArch = itSetting->second;
mRoot->addResourceLocation(sArch, sType, sSection);
++itSetting;
}
}
/* Initialise resources */
Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
}
示例13: SetupResources
bool GameApp::SetupResources()
{
// load resources
Ogre::String secName, typeName, archName;
Ogre::ConfigFile cf;
cf.load("resources_d.cfg");
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap* settings = seci.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i)
{
typeName = i->first;
archName = i->second;
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(archName, typeName, secName);
}
}
Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
return true;
}
示例14: LoadResourceFile
//------------------------------------------------------------------------------
bool wxOgreResources::LoadResourceFile(const Ogre::String& file)
{
Ogre::ConfigFile cf;
cf.load(file);
Ogre::ConfigFile::SectionIterator it = cf.getSectionIterator();
Ogre::String location, type, group;
while (it.hasMoreElements()) {
group = it.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap *settings = it.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i) {
type = i->first;
location = i->second;
try {
m_rmgr->addResourceLocation(location, type, group);
} catch (Ogre::Exception& e) {
wxOgreExceptionBox(e);
return false;
}
}
}
return true;
}
示例15: parseResourcesConfig
void OgreInitializer::parseResourcesConfig(const Ogre::String &name)
{
mResourcesFile = name;
Ogre::ConfigFile cf;
cf.load(mResourcesPath + name);
// Go through all sections & settings in the file
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
Ogre::String secName, typeName, archName;
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i)
{
typeName = i->first;
archName = i->second;
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_IPHONE
if (!Ogre::StringUtil::startsWith(archName, "/", false)) // only adjust relative dirs
archName = Ogre::String(Ogre::macBundlePath() + "/" + archName);
#endif
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(archName, typeName, secName);
}
}
}