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