mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0025064: TCollection modification for Salome porting
This commit is contained in:
parent
ecc1d911d1
commit
214df550f6
@ -84,14 +84,9 @@ is
|
||||
-- - the function RemoveLast to remove the last entry from the map.
|
||||
|
||||
Create(Other : IndexedMap from TCollection)
|
||||
returns IndexedMap from TCollection
|
||||
returns IndexedMap from TCollection;
|
||||
---Purpose: As copying Map is an expensive operation it is
|
||||
-- incorrect to do it implicitly. This constructor
|
||||
-- will raise an error if the Map is not empty. To
|
||||
-- copy the content of a Map use the Assign method (operator =).
|
||||
raises DomainError from Standard
|
||||
is private;
|
||||
|
||||
-- not recommended to do it implicitly.
|
||||
|
||||
Assign(me : in out; Other : IndexedMap from TCollection)
|
||||
returns IndexedMap from TCollection
|
||||
|
@ -41,8 +41,12 @@ TCollection_IndexedMap::TCollection_IndexedMap
|
||||
(const TCollection_IndexedMap& Other) :
|
||||
TCollection_BasicMap(Other.NbBuckets(),Standard_False)
|
||||
{
|
||||
if (!Other.IsEmpty())
|
||||
Standard_DomainError::Raise("TCollection:Copy of IndexedMap");
|
||||
if (!Other.IsEmpty()) {
|
||||
ReSize(Other.Extent());
|
||||
for (Standard_Integer i = 1; i <= Other.Extent(); i++) {
|
||||
Add(Other(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -178,11 +178,9 @@ is
|
||||
-- To copy a list, you must explicitly call the assignment operator (operator=).
|
||||
|
||||
Create(Other : List from TCollection)
|
||||
returns List from TCollection
|
||||
is private;
|
||||
returns List from TCollection;
|
||||
---Purpose: Creation by copy of existing list.
|
||||
-- Warning: This constructor prints a warning message.
|
||||
-- We recommand to use the operator =.
|
||||
-- We recommend to use the operator =.
|
||||
|
||||
Assign(me : in out; Other : List from TCollection)
|
||||
---Purpose: Replace <me> by a copy of <Other>.
|
||||
|
@ -55,9 +55,6 @@ inherits BasicMap from TCollection
|
||||
-- - TCollection_MapHasher class describes the
|
||||
-- functions required for a Hasher object.
|
||||
|
||||
raises
|
||||
DomainError from Standard
|
||||
|
||||
|
||||
class StdMapNode from TCollection
|
||||
inherits MapNode from TCollection
|
||||
@ -128,13 +125,9 @@ is
|
||||
-- - and a map iterator to explore the map.
|
||||
|
||||
|
||||
Create(Other : Map from TCollection) returns Map from TCollection
|
||||
Create(Other : Map from TCollection) returns Map from TCollection;
|
||||
---Purpose: As copying Map is an expensive operation it is
|
||||
-- incorrect to do it implicitly. This constructor
|
||||
-- will raise an error if the Map is not empty. To
|
||||
-- copy the content of a Map use the Assign method (operator =).
|
||||
raises DomainError from Standard
|
||||
is private;
|
||||
-- not recommended to do it implicitly.
|
||||
|
||||
Assign(me : in out; Other : Map from TCollection)
|
||||
returns Map from TCollection
|
||||
|
@ -36,8 +36,12 @@ TCollection_Map::TCollection_Map(const Standard_Integer NbBuckets) :
|
||||
TCollection_Map::TCollection_Map(const TCollection_Map& Other) :
|
||||
TCollection_BasicMap(Other.NbBuckets(),Standard_True)
|
||||
{
|
||||
if (Other.Extent() != 0)
|
||||
Standard_DomainError::Raise("TCollection:Copy of Map");
|
||||
if (!Other.IsEmpty()) {
|
||||
ReSize(Other.Extent());
|
||||
for (TCollection_MapIterator It(Other); It.More(); It.Next()) {
|
||||
Add(It.Key());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
Loading…
x
Reference in New Issue
Block a user