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


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

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


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

示例1: MonitorFromPoint

	RenderWindow* Win32GLSupport::newWindow(const String &name, unsigned int width, 
		unsigned int height, bool fullScreen, const NameValuePairList *miscParams)
	{		
		Win32Window* window = OGRE_NEW Win32Window(*this);
		NameValuePairList newParams;
	
		if (miscParams != NULL)
		{	
			newParams = *miscParams;
			miscParams = &newParams;

			NameValuePairList::const_iterator monitorIndexIt = miscParams->find("monitorIndex");			
			HMONITOR hMonitor = NULL;
			int monitorIndex = -1;
		
			// If monitor index found, try to assign the monitor handle based on it.
			if (monitorIndexIt != miscParams->end())
			{				
				if (mMonitorInfoList.empty())		
					EnumDisplayMonitors(NULL, NULL, sCreateMonitorsInfoEnumProc, (LPARAM)&mMonitorInfoList);			

				monitorIndex = StringConverter::parseInt(monitorIndexIt->second);
				if (monitorIndex < (int)mMonitorInfoList.size())
				{						
					hMonitor = mMonitorInfoList[monitorIndex].hMonitor;					
				}
			}
			// If we didn't specified the monitor index, or if it didn't find it
			if (hMonitor == NULL)
			{
				POINT windowAnchorPoint;
		
				NameValuePairList::const_iterator opt;
				int left = -1;
				int top  = -1;

				if ((opt = newParams.find("left")) != newParams.end())
					left = StringConverter::parseInt(opt->second);

				if ((opt = newParams.find("top")) != newParams.end())
					top = StringConverter::parseInt(opt->second);

				// Fill in anchor point.
				windowAnchorPoint.x = left;
				windowAnchorPoint.y = top;


				// Get the nearest monitor to this window.
				hMonitor = MonitorFromPoint(windowAnchorPoint, MONITOR_DEFAULTTOPRIMARY);				
			}

			newParams["monitorHandle"] = StringConverter::toString((size_t)hMonitor);																
		}

		window->create(name, width, height, fullScreen, miscParams);

		if(!mInitialWindow)
			mInitialWindow = window;
		return window;
	}
开发者ID:Ali-il,项目名称:gamekit,代码行数:60,代码来源:OgreWin32GLSupport.cpp

示例2: setParameterList

 //-----------------------------------------------------------------------
 void StringInterface::setParameterList(const NameValuePairList& paramList)
 {
     NameValuePairList::const_iterator i, iend;
     iend = paramList.end();
     for (i = paramList.begin(); i != iend; ++i)
     {
         setParameter(i->first, i->second);
     }
 }
开发者ID:Ketzer2002,项目名称:meridian59-engine,代码行数:10,代码来源:OgreStringInterface.cpp

示例3: buildCommandMap

    void CommandMapper::buildCommandMap(KeyAndMouseCommandMap& cmdMap,
        const NameValuePairList& values)
    {
        for (NameValuePairList::const_iterator it = values.begin(); it != values.end(); it++)
        {
            // Split the path at the ',' character
            StringVector keys = Ogre::StringUtil::split(it->second, ",");

            for (size_t i = 0; i < keys.size(); i++)
            {
                int keycode = getKeyCode(keys[i]);
                cmdMap[keycode] = CeGuiString(it->first);
                LOG_MESSAGE(Logger::UI,
                    Ogre::String("Key ") + keys[i] + " ("
                    + StringConverter::toString(keycode)
                    + ") is assigned to command " + it->first);
            }
        }
    }
开发者ID:BackupTheBerlios,项目名称:dsa-hl-svn,代码行数:19,代码来源:CommandMapper.cpp


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