| 245 | | void ContainerCollectionBase::insertIntoContainers( UInt32 uiIndex, |
|---|
| 246 | | const FieldContainerPtr value ) |
|---|
| 247 | | { |
|---|
| 248 | | if(value == NullFC) |
|---|
| 249 | | return; |
|---|
| 250 | | |
|---|
| 251 | | editMField(ContainersFieldMask, _mfContainers); |
|---|
| 252 | | |
|---|
| 253 | | MFUnrecFieldContainerPtr::iterator fieldIt = _mfContainers.begin_nc(); |
|---|
| 254 | | |
|---|
| 255 | | //addRef(value); |
|---|
| 256 | | |
|---|
| 257 | | fieldIt += uiIndex; |
|---|
| 258 | | |
|---|
| 259 | | _mfContainers.insert(fieldIt, value); |
|---|
| 260 | | } |
|---|
| 261 | | |
|---|
| 262 | | void ContainerCollectionBase::replaceInContainers( UInt32 uiIndex, |
|---|
| 263 | | const FieldContainerPtr value ) |
|---|
| 264 | | { |
|---|
| 265 | | if(value == NullFC) |
|---|
| 266 | | return; |
|---|
| 267 | | |
|---|
| 268 | | if(uiIndex >= _mfContainers.size()) |
|---|
| 269 | | return; |
|---|
| 270 | | |
|---|
| 271 | | editMField(ContainersFieldMask, _mfContainers); |
|---|
| 272 | | |
|---|
| 273 | | |
|---|
| 274 | | // addRef(value); |
|---|
| 275 | | // subRef(_mfContainers[uiIndex]); |
|---|
| 276 | | |
|---|
| 277 | | // _mfContainers[uiIndex] = value; |
|---|
| 278 | | |
|---|
| 279 | | _mfContainers.replace(uiIndex, value); |
|---|
| 280 | | } |
|---|
| 281 | | |
|---|
| 282 | | void ContainerCollectionBase::replaceInContainers(const FieldContainerPtr pOldElem, |
|---|
| 283 | | const FieldContainerPtr pNewElem) |
|---|
| 284 | | { |
|---|
| 285 | | if(pNewElem == NullFC) |
|---|
| 286 | | return; |
|---|
| 287 | | |
|---|
| 288 | | Int32 elemIdx = _mfContainers.findIndex(pOldElem); |
|---|
| 289 | | |
|---|
| 290 | | if(elemIdx != -1) |
|---|
| | 247 | void ContainerCollectionBase::removeFromContainers(UInt32 uiIndex) |
|---|
| | 248 | { |
|---|
| | 249 | if(uiIndex < _mfContainers.size()) |
|---|
| 294 | | // MFFieldContainerPtr::iterator fieldIt = _mfContainers.begin(); |
|---|
| 295 | | |
|---|
| 296 | | // fieldIt += elemIdx; |
|---|
| 297 | | // addRef(pNewElem); |
|---|
| 298 | | // subRef(pOldElem); |
|---|
| 299 | | |
|---|
| 300 | | // (*fieldIt) = pNewElem; |
|---|
| 301 | | _mfContainers.replace(elemIdx, pNewElem); |
|---|
| 302 | | } |
|---|
| 303 | | } |
|---|
| 304 | | |
|---|
| 305 | | void ContainerCollectionBase::removeFromContainers(UInt32 uiIndex) |
|---|
| 306 | | { |
|---|
| 307 | | if(uiIndex < _mfContainers.size()) |
|---|
| | 253 | MFUnrecFieldContainerPtr::iterator fieldIt = _mfContainers.begin_nc(); |
|---|
| | 254 | |
|---|
| | 255 | fieldIt += uiIndex; |
|---|
| | 256 | |
|---|
| | 257 | _mfContainers.erase(fieldIt); |
|---|
| | 258 | } |
|---|
| | 259 | } |
|---|
| | 260 | |
|---|
| | 261 | void ContainerCollectionBase::removeFromContainers(const FieldContainerPtr value) |
|---|
| | 262 | { |
|---|
| | 263 | Int32 iElemIdx = _mfContainers.findIndex(value); |
|---|
| | 264 | |
|---|
| | 265 | if(iElemIdx != -1) |
|---|