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