本文整理汇总了C++中ossimKeywordlist::getNumberOfSubstringKeys方法的典型用法代码示例。如果您正苦于以下问题:C++ ossimKeywordlist::getNumberOfSubstringKeys方法的具体用法?C++ ossimKeywordlist::getNumberOfSubstringKeys怎么用?C++ ossimKeywordlist::getNumberOfSubstringKeys使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossimKeywordlist
的用法示例。
在下文中一共展示了ossimKeywordlist::getNumberOfSubstringKeys方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: buildChains
bool buildChains(const ossimKeywordlist& kwl,
ossimConnectableObject::ConnectableObjectList& chains)
{
ossim_int32 index = 0;
ossim_int32 result = kwl.getNumberOfSubstringKeys("file[0-9]+\\.filename");
const char* lookup = NULL;
ossim_int32 numberOfMatches = 0;
vector<ossimFilename> fileList;
while(numberOfMatches < result)
{
ossimString searchValue = "file" + ossimString::toString(index);
ossimString filename = searchValue + ".filename";
lookup = kwl.find(filename.c_str());
if(lookup)
{
fileList.push_back(ossimFilename(lookup));
++numberOfMatches;
}
++index;
}
return buildChains(fileList,
chains);
}
示例2: loadState
bool ossimBlendMosaic::loadState(const ossimKeywordlist& kwl,
const char* prefix)
{
bool result = ossimImageMosaic::loadState(kwl, prefix);
ossim_uint32 count = 0;
theWeights.clear();
if(result)
{
ossimString copyPrefix = prefix;
ossimString regExpression = ossimString("^(") + copyPrefix + "weight[0-9]+)";
ossim_uint32 result = kwl.getNumberOfSubstringKeys(regExpression);
ossim_uint32 numberOfMatches = 0;
while(numberOfMatches < result)
{
ossimString value = ossimString("weight") + ossimString::toString(count);
const char* lookup = kwl.find(copyPrefix.c_str(),
value.c_str());
if(lookup)
{
++numberOfMatches;
theWeights.push_back(ossimString(lookup).toDouble());
}
++count;
}
}
return result;
}
示例3: loadState
bool ossimQuadTreeWarp::loadState(const ossimKeywordlist& kwl,
const char* prefix)
{
clear();
ossimString newPrefix = ossimString(prefix);
// load the vertices first
//
ossimString regExpression = ossimString("^(") + newPrefix + "v[0-9]+\\.)";
ossim_uint32 result = kwl.getNumberOfSubstringKeys(regExpression);
ossim_uint32 numberOfMatches = 0;
ossim_uint32 count = 0;
while(numberOfMatches < result)
{
ossimString newPrefix = ossimString(prefix)+ossimString("v") + ossimString::toString(count) +".";
ossimQuadTreeWarpVertex* vert = new ossimQuadTreeWarpVertex;
if(!vert->loadState(kwl, newPrefix.c_str()))
{
ossimNotify(ossimNotifyLevel_FATAL) << "FATAL: "<< " ossimQuadTreeWarp::loadState, invalid load on vertex\n";
delete vert;
clear();
return false;
}
else
{
++numberOfMatches;
theVertexList.push_back(vert);
}
++count;
}
theTree = new ossimQuadTreeWarpNode;
if(!theTree->loadState(kwl, prefix))
{
clear();
return false;
}
if(!recursiveLoad(theTree, kwl, prefix))
{
clear();
return false;
}
if(!ossim2dTo2dTransform::loadState(kwl, prefix))
{
clear();
return false;
}
return true;
}