本文整理汇总了C++中GetFieldHandlePtr::pushSizeToStream方法的典型用法代码示例。如果您正苦于以下问题:C++ GetFieldHandlePtr::pushSizeToStream方法的具体用法?C++ GetFieldHandlePtr::pushSizeToStream怎么用?C++ GetFieldHandlePtr::pushSizeToStream使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GetFieldHandlePtr
的用法示例。
在下文中一共展示了GetFieldHandlePtr::pushSizeToStream方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeField
//.........这里部分代码省略.........
if(sfFCPtr != NULL && sfFCPtr->isValid() == true)
{
if((*sfFCPtr)->getValue() == NULL)
{
_outStream << " NULL" << EndElemNL;
}
else
{
_outStream << " ";
writeContainer((*sfFCPtr)->getValue(), false);
}
}
else if(mfFCPtr != NULL && mfFCPtr->isValid() == true)
{
_outStream << EndElemNL
<< BeginElem
<< "["
<< EndElemNL;
_outStream << IncIndent;
SizeT mfSize = (*mfFCPtr)->size();
for(SizeT i = 0; i < mfSize; i++)
{
if((*(*mfFCPtr))[i] == NULL)
{
_outStream << BeginElem
<< "NULL"
<< EndElemNL;
}
else
{
writeContainer((*(*mfFCPtr))[i], true);
}
}
_outStream << DecIndent;
_outStream << BeginElem
<< "]"
<< EndElemNL;
}
}
else
{
//this Field contains data -> write it out
if(hF->getDescription()->isDynamic() == true)
{
_outStream << BeginElem
<< "field "
<< hF->getType().getCName()
<< " "
<< hF->getName();
}
else
{
_outStream << BeginElem << hF->getName();
}
//to access the content of a field via a Field*
//one must know the cardinality
if(hF->getCardinality() == FieldType::SingleField)
{
_outStream << " ";
hF->pushValueToStream(_outStream);
_outStream << EndElemNL;
}
else if(hF->getCardinality() == FieldType::MultiField)
{
_outStream << " #";
hF->pushSizeToStream(_outStream);
_outStream << EndElemNL
<< BeginElem
<< "["
<< EndElemNL;
_outStream << IncIndent;
#ifdef WFC
hF->pushValueToStream(_outStream);
_outStream << EndElemNL;
#endif
_outStream << DecIndent;
_outStream << BeginElem
<< "]"
<< EndElemNL;
}
}
}