0024971: Incomplete interface of NCollection classes
authorabv <abv@opencascade.com>
Wed, 11 Jun 2014 06:43:27 +0000 (10:43 +0400)
committerapn <apn@opencascade.com>
Wed, 11 Jun 2014 06:44:16 +0000 (10:44 +0400)
commite3a6386d189b9a3f64b06beec9220dcdc6c052f5
tree3c446b8ffb615af18e3cea9ad744e5b87949c509
parent655fddc854d3d5886d6df02dbe5a98c89dacdc31
0024971: Incomplete interface of NCollection classes

NCollection classes amended to be compatible with TCollection equivalents:

- List and Maps: copy constructor is used for placement of new items in collection instead of assignment operator, thus default constructor is not necessary any more for the item class
- Constructors with additional argument of element type added in array classes operated by Handle, defined by NCollection_DefineHArray*.hxx, allowing to initialize array immediately by specified value
- Non-const methods First() and Last() are added in List class, and method Value() in TListIterator class
- Method Append() accepting Handle(HSequence) provided in NCollection_DefineHSequence.hxx
- Default implementation of global function IsEqual() is provided as template (using operator ==)

Code using lists and maps of sequences is refactored to operate sequence by Handle (since Sequence does not to have public copy constructor).

In addition, error checking code is simplified to use macros _Raise_if instead of custom #ifdefs with the same meaning.
Comments within declaration of instances of generic classes in CDL removed.

Fixed bug in copy constructor of NCollection_BaseVector leading to corrupt data if original vector is empty; simplistic test command for vectors is added.
31 files changed:
src/AIS/AIS_LocalContext_1.cxx
src/CDM/CDM.cdl
src/IGESBasic/IGESBasic.cdl
src/Interface/Interface.cdl
src/MeshTest/MeshTest_CheckTopology.cxx
src/MeshTest/MeshTest_CheckTopology.hxx
src/MeshVS/MeshVS_Mesh.cxx
src/NCollection/NCollection_Array1.hxx
src/NCollection/NCollection_Array2.hxx
src/NCollection/NCollection_BaseVector.hxx
src/NCollection/NCollection_DataMap.hxx
src/NCollection/NCollection_DefaultHasher.hxx
src/NCollection/NCollection_DefineHArray1.hxx
src/NCollection/NCollection_DefineHArray2.hxx
src/NCollection/NCollection_DefineHSequence.hxx
src/NCollection/NCollection_DoubleMap.hxx
src/NCollection/NCollection_IndexedDataMap.hxx
src/NCollection/NCollection_IndexedMap.hxx
src/NCollection/NCollection_List.hxx
src/NCollection/NCollection_Map.hxx
src/NCollection/NCollection_Sequence.hxx
src/NCollection/NCollection_TListIterator.hxx
src/NCollection/NCollection_TListNode.hxx
src/Prs3d/Prs3d_NListOfSequenceOfPnt.hxx
src/Prs3d/Prs3d_WFShape.cxx
src/QANCollection/QANCollection_Test.cxx
src/SelectMgr/FILES
src/SelectMgr/SelectMgr_DataMapOfObjectOwners.hxx [deleted file]
src/StdPrs/StdPrs_WFDeflectionRestrictedFace.cxx
src/StdPrs/StdPrs_WFRestrictedFace.cxx
src/StdPrs/StdPrs_WFSurface.cxx