1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

22 Commits

Author SHA1 Message Date
osa
b49b181901 0030278: Foundation Classes - make IndexedMapNode as protected inside of NCollection_IndexedMap 2018-10-22 11:32:46 +03:00
isn
229add784f 0029064: Copying of empty NCollection map takes excessive memory
Avoid resizing of NCollection maps in Assign() methods if source map is empty
2018-03-26 15:32:51 +03:00
kgv
b6a0525bcb 0029299: Foundation Classes, NCollection - define explicit empty constructor for map classes
Ambiguous constructors have been marked with explicit keyword for classes
NCollection_DataMap, NCollection_DoubleMap, NCollection_IndexedDataMap, NCollection_IndexedMap,
NCollection_List, NCollection_LocalArray, NCollection_Map, NCollection_Sequence,
NCollection_SparseArray, NCollection_UBTree,
2017-11-09 18:08:20 +03:00
kgv
510cb85241 0029302: Foundation Classes, NCollection - optimize iteration of indexed maps
NCollection_IndexedMap and NCollection_IndexedDataMap
now access Key by Index number without computing Hash code.
IndexedMapNode::myNext2 and IndexedDataMapNode::myNext2 fields
have been removed, so that indexed map now may utilize less memory.

TCollection::NextPrimeForMap() has been extended upto 2038431745
(almost full signed 32-bit integer range),
and NCollection_BaseMap::mySaturated property has been removed.

NCollection_IndexedDataMap::RemoveFromIndex(), FindKey(), FindFromIndex(),
ChangeFromIndex() - removed duplicating checks for out of range input.
2017-11-09 18:08:18 +03:00
kgv
7f5945d688 0026213: Visualization - replace sequence in Select3D_SensitiveGroup
NCollection_IndexedMap is now used instead of NCollection_Sequence within Select3D_SensitiveGroup.
2017-07-13 12:27:48 +03:00
msv
3f5aa017e7 0028782: Shape sewing behavior not consistent for the same CAD file
Get rid of iterations on maps with shape key by replacing simple maps with indexed maps. So iteration is done on integer key.

The map containers have been updated to insert into them type definitions of key and value.

The new methods RemoveKey() and RemoveFromIndex() have been added to indexed [data] map to be able to remove an arbitrary key from the map.

All the code in OCCT has been updated where RemoveLast() and Substitute() methods were used to remove a key from indexed [data] map.
2017-06-01 13:55:15 +03:00
ski
9775fa6110 0026937: Eliminate NO_CXX_EXCEPTION macro support
Macro NO_CXX_EXCEPTION was removed from code.
Method Raise() was replaced by explicit throw statement.
Method Standard_Failure::Caught() was replaced by normal C++mechanism of exception transfer.
Method Standard_Failure::Caught() is deprecated now.
Eliminated empty constructors.
Updated samples.
Eliminate empty method ChangeValue from NCollection_Map class.
Removed not operable methods from NCollection classes.
2017-02-02 16:35:54 +03:00
abv
6928e35131 0025571: Avoid base Classes without virtual Destructors
Destructors of collection classes from NCollection and math_Function are made virtual to allow safe destruction by pointer to base class.

Destructors of classes HatchGen_IntersectionPoint, IntCurveSurface_Intersection, Intf_Interference, IntRes2d_Intersection are made protected to avoid possibility of destructing by pointer to corresponding base class.
2015-09-24 14:14:22 +03:00
dbp
9e50612044 0026203: Foundation Classes - provide method ::Swap() for NCollection_IndexedMap and NCollection_IndexedDataMap to transpose map elements
Add new tests in group "perf ncollection".
2015-05-21 13:31:46 +03:00
apl
985aed12ec 0026157: NCollection, TCollection packages - IndexedMap, IndexedDataMap ::Substitute() do not allow passing equal key for the same index
cosmetic remarks from msv
2015-05-06 15:02:37 +03:00
msv
5e452c37ee 0025348: Method Assign of NCollection containers must not change own allocator of the target
Correct according to remarks of reviewer:
- Assign() and operator=() should implement equal approach to allocators
- Protect all collections against assignment to itself with operator=()

Test-case for issue #25348
2014-10-23 16:20:40 +04:00
abv
e3a6386d18 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.
2014-06-11 10:44:16 +04:00
abv
ddf2fe8eeb 0024911: Avoid using virtual functions in NCollection classes
NCollection_BaseCollection class, relevant header files, and macro DEFINE_BASECOLLECTION removed.
Hence methods Assign() from other compatible (via inheritance of BaseCollection) collections are not available any more, as well as base Iterator class.

All methods of Iterator classes are made non-virtual, allowing their inline expansion for better performance.

OCCT-specific operators new and delete added to collection classes and removed from iterator classes.
2014-06-05 14:12:18 +04:00
dbp
79a35943dd 0024831: Make iterators of NCollection classes STL-compatible
STL-compatible iterators returned methods begin() and end() are provided in collection classes from NCollection package.
NCollection_Array1::Iterator is redesigned to use pointer instead of index.
Iterators of Sequence, Array, and Vector are extended by new methods to iterate backwards.

Use of SortTools_QuickSortOfReal is replaced by std::sort() in a few places (where possible).
2014-05-29 16:19:55 +04:00
abv
d5f74e42d6 0024624: Lost word in license statement in source files
License statement text corrected; compiler warnings caused by Bison 2.41 disabled for MSVC; a few other compiler warnings on 54-bit Windows eliminated by appropriate type cast
Wrong license statements corrected in several files.
Copyright and license statements added in XSD and GLSL files.
Copyright year updated in some files.
Obsolete documentation files removed from DrawResources.
2014-02-20 16:15:17 +04:00
abv
fd03ee4b3b 0024252: GCC warnings on breakage of strict-aliasing rules
Fixed type casts in NCollection maps
Avoid invalid type cast in handling of LDOM text object
Use correct pointer type in callback function of Graphic3d_CGraduatedTrihedron class
Format of printf() simplified in IntPatch_Point.cxx
2014-01-20 14:45:34 +04:00
bugmster
973c2be1e1 0024428: Implementation of LGPL license
The copying permission statements at the beginning of source files updated to refer to LGPL.
Copyright dates extended till 2014 in advance.
2013-12-17 12:42:41 +04:00
kgv
ab2db9a59e 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
2013-10-24 12:13:28 +04:00
bugmaster
b311480ed5 0023024: Update headers of OCCT files
Added appropriate copyright and license information in source files
2012-03-21 19:43:04 +04:00
dbv
1c35b92f5f 0022815: Missing delete operator for placement new 2012-03-06 17:25:00 +04:00
emv
9991c9c2ca 0021212: Missing Hasher parmeter in current implementation of NCollection Map-s 2012-03-06 12:08:10 +04:00
bugmaster
7fd59977df Integration of OCCT 6.5.0 from SVN 2012-03-05 19:23:40 +04:00