本文整理汇总了C++中ossimRefPtr::getTag方法的典型用法代码示例。如果您正苦于以下问题:C++ ossimRefPtr::getTag方法的具体用法?C++ ossimRefPtr::getTag怎么用?C++ ossimRefPtr::getTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossimRefPtr
的用法示例。
在下文中一共展示了ossimRefPtr::getTag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: recursiveAdd
void ossimPlanetQtLegendItem::recursiveAdd(QTreeWidgetItem* parent,
const ossimRefPtr<ossimXmlNode> node)
{
if(!node.valid())
{
return;
}
const std::vector<ossimRefPtr<ossimXmlNode> >& childNodes = node->getChildNodes();
if(childNodes.size() == 0)
{
QTreeWidgetItem* item = new QTreeWidgetItem(parent);
item->setText(0, node->getTag().c_str());
item->setText(1, node->getText().c_str());
}
else
{
ossim_uint32 idx = 0;
ossim_uint32 idxMax = 0;
idxMax = childNodes.size();
QTreeWidgetItem* item = new QTreeWidgetItem(parent);
item->setText(0, node->getTag().c_str());
item->setText(1, node->getText().c_str());
for(idx = 0; idx < idxMax; ++idx)
{
recursiveAdd(item, childNodes[idx]);
}
}
}
示例2: parseFile
ossimErrorCode ossimRpfFrame::parseFile(const ossimFilename& filename,
bool minimalParse)
{
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRpfFrame::parseFile: entered......" << std::endl;
}
ossimErrorCode result = ossimErrorCodes::OSSIM_OK;
//Make sure any fileds have beend cleared
clearFields();
// Make sure all data is deleted. The initialize call the
// populate methods. These methods will re-allocate the information
deleteAll();
theNitfFile = new ossimNitfFile;
theNitfFile->parseFile(filename);
const ossimRefPtr<ossimNitfFileHeader> nitfFileHeader =
theNitfFile.valid() ? theNitfFile->getHeader() : 0;
if(!nitfFileHeader)
{
theNitfFile = 0;
return ossimErrorCodes::OSSIM_ERROR;
}
ossimNitfTagInformation info;
nitfFileHeader->getTag(info, "RPFHDR");
theFilename = filename;
if(info.getTagName() == "RPFHDR")
{
ifstream in(filename.c_str(), ios::in|ios::binary);
// set the get pointer for the stream to the start
// of the Rpf header data
in.seekg(info.getTagDataOffset(), ios::beg);
if(theHeader) delete theHeader;
theHeader = new ossimRpfHeader;
// if(theHeader->parseStream(in) != ossimErrorCodes::OSSIM_OK)
theHeader->parseStream(in);
if ( in.fail() )
{
deleteAll();
return ossimErrorCodes::OSSIM_ERROR;
}
else
// if(!in.fail()&&theHeader)
{
result = populateAttributeSection(in);
// This is needed for ossim-rpf --list-frames so NOT put in full parse section.
if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
{
result = populateReplaceUpdateTable(in);
}
if ( minimalParse == false )
{
if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
{
populateCompressionSection(in);
}
if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
{
result = populateCoverageSection(in);
}
if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
{
result = populateImageSection(in);
}
if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
{
result = populateColorGrayscaleSection(in);
}
if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
{
result = populateMasks(in);
}
}
}
}
else
{
return ossimErrorCodes::OSSIM_ERROR;
}
return ossimErrorCodes::OSSIM_OK;
}