本文整理汇总了C++中Attachment::getGroupId方法的典型用法代码示例。如果您正苦于以下问题:C++ Attachment::getGroupId方法的具体用法?C++ Attachment::getGroupId怎么用?C++ Attachment::getGroupId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Attachment
的用法示例。
在下文中一共展示了Attachment::getGroupId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void FieldTraits<AttachmentMap>::copyFromBin(BinaryDataHandler &pMem,
AttachmentMap &aMap )
{
Attachment *attPtr;
UInt32 key;
UInt16 binding;
UInt32 fcId;
UInt32 size;
pMem.getValue(size);
AttachmentMap::const_iterator mapIt = aMap.begin();
AttachmentMap::const_iterator mapEnd = aMap.end ();
for(; mapIt != mapEnd; ++mapIt)
{
if((*mapIt).second != NULL)
{
Thread::getCurrentChangeList()->addDelayedSubRef<
UnrecordedRefCountPolicy>((*mapIt).second);
}
}
aMap.clear();
for(UInt32 i = 0; i < size; ++i)
{
pMem.getValue(binding);
pMem.getValue(fcId );
attPtr = dynamic_cast<Attachment *>(
FieldContainerFactory::the()->getMappedContainer(fcId));
if(attPtr != NULL)
{
key = (static_cast<UInt32>(attPtr->getGroupId()) << 16) | binding;
UnrecordedRefCountPolicy::addRef(attPtr);
aMap.insert(AttachmentMap::value_type(key, attPtr));
}
}
}
示例2: copyFromBin
void AttachmentContainer::copyFromBin(BinaryDataHandler &pMem,
ConstFieldMaskArg whichField)
{
Inherited::copyFromBin(pMem, whichField);
if(FieldBits::NoField != (AttachmentsFieldMask & whichField))
{
// _sfAttachments.copyFromBin(pMem);
editSField(AttachmentsFieldMask);
UInt32 size;
pMem.getValue(size);
AttachmentMap::const_iterator mapIt = _sfAttachments.getValue().begin();
AttachmentMap::const_iterator mapEnd = _sfAttachments.getValue().end ();
for(; mapIt != mapEnd; ++mapIt)
{
if((*mapIt).second != NULL)
{
if(this->isMTLocal())
{
Thread::getCurrentChangeList()->addDelayedSubRef<
RecordedRefCountPolicy>((*mapIt).second);
}
else
{
Thread::getCurrentChangeList()->addDelayedSubRef<
UnrecordedRefCountPolicy>((*mapIt).second);
}
}
}
_sfAttachments.getValue().clear();
for(UInt32 i = 0; i < size; ++i)
{
UInt16 binding;
UInt32 fcId;
pMem.getValue(binding);
pMem.getValue(fcId );
Attachment *att = dynamic_cast<Attachment *>(
FieldContainerFactory::the()->getMappedContainer(fcId));
if(att != NULL)
{
UInt32 key = (static_cast<UInt32>(att->getGroupId()) << 16) | binding;
if(this->isMTLocal())
{
RecordedRefCountPolicy::addRef(att);
}
else
{
UnrecordedRefCountPolicy::addRef(att);
}
_sfAttachments.getValue().insert(
AttachmentMap::value_type(key, att));
}
}
}
}