rem: if(mapIt->second->getInternal().getValue() == false) { ++uiNumPublicObjects; }  ++mapIt; }  pMem.putValue(uiNumPublicObjects);  mapIt = pObject.begin();  for(; mapIt != mapEnd; ++mapIt) { if(mapIt->second->getInternal().getValue() == false) { binding = mapIt->first & 0xffff; id      = mapIt->second.getFieldContainerId();  pMem.putValue(binding); pMem.putValue(id); }
add: copyToBin(pMem, pObjectStore[i]);
context:     static void copyToBin(      BinaryDataHandler &pMem,                           const AttachmentMap     &pObject)    {        UInt16 binding;        UInt32 id;        UInt32 uiNumPublicObjects = 0;        AttachmentMap::const_iterator mapIt  = pObject.begin();        AttachmentMap::const_iterator mapEnd = pObject.end();        while(mapIt != mapEnd)        {            if(mapIt->second->getInternal().getValue() == false)            {                ++uiNumPublicObjects;            }            ++mapIt;        }        pMem.putValue(uiNumPublicObjects);        mapIt = pObject.begin();        for(; mapIt != mapEnd; ++mapIt)        {            if(mapIt->second->getInternal().getValue() == false)            {                binding = mapIt->first & 0xffff;                id      = mapIt->second.getFieldContainerId();                                pMem.putValue(binding);                pMem.putValue(id);            }        }    }