0024271: Provide Boolean operations for NCollection_Map

NCollection_Map - add two maps content Exchange operation without data copying
Add Exchange method to NCollection_DataMap, NCollection_DoubleMap, NCollection_IndexedDataMap, NCollection_IndexedMap
Add NCollection_Map::IsEqual() method
Corrections for gcc - use this->myAllocator
This commit is contained in:
kgv
2013-10-24 12:12:42 +04:00
committed by bugmaster
parent 14b04bd216
commit ab2db9a59e
9 changed files with 439 additions and 6 deletions

View File

@@ -199,6 +199,17 @@ class NCollection_BaseMap
Standard_EXPORT Standard_Integer NextPrimeForMap
(const Standard_Integer N) const;
//! Exchange content of two maps without data copying
void exchangeMapsData (NCollection_BaseMap& theOther)
{
std::swap (myData1, theOther.myData1);
std::swap (myData2, theOther.myData2);
//std::swap (isDouble, theOther.isDouble);
std::swap (mySaturated, theOther.mySaturated);
std::swap (myNbBuckets, theOther.myNbBuckets);
std::swap (mySize, theOther.mySize);
}
protected:
// --------- PROTECTED FIELDS -----------
NCollection_ListNode ** myData1;