本文整理汇总了C++中GetFieldHandlePtr::isInternal方法的典型用法代码示例。如果您正苦于以下问题:C++ GetFieldHandlePtr::isInternal方法的具体用法?C++ GetFieldHandlePtr::isInternal怎么用?C++ GetFieldHandlePtr::isInternal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GetFieldHandlePtr
的用法示例。
在下文中一共展示了GetFieldHandlePtr::isInternal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: visitContainer
void OSGWriter::visitContainer(FieldContainer * const pFC)
{
if(pFC == NULL)
{
return;
}
typedef std::pair<FCInfoHelperMap::iterator, bool> MapInsertInfo;
std::string containerName;
// const FieldContainerType &fcType = pFC->getType();
UInt32 numFields = pFC->getNumFields();
MapInsertInfo insertInfo;
insertInfo = _visitedFCMap.insert(std::make_pair(pFC, FCInfoHelper()));
if(insertInfo.second == true)
{
//the FC was NOT visited before
for(UInt32 field = 1; field <= numFields; field++)
{
GetFieldHandlePtr fHandle = pFC->getField(field);
if(fHandle == NULL || (fHandle != NULL && fHandle->isInternal()))
{
continue;
}
visitField(fHandle);
}
}
else
{
//the FC was in the map => FC is shared
FCInfoHelperMap::iterator iter = _visitedFCMap.find(pFC);
if(iter == _visitedFCMap.end())
{
SWARNING << "OSGWriter::visitContainer(): FieldContainer * "
<< "not found in map" << std::endl;
return;
}
if(iter->second.hasName == false)
{
iter->second.setName(pFC);
iter->second.hasName = true;
}
}
}
示例2: writeContainer
void OSGWriter::writeContainer(FieldContainer * const pFC,
bool bIndent)
{
if(pFC == NULL)
{
return;
}
UInt32 numFields = pFC->getNumFields();
FCInfoHelperMap::iterator iter = _visitedFCMap.find(pFC);
if(iter == _visitedFCMap.end())
{
SWARNING << "OSGWriter::writeContainer(): FieldContainer * "
<< "not found in map" << std::endl;
return;
}
if(!iter->second.written)
{
//FC is not written yet
iter->second.written = true;
if(bIndent == true)
{
_outStream << BeginElem;
}
if(iter->second.hasName)
{
_outStream << "DEF "
<< iter->second.containerName
<< " "
<< pFC->getTypeName()
<< EndElemNL
<< BeginElem
<< "{"
<< EndElemNL;
}
else
{
_outStream << pFC->getTypeName()
<< EndElemNL
<< BeginElem
<< "{"
<< EndElemNL;
}
_outStream << IncIndent;
for(UInt32 field = numFields; field > 0; field--)
{
GetFieldHandlePtr fHandle = pFC->getField(field);
if(fHandle == NULL || (fHandle != NULL && fHandle->isInternal()))
{
continue;
}
writeField(fHandle);
}
_outStream << DecIndent;
_outStream << BeginElem
<< "}"
<< EndElemNL;
}
else
{
//FC is already written -> its shared -> write reference
if(!iter->second.hasName)
{
SWARNING << "OSGWriter::writeContainer(): FieldContainer is "
<< "shared, but not named"
<< std::endl;
return;
}
if(bIndent == true)
{
_outStream << BeginElem;
}
_outStream << "USE "
<< iter->second.containerName
<< EndElemNL;
}
}