本文整理汇总了C++中GetFieldHandlePtr::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ GetFieldHandlePtr::getName方法的具体用法?C++ GetFieldHandlePtr::getName怎么用?C++ GetFieldHandlePtr::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GetFieldHandlePtr
的用法示例。
在下文中一共展示了GetFieldHandlePtr::getName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeField
void OSGWriter::writeField(GetFieldHandlePtr hF)
{
if(hF->isValid() == false)
{
return;
}
// const FieldType& fType = hF->getType();
GetMapFieldHandlePtr sfMap =
boost::dynamic_pointer_cast<
GetMapFieldHandle>(hF);
FieldContainerPtrSFieldBase::GetHandlePtr sfFCPtr =
boost::dynamic_pointer_cast<FieldContainerPtrSFieldBase::GetHandle>(hF);
FieldContainerPtrMFieldBase::GetHandlePtr mfFCPtr =
boost::dynamic_pointer_cast<FieldContainerPtrMFieldBase::GetHandle>(hF);
if(sfMap != NULL && sfMap->isValid() == true)
{
_outStream << BeginElem
<< hF->getName();
//if the Attachment Map is empty write [] as its content
if(sfMap->empty() == true)
{
_outStream << " [ ] " << EndElemNL;
}
else
{
_outStream << EndElemNL
<< BeginElem
<< "["
<< EndElemNL;
_outStream << IncIndent;
EditMapFieldHandle::MapList fcList;
sfMap->flatten(fcList);
EditMapFieldHandle::MapList::iterator iter = fcList.begin();
EditMapFieldHandle::MapList::iterator end = fcList.end ();
for(; iter!=end; ++iter)
{
_outStream << BeginElem
<< "MapHelper"
<< EndElemNL
<< BeginElem
<< "{"
<< EndElemNL;
_outStream << IncIndent;
_outStream << BeginElem
<< "keys"
<< EndElemNL
<< BeginElem
<< "["
<< EndElemNL;
_outStream << IncIndent;
std::vector<std::string>::const_iterator kIt =
iter->first.begin();
std::vector<std::string>::const_iterator kEnd =
iter->first.end();
for(; kIt != kEnd; ++kIt)
{
_outStream << BeginElem
<< "\""
<< *kIt
<< "\""
<< EndElemNL;
}
_outStream << DecIndent;
_outStream << BeginElem
<< "]"
<< EndElemNL;
_outStream << BeginElem
<< "container ";
if(iter->second == NULL)
{
_outStream << "NULL"
<< EndElemNL;
}
else
{
writeContainer(iter->second, false);
_outStream << EndElemNL;
}
//.........这里部分代码省略.........