本文整理汇总了C++中ossimRefPtr::findFirstNode方法的典型用法代码示例。如果您正苦于以下问题:C++ ossimRefPtr::findFirstNode方法的具体用法?C++ ossimRefPtr::findFirstNode怎么用?C++ ossimRefPtr::findFirstNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossimRefPtr
的用法示例。
在下文中一共展示了ossimRefPtr::findFirstNode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadXml
bool ossimLocalTm::loadXml(ossimRefPtr<ossimXmlNode> dateNode)
{
bool result = true;
ossimRefPtr<ossimXmlNode> month = dateNode->findFirstNode("month");
ossimRefPtr<ossimXmlNode> day = dateNode->findFirstNode("day");
ossimRefPtr<ossimXmlNode> year = dateNode->findFirstNode("year");
ossimRefPtr<ossimXmlNode> hour = dateNode->findFirstNode("hour");
ossimRefPtr<ossimXmlNode> minutes = dateNode->findFirstNode("minutes");
ossimRefPtr<ossimXmlNode> seconds = dateNode->findFirstNode("seconds");
ossimRefPtr<ossimXmlNode> fractionalSecond = dateNode->findFirstNode("fractionalSecond");
ossimRefPtr<ossimXmlNode> julian = dateNode->findFirstNode("julian");
ossimRefPtr<ossimXmlNode> modifiedJulian = dateNode->findFirstNode("modifiedJulian");
if(month.valid()&&
day.valid()&&
year.valid()&&
hour.valid()&&
minutes.valid()&&
seconds.valid())
{
setMonth(month->getText().toInt32());
setDay(day->getText().toInt32());
setYear(year->getText().toInt32());
setHour(hour->getText().toInt32());
setMin(minutes->getText().toInt32());
setSec(seconds->getText().toInt32());
if(fractionalSecond.valid())
{
setFractionalSecond(fractionalSecond->getText().toDouble());
}
else
{
setFractionalSecond(0.0);
}
}
else if(modifiedJulian.valid())
{
setDateFromModifiedJulian(modifiedJulian->getText().toDouble());
}
else if(julian.valid())
{
setDateFromJulian(julian->getText().toDouble());
}
else
{
result = false;
}
return result;
}
示例2: findFirstNode
bool ossim::findFirstNode(const ossimString& path,
ossimRefPtr<ossimXmlNode> node,
ossimString& s)
{
bool result = false;
if ( node.valid() )
{
ossimRefPtr<ossimXmlNode> n = node->findFirstNode(path);
if ( n.valid() )
{
s = n->getText();
if ( s.size() )
{
result = true;
}
else
{
if(!traceDebug())
{
ossimNotify(ossimNotifyLevel_WARN)
<< "ossim::findFirstNode ERROR:\n"
<< "Node empty: " << path
<< std::endl;
}
}
}
else
{
if(!traceDebug())
{
ossimNotify(ossimNotifyLevel_WARN)
<< "ossim::findFirstNode ERROR:\n"
<< "Node not found: " << path
<< std::endl;
}
}
}
return result;
}