本文整理汇总了C++中ConfigSet::size方法的典型用法代码示例。如果您正苦于以下问题:C++ ConfigSet::size方法的具体用法?C++ ConfigSet::size怎么用?C++ ConfigSet::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigSet
的用法示例。
在下文中一共展示了ConfigSet::size方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: trim
void
Style::mergeConfig( const Config& conf )
{
if ( _name.empty() )
_name = conf.value( "name" );
// if there's no explicit name, use the KEY as the name.
if ( _name.empty() )
_name = conf.key();
conf.getIfSet( "url", _uri ); // named "url" for back compat
_origType = conf.value( "type" );
std::string textData = trim(conf.value());
bool useCSS =
_origType.compare("text/css") == 0 ||
!textData.empty();
if ( useCSS )
{
_origData = textData;
// just take the first block.
ConfigSet blocks;
CssUtils::readConfig( _origData, conf.referrer(), blocks );
if ( blocks.size() > 0 )
{
fromSLD( blocks.front() );
}
}
else
{
Config symbolConf = conf.child( "symbols" );
if ( !symbolConf.empty() )
{
for( ConfigSet::const_iterator i = symbolConf.children().begin(); i != symbolConf.children().end(); ++i )
{
const Config& c = *i;
Symbol* symbol = SymbolRegistry::instance()->create( c );
add(symbol);
}
}
}
}
示例2: initialize
DataManager::DataManager(osgEarth::MapNode* mapNode) : _mapNode(mapNode), _maxUndoStackSize( 128 )
{
if (_mapNode)
{
_map = _mapNode->getMap();
//Look for viewpoints in the MapNode externals
const Config& externals = _mapNode->externalConfig();
const ConfigSet children = externals.children("viewpoint");
if (children.size() > 0)
{
for( ConfigSet::const_iterator i = children.begin(); i != children.end(); ++i )
_viewpoints.push_back(Viewpoint(*i));
}
}
initialize();
}