mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
Integration of OCCT 6.5.0 from SVN
This commit is contained in:
4
src/TColStd/FILES
Executable file
4
src/TColStd/FILES
Executable file
@@ -0,0 +1,4 @@
|
||||
TColStd_PackedMapOfInteger.hxx
|
||||
TColStd_PackedMapOfInteger.cxx
|
||||
TColStd_MapIteratorOfPackedMapOfInteger.hxx
|
||||
TColStd_MapIteratorOfPackedMapOfInteger.cxx
|
251
src/TColStd/TColStd.cdl
Executable file
251
src/TColStd/TColStd.cdl
Executable file
@@ -0,0 +1,251 @@
|
||||
package TColStd
|
||||
|
||||
|
||||
uses TCollection
|
||||
|
||||
is
|
||||
|
||||
imported PackedMapOfInteger;
|
||||
imported MapIteratorOfPackedMapOfInteger;
|
||||
|
||||
|
||||
-- Instantiations de TCollection --
|
||||
-- ***************************** --
|
||||
------------------------------------------------------------------------
|
||||
|
||||
class HPackedMapOfInteger;
|
||||
|
||||
class Array1OfInteger instantiates
|
||||
Array1 from TCollection (Integer);
|
||||
class Array1OfReal instantiates
|
||||
Array1 from TCollection (Real);
|
||||
class Array1OfCharacter instantiates
|
||||
Array1 from TCollection (Character);
|
||||
class Array1OfBoolean instantiates
|
||||
Array1 from TCollection (Boolean);
|
||||
class Array1OfAsciiString instantiates
|
||||
Array1 from TCollection (AsciiString from TCollection);
|
||||
class Array1OfExtendedString instantiates
|
||||
Array1 from TCollection (ExtendedString from TCollection);
|
||||
class Array1OfTransient instantiates
|
||||
Array1 from TCollection (Transient );
|
||||
class Array1OfByte instantiates
|
||||
Array1 from TCollection (Byte);
|
||||
|
||||
|
||||
class HArray1OfInteger instantiates
|
||||
HArray1 from TCollection (Integer,
|
||||
Array1OfInteger from TColStd);
|
||||
class HArray1OfReal instantiates
|
||||
HArray1 from TCollection (Real,
|
||||
Array1OfReal from TColStd);
|
||||
class HArray1OfCharacter instantiates
|
||||
HArray1 from TCollection (Character,
|
||||
Array1OfCharacter from TColStd);
|
||||
class HArray1OfBoolean instantiates
|
||||
HArray1 from TCollection (Boolean,
|
||||
Array1OfBoolean from TColStd);
|
||||
class HArray1OfAsciiString instantiates
|
||||
HArray1 from TCollection (AsciiString from TCollection,
|
||||
Array1OfAsciiString from TColStd);
|
||||
class HArray1OfExtendedString instantiates
|
||||
HArray1 from TCollection (ExtendedString from TCollection,
|
||||
Array1OfExtendedString from TColStd);
|
||||
class HArray1OfTransient instantiates
|
||||
HArray1 from TCollection (Transient,
|
||||
Array1OfTransient from TColStd );
|
||||
class HArray1OfByte instantiates
|
||||
HArray1 from TCollection (Byte,
|
||||
Array1OfByte from TColStd);
|
||||
|
||||
|
||||
class Array2OfInteger instantiates
|
||||
Array2 from TCollection (Integer);
|
||||
class Array2OfReal instantiates
|
||||
Array2 from TCollection (Real);
|
||||
class Array2OfCharacter instantiates
|
||||
Array2 from TCollection (Character);
|
||||
class Array2OfBoolean instantiates
|
||||
Array2 from TCollection (Boolean);
|
||||
class Array2OfTransient instantiates
|
||||
Array2 from TCollection (Transient);
|
||||
|
||||
|
||||
class HArray2OfInteger instantiates
|
||||
HArray2 from TCollection (Integer,
|
||||
Array2OfInteger from TColStd);
|
||||
class HArray2OfReal instantiates
|
||||
HArray2 from TCollection (Real,
|
||||
Array2OfReal from TColStd);
|
||||
class HArray2OfCharacter instantiates
|
||||
HArray2 from TCollection (Character,
|
||||
Array2OfCharacter from TColStd);
|
||||
class HArray2OfBoolean instantiates
|
||||
HArray2 from TCollection (Boolean,
|
||||
Array2OfBoolean from TColStd);
|
||||
class HArray2OfTransient instantiates
|
||||
HArray2 from TCollection (Transient,
|
||||
Array2OfTransient from TColStd);
|
||||
|
||||
class SequenceOfInteger instantiates
|
||||
Sequence from TCollection (Integer);
|
||||
class SequenceOfReal instantiates
|
||||
Sequence from TCollection (Real);
|
||||
class SequenceOfAsciiString instantiates
|
||||
Sequence from TCollection (AsciiString from TCollection);
|
||||
class SequenceOfHAsciiString instantiates
|
||||
Sequence from TCollection (HAsciiString from TCollection);
|
||||
class SequenceOfExtendedString instantiates
|
||||
Sequence from TCollection (ExtendedString from TCollection);
|
||||
class SequenceOfHExtendedString instantiates
|
||||
Sequence from TCollection (HExtendedString from TCollection);
|
||||
class SequenceOfTransient instantiates
|
||||
Sequence from TCollection (Transient);
|
||||
class SequenceOfAddress instantiates
|
||||
Sequence from TCollection (Address);
|
||||
class SequenceOfBoolean instantiates
|
||||
Sequence from TCollection (Boolean);
|
||||
|
||||
|
||||
class HSequenceOfInteger instantiates
|
||||
HSequence from TCollection (Integer,
|
||||
SequenceOfInteger from TColStd);
|
||||
class HSequenceOfReal instantiates
|
||||
HSequence from TCollection (Real,
|
||||
SequenceOfReal from TColStd);
|
||||
class HSequenceOfAsciiString instantiates
|
||||
HSequence from TCollection (AsciiString from TCollection,
|
||||
SequenceOfAsciiString from TColStd);
|
||||
class HSequenceOfHAsciiString instantiates
|
||||
HSequence from TCollection (HAsciiString from TCollection,
|
||||
SequenceOfHAsciiString from TColStd);
|
||||
class HSequenceOfExtendedString instantiates
|
||||
HSequence from TCollection (ExtendedString from TCollection,
|
||||
SequenceOfExtendedString from TColStd);
|
||||
class HSequenceOfHExtendedString instantiates
|
||||
HSequence from TCollection (HExtendedString from TCollection,
|
||||
SequenceOfHExtendedString from TColStd);
|
||||
class HSequenceOfTransient instantiates
|
||||
HSequence from TCollection (Transient,
|
||||
SequenceOfTransient from TColStd);
|
||||
|
||||
|
||||
class SetOfInteger instantiates
|
||||
Set from TCollection (Integer);
|
||||
class SetOfReal instantiates
|
||||
Set from TCollection (Real);
|
||||
class SetOfTransient instantiates
|
||||
Set from TCollection (Transient);
|
||||
|
||||
|
||||
class HSetOfInteger instantiates
|
||||
HSet from TCollection (Integer,
|
||||
SetOfInteger from TColStd);
|
||||
class HSetOfReal instantiates
|
||||
HSet from TCollection (Real,
|
||||
SetOfReal from TColStd);
|
||||
class HSetOfTransient instantiates
|
||||
HSet from TCollection (Transient,
|
||||
SetOfTransient from TColStd);
|
||||
|
||||
--
|
||||
-- Instantiations List (Integer,Real,Transient)
|
||||
-- ********************************************
|
||||
--
|
||||
class ListOfInteger instantiates List from TCollection(Integer );
|
||||
class ListOfReal instantiates List from TCollection(Real );
|
||||
class ListOfTransient instantiates List from TCollection(Transient);
|
||||
class ListOfAsciiString instantiates List from TCollection(AsciiString from TCollection);
|
||||
|
||||
--
|
||||
-- Instantiations Stack (Integer,Real,Transient)
|
||||
-- *********************************************
|
||||
--
|
||||
class StackOfInteger instantiates Stack from TCollection(Integer );
|
||||
class StackOfReal instantiates Stack from TCollection(Real );
|
||||
class StackOfTransient instantiates Stack from TCollection(Transient);
|
||||
|
||||
--
|
||||
-- Instantiations Queue (Integer,Real,Transient)
|
||||
-- *********************************************
|
||||
--
|
||||
class QueueOfInteger instantiates Queue from TCollection(Integer );
|
||||
class QueueOfReal instantiates Queue from TCollection(Real );
|
||||
class QueueOfTransient instantiates Queue from TCollection(Transient);
|
||||
|
||||
--
|
||||
-- Instantiations MapHasher (Integer,Real, Transient, Persistent)
|
||||
-- **************************************************************
|
||||
--
|
||||
class MapIntegerHasher instantiates MapHasher from TCollection(Integer);
|
||||
class MapRealHasher instantiates MapHasher from TCollection(Real);
|
||||
class MapTransientHasher instantiates MapHasher from TCollection(Transient);
|
||||
|
||||
|
||||
-- Instantiations Map (Integer, Real, Transient, Persistent)
|
||||
-- *********************************************************
|
||||
--
|
||||
class MapOfInteger instantiates
|
||||
Map from TCollection(Integer,MapIntegerHasher);
|
||||
class MapOfReal instantiates
|
||||
Map from TCollection(Real,MapRealHasher);
|
||||
class MapOfTransient instantiates
|
||||
Map from TCollection(Transient,MapTransientHasher);
|
||||
class MapOfAsciiString instantiates
|
||||
Map from TCollection(AsciiString from TCollection,AsciiString from TCollection);
|
||||
|
||||
--
|
||||
-- Instantiations IndexedMap (Integer, Real, Transient, Persistent)
|
||||
-- ****************************************************************
|
||||
--
|
||||
class IndexedMapOfInteger instantiates
|
||||
IndexedMap from TCollection(Integer,MapIntegerHasher);
|
||||
class IndexedMapOfReal instantiates
|
||||
IndexedMap from TCollection(Real,MapRealHasher);
|
||||
class IndexedMapOfTransient instantiates
|
||||
IndexedMap from TCollection(Transient,MapTransientHasher);
|
||||
|
||||
class IndexedDataMapOfTransientTransient instantiates
|
||||
IndexedDataMap from TCollection(Transient,
|
||||
Transient,
|
||||
MapTransientHasher);
|
||||
|
||||
--
|
||||
-- Instantiations DataMap
|
||||
-- **********************
|
||||
--
|
||||
class DataMapOfIntegerReal instantiates
|
||||
DataMap from TCollection(Integer,Real,MapIntegerHasher);
|
||||
|
||||
class DataMapOfIntegerInteger instantiates
|
||||
DataMap from TCollection(Integer,Integer,MapIntegerHasher);
|
||||
|
||||
class DataMapOfIntegerListOfInteger instantiates
|
||||
DataMap from TCollection(Integer,ListOfInteger from TColStd,MapIntegerHasher);
|
||||
|
||||
class DataMapOfTransientTransient instantiates
|
||||
DataMap from TCollection(Transient,Transient,MapTransientHasher);
|
||||
|
||||
class DataMapOfAsciiStringInteger instantiates
|
||||
DataMap from TCollection(AsciiString from TCollection,Integer,AsciiString from TCollection);
|
||||
|
||||
class DataMapOfIntegerTransient instantiates
|
||||
DataMap from TCollection(Integer,Transient,MapIntegerHasher);
|
||||
|
||||
class DataMapOfStringInteger instantiates
|
||||
DataMap from TCollection(ExtendedString from TCollection,Integer,ExtendedString from TCollection);
|
||||
|
||||
--
|
||||
-- Arrays of lists...
|
||||
-- ******************
|
||||
--
|
||||
|
||||
class Array1OfListOfInteger instantiates
|
||||
Array1 from TCollection (ListOfInteger from TColStd);
|
||||
|
||||
class HArray1OfListOfInteger instantiates
|
||||
HArray1 from TCollection (ListOfInteger from TColStd,
|
||||
Array1OfListOfInteger from TColStd);
|
||||
|
||||
end TColStd;
|
||||
|
31
src/TColStd/TColStd_HPackedMapOfInteger.cdl
Executable file
31
src/TColStd/TColStd_HPackedMapOfInteger.cdl
Executable file
@@ -0,0 +1,31 @@
|
||||
-- File: TColStd_HPackedMapOfInteger.cdl
|
||||
-- Created: Tue Dec 05 14:31:27 2006
|
||||
-- Author: Sergey KOCHETKOV
|
||||
-- Copyright: Open Cascade 2006
|
||||
|
||||
class HPackedMapOfInteger from TColStd inherits TShared from MMgt
|
||||
|
||||
---Purpose: Extension of TColStd_PackedMapOfInteger class to be manipulated by handle.
|
||||
|
||||
uses
|
||||
PackedMapOfInteger from TColStd
|
||||
|
||||
is
|
||||
Create( NbBuckets: Integer from Standard = 1 ) returns mutable HPackedMapOfInteger from TColStd;
|
||||
|
||||
Create( theOther: PackedMapOfInteger from TColStd ) returns mutable HPackedMapOfInteger from TColStd;
|
||||
|
||||
Map( me ) returns PackedMapOfInteger from TColStd
|
||||
---C++: return const &
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
ChangeMap( me: mutable ) returns PackedMapOfInteger from TColStd
|
||||
---C++: return &
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
fields
|
||||
myMap : PackedMapOfInteger from TColStd;
|
||||
|
||||
end HPackedMapOfInteger;
|
21
src/TColStd/TColStd_HPackedMapOfInteger.cxx
Executable file
21
src/TColStd/TColStd_HPackedMapOfInteger.cxx
Executable file
@@ -0,0 +1,21 @@
|
||||
// File: TColStd_HPackedMapOfInteger.cxx
|
||||
// Created: Tue Dec 05 15:04:47 2006
|
||||
// Author: Sergey KOCHETKOV
|
||||
// Copyright: Open Cascade 2006
|
||||
|
||||
|
||||
#include <TColStd_HPackedMapOfInteger.ixx>
|
||||
|
||||
//! Constructor of empty map
|
||||
TColStd_HPackedMapOfInteger::TColStd_HPackedMapOfInteger (const Standard_Integer NbBuckets)
|
||||
{
|
||||
myMap.ReSize(NbBuckets);
|
||||
}
|
||||
|
||||
//! Constructor from already existing map; performs copying
|
||||
TColStd_HPackedMapOfInteger::TColStd_HPackedMapOfInteger (const TColStd_PackedMapOfInteger &theOther)
|
||||
{
|
||||
myMap.Assign ( theOther );
|
||||
}
|
||||
|
||||
|
16
src/TColStd/TColStd_HPackedMapOfInteger.lxx
Executable file
16
src/TColStd/TColStd_HPackedMapOfInteger.lxx
Executable file
@@ -0,0 +1,16 @@
|
||||
// File: TColStd_HPackedMapOfInteger.lxx
|
||||
// Created: Tue Dec 05 14:45:46 2006
|
||||
// Author: Sergey KOCHETKOV
|
||||
// Copyright: Open Cascade 2006
|
||||
|
||||
//! Access to the map
|
||||
inline const TColStd_PackedMapOfInteger& TColStd_HPackedMapOfInteger::Map () const
|
||||
{
|
||||
return myMap;
|
||||
}
|
||||
|
||||
//! Access to the map for modification
|
||||
inline TColStd_PackedMapOfInteger& TColStd_HPackedMapOfInteger::ChangeMap ()
|
||||
{
|
||||
return myMap;
|
||||
}
|
81
src/TColStd/TColStd_MapIteratorOfPackedMapOfInteger.cxx
Executable file
81
src/TColStd/TColStd_MapIteratorOfPackedMapOfInteger.cxx
Executable file
@@ -0,0 +1,81 @@
|
||||
// File: TColStd_MapIteratorOfPackedMapOfInteger.cxx
|
||||
// Created: 09.12.05 10:01:49
|
||||
// Author: Alexander GRIGORIEV
|
||||
// Copyright: Open Cascade 2005
|
||||
|
||||
|
||||
#include <TColStd_MapIteratorOfPackedMapOfInteger.hxx>
|
||||
#include <TColStd_PackedMapOfInteger.hxx>
|
||||
|
||||
class TColStd_intMapNode;
|
||||
|
||||
extern Standard_Integer TColStd_intMapNode_findNext (const TColStd_intMapNode *,
|
||||
unsigned int& );
|
||||
|
||||
//=======================================================================
|
||||
//function : TColStd_MapIteratorOfPackedMapOfInteger
|
||||
//purpose : Constructor
|
||||
//=======================================================================
|
||||
|
||||
TColStd_MapIteratorOfPackedMapOfInteger::TColStd_MapIteratorOfPackedMapOfInteger
|
||||
(const TColStd_PackedMapOfInteger& theMap)
|
||||
: TCollection_BasicMapIterator (theMap),
|
||||
myIntMask (~0)
|
||||
{
|
||||
if (myNode) {
|
||||
const TColStd_intMapNode * aNode =
|
||||
reinterpret_cast <const TColStd_intMapNode *>(myNode);
|
||||
myKey = TColStd_intMapNode_findNext (aNode, myIntMask);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Initialize
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TColStd_MapIteratorOfPackedMapOfInteger::Initialize
|
||||
(const TColStd_PackedMapOfInteger& theMap)
|
||||
{
|
||||
TCollection_BasicMapIterator::Initialize (theMap);
|
||||
myIntMask = ~0;
|
||||
if (myNode) {
|
||||
const TColStd_intMapNode * aNode =
|
||||
reinterpret_cast <const TColStd_intMapNode *>(myNode);
|
||||
myKey = TColStd_intMapNode_findNext (aNode, myIntMask);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Reset
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TColStd_MapIteratorOfPackedMapOfInteger::Reset ()
|
||||
{
|
||||
TCollection_BasicMapIterator::Reset();
|
||||
myIntMask = ~0;
|
||||
if (myNode) {
|
||||
const TColStd_intMapNode * aNode =
|
||||
reinterpret_cast <const TColStd_intMapNode *>(myNode);
|
||||
myKey = TColStd_intMapNode_findNext (aNode, myIntMask);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Next
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TColStd_MapIteratorOfPackedMapOfInteger::Next ()
|
||||
{
|
||||
while (myNode) {
|
||||
const TColStd_intMapNode * aNode =
|
||||
reinterpret_cast <const TColStd_intMapNode *>(myNode);
|
||||
myKey = TColStd_intMapNode_findNext (aNode, myIntMask);
|
||||
if (myIntMask != ~0u)
|
||||
break;
|
||||
TCollection_BasicMapIterator::Next();
|
||||
}
|
||||
}
|
55
src/TColStd/TColStd_MapIteratorOfPackedMapOfInteger.hxx
Executable file
55
src/TColStd/TColStd_MapIteratorOfPackedMapOfInteger.hxx
Executable file
@@ -0,0 +1,55 @@
|
||||
// File: TColStd_MapIteratorOfPackedMapOfInteger.hxx
|
||||
// Created: 26.11.05 16:47:34
|
||||
// Author: Alexander GRIGORIEV
|
||||
// Copyright: Open Cascade 2005
|
||||
|
||||
|
||||
#ifndef TColStd_MapIteratorOfPackedMapOfInteger_HeaderFile
|
||||
#define TColStd_MapIteratorOfPackedMapOfInteger_HeaderFile
|
||||
|
||||
#include <TCollection_BasicMapIterator.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
|
||||
class TColStd_PackedMapOfInteger;
|
||||
|
||||
/**
|
||||
* Iterator of class TColStd_PackedMapOfInteger
|
||||
*/
|
||||
|
||||
class TColStd_MapIteratorOfPackedMapOfInteger: public TCollection_BasicMapIterator
|
||||
{
|
||||
public:
|
||||
// ---------- PUBLIC METHODS ----------
|
||||
|
||||
/// Empty Constructor.
|
||||
inline TColStd_MapIteratorOfPackedMapOfInteger()
|
||||
: myIntMask (~0U), myKey (0) {}
|
||||
|
||||
/// Constructor.
|
||||
Standard_EXPORT TColStd_MapIteratorOfPackedMapOfInteger
|
||||
(const TColStd_PackedMapOfInteger&);
|
||||
|
||||
/// Re-initialize with the same or another Map instance.
|
||||
Standard_EXPORT void Initialize (const TColStd_PackedMapOfInteger&);
|
||||
|
||||
/// Restart the iteraton
|
||||
Standard_EXPORT void Reset();
|
||||
|
||||
/// Query the iterated key. Defined in TColStd_PackedMapOfInteger.cxx
|
||||
inline Standard_Integer Key () const
|
||||
{
|
||||
Standard_NoSuchObject_Raise_if ((myIntMask == ~0U),
|
||||
"TColStd_MapIteratorOfPackedMapOfInteger::Key");
|
||||
return myKey;
|
||||
}
|
||||
|
||||
/// Increment the iterator
|
||||
Standard_EXPORT void Next();
|
||||
|
||||
private:
|
||||
unsigned int myIntMask; ///< all bits set above the iterated position
|
||||
Standard_Integer myKey; ///< Currently iterated key
|
||||
};
|
||||
|
||||
|
||||
#endif
|
1264
src/TColStd/TColStd_PackedMapOfInteger.cxx
Executable file
1264
src/TColStd/TColStd_PackedMapOfInteger.cxx
Executable file
File diff suppressed because it is too large
Load Diff
238
src/TColStd/TColStd_PackedMapOfInteger.hxx
Executable file
238
src/TColStd/TColStd_PackedMapOfInteger.hxx
Executable file
@@ -0,0 +1,238 @@
|
||||
// File: TColStd_PackedMapOfInteger.hxx
|
||||
// Created: 05.11.05 10:43:14
|
||||
// Author: Alexander GRIGORIEV
|
||||
// Copyright: Open Cascade 2005
|
||||
|
||||
|
||||
#ifndef TColStd_PackedMapOfInteger_HeaderFile
|
||||
#define TColStd_PackedMapOfInteger_HeaderFile
|
||||
|
||||
#include <TCollection_BasicMap.hxx>
|
||||
|
||||
/**
|
||||
* Optimized Map of integer values. Each block of 32 integers is stored in
|
||||
* 8 bytes in memory.
|
||||
*/
|
||||
|
||||
class TColStd_PackedMapOfInteger : private TCollection_BasicMap
|
||||
{
|
||||
public:
|
||||
// operators new and delete must be defined explicitly
|
||||
// since inherited ones are not accessible
|
||||
void* operator new(size_t size)
|
||||
{ return TCollection_BasicMap::operator new(size); }
|
||||
void operator delete(void *anAddress)
|
||||
{ TCollection_BasicMap::operator delete (anAddress); }
|
||||
|
||||
public:
|
||||
// ---------- PUBLIC METHODS ----------
|
||||
|
||||
/// Constructor
|
||||
inline TColStd_PackedMapOfInteger (const Standard_Integer NbBuckets = 1)
|
||||
: TCollection_BasicMap (NbBuckets, Standard_True),
|
||||
myExtent (0) {}
|
||||
|
||||
inline TColStd_PackedMapOfInteger&
|
||||
operator = (const TColStd_PackedMapOfInteger& Other)
|
||||
{ return Assign(Other); }
|
||||
|
||||
Standard_EXPORT TColStd_PackedMapOfInteger&
|
||||
Assign (const TColStd_PackedMapOfInteger&);
|
||||
Standard_EXPORT void ReSize (const Standard_Integer NbBuckets);
|
||||
Standard_EXPORT void Clear ();
|
||||
~TColStd_PackedMapOfInteger() { Clear(); }
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Add (const Standard_Integer aKey);
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Contains (const Standard_Integer aKey) const;
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Remove (const Standard_Integer aKey);
|
||||
|
||||
inline Standard_Integer NbBuckets () const
|
||||
{ return TCollection_BasicMap::NbBuckets(); }
|
||||
|
||||
inline Standard_Integer Extent () const
|
||||
{ return Standard_Integer (myExtent); }
|
||||
|
||||
inline Standard_Integer IsEmpty () const
|
||||
{ return TCollection_BasicMap::IsEmpty(); }
|
||||
|
||||
inline void Statistics (Standard_OStream& outStream) const
|
||||
{ TCollection_BasicMap::Statistics (outStream); }
|
||||
|
||||
/**
|
||||
* Query the minimal contained key value.
|
||||
*/
|
||||
Standard_EXPORT Standard_Integer GetMinimalMapped () const;
|
||||
|
||||
/**
|
||||
* Query the maximal contained key value.
|
||||
*/
|
||||
Standard_EXPORT Standard_Integer GetMaximalMapped () const;
|
||||
|
||||
public:
|
||||
//!@name Boolean operations with maps as sets of integers
|
||||
//!@{
|
||||
|
||||
/**
|
||||
* Sets this Map to be the result of union (aka addition, fuse, merge,
|
||||
* boolean OR) operation between two given Maps.
|
||||
* The new Map contains the values that are contained either in the
|
||||
* first map or in the second map or in both.<br>
|
||||
* All previous contents of this Map is cleared. This map (result of the
|
||||
* boolean operation) can also be passed as one of operands.<br>
|
||||
*/
|
||||
Standard_EXPORT void Union (const TColStd_PackedMapOfInteger&,
|
||||
const TColStd_PackedMapOfInteger&);
|
||||
|
||||
/**
|
||||
* Apply to this Map the boolean operation union (aka addition, fuse, merge,
|
||||
* boolean OR) with another (given) Map.
|
||||
* The result contains the values that were previously contained in
|
||||
* this map or contained in the given (operand) map.<br>
|
||||
* This algorithm is similar to method Union().
|
||||
* Returns True if contents of this map is changed.
|
||||
*/
|
||||
Standard_EXPORT Standard_Boolean Unite (const TColStd_PackedMapOfInteger&);
|
||||
|
||||
/**
|
||||
* Overloaded operator version of Unite().
|
||||
*/
|
||||
TColStd_PackedMapOfInteger& operator |= (const TColStd_PackedMapOfInteger& MM)
|
||||
{ Unite(MM); return *this; }
|
||||
|
||||
/**
|
||||
* Sets this Map to be the result of intersection (aka multiplication, common,
|
||||
* boolean AND) operation between two given Maps.
|
||||
* The new Map contains only the values that are contained in both map
|
||||
* operands.<br>
|
||||
* All previous contents of this Map is cleared. This same map (result of the
|
||||
* boolean operation) can also be used as one of operands.<br>
|
||||
* The order of operands makes no difference; the method minimizes internally
|
||||
* the number of iterations using the smallest map for the loop.
|
||||
*/
|
||||
Standard_EXPORT void Intersection (const TColStd_PackedMapOfInteger&,
|
||||
const TColStd_PackedMapOfInteger&);
|
||||
|
||||
/**
|
||||
* Apply to this Map the intersection operation (aka multiplication, common,
|
||||
* boolean AND) with another (given) Map.
|
||||
* The result contains only the values that are contained in both this and
|
||||
* the given maps.<br>
|
||||
* This algorithm is similar to method Intersection().
|
||||
* Returns True if contents of this map is changed.
|
||||
*/
|
||||
Standard_EXPORT Standard_Boolean Intersect (const TColStd_PackedMapOfInteger&);
|
||||
|
||||
/**
|
||||
* Overloaded operator version of Intersect().
|
||||
*/
|
||||
TColStd_PackedMapOfInteger& operator &= (const TColStd_PackedMapOfInteger& MM)
|
||||
{ Intersect(MM); return *this; }
|
||||
|
||||
/**
|
||||
* Sets this Map to be the result of subtraction (aka set-theoretic difference,
|
||||
* relative complement, exclude, cut, boolean NOT) operation between two given Maps.
|
||||
* The new Map contains only the values that are contained in the first map
|
||||
* operands and not contained in the second one.<br>
|
||||
* All previous contents of this Map is cleared. This map (result of the
|
||||
* boolean operation) can also be used as the first operand.<br>
|
||||
*/
|
||||
Standard_EXPORT void Subtraction (const TColStd_PackedMapOfInteger&,
|
||||
const TColStd_PackedMapOfInteger&);
|
||||
|
||||
/**
|
||||
* Apply to this Map the subtraction (aka set-theoretic difference, relative
|
||||
* complement, exclude, cut, boolean NOT) operation with another (given) Map.
|
||||
* The result contains only the values that were previously contained in
|
||||
* this map and not contained in this map.<br>
|
||||
* This algorithm is similar to method Subtract() with two operands.
|
||||
* Returns True if contents of this map is changed.
|
||||
*/
|
||||
Standard_EXPORT Standard_Boolean Subtract (const TColStd_PackedMapOfInteger&);
|
||||
|
||||
/**
|
||||
* Overloaded operator version of Subtract().
|
||||
*/
|
||||
TColStd_PackedMapOfInteger& operator -= (const TColStd_PackedMapOfInteger& MM)
|
||||
{ Subtract(MM); return *this; }
|
||||
|
||||
/**
|
||||
* Sets this Map to be the result of symmetric difference (aka exclusive
|
||||
* disjunction, boolean XOR) operation between two given Maps.
|
||||
* The new Map contains the values that are contained only in the
|
||||
* first or the second operand maps but not in both.<br>
|
||||
* All previous contents of this Map is cleared. This map (result of the
|
||||
* boolean operation) can also be used as one of operands.<br>
|
||||
*/
|
||||
Standard_EXPORT void Difference (const TColStd_PackedMapOfInteger&,
|
||||
const TColStd_PackedMapOfInteger&);
|
||||
|
||||
/**
|
||||
* Apply to this Map the symmetric difference (aka exclusive
|
||||
* disjunction, boolean XOR) operation with another (given) Map.
|
||||
* The result contains the values that are contained only in this
|
||||
* or the operand map, but not in both.<br>
|
||||
* This algorithm is similar to method Difference().
|
||||
* Returns True if contents of this map is changed.
|
||||
*/
|
||||
Standard_EXPORT Standard_Boolean Differ (const TColStd_PackedMapOfInteger&);
|
||||
|
||||
/**
|
||||
* Overloaded operator version of Differ().
|
||||
*/
|
||||
TColStd_PackedMapOfInteger& operator ^= (const TColStd_PackedMapOfInteger& MM)
|
||||
{ Differ(MM); return *this; }
|
||||
|
||||
/**
|
||||
* Returns True if this map is equal to the given one, i.e. they contain the
|
||||
* same sets of elements
|
||||
*/
|
||||
Standard_EXPORT Standard_Boolean IsEqual (const TColStd_PackedMapOfInteger&) const;
|
||||
|
||||
/**
|
||||
* Overloaded operator version of IsEqual().
|
||||
*/
|
||||
Standard_Boolean operator == (const TColStd_PackedMapOfInteger& MM) const
|
||||
{ return IsEqual(MM); }
|
||||
|
||||
/**
|
||||
* Returns True if this map is subset of the given one, i.e. all elements
|
||||
* contained in this map is contained also in the operand map.
|
||||
* if this map is empty that this method returns true for any operand map.
|
||||
*/
|
||||
Standard_EXPORT Standard_Boolean IsSubset (const TColStd_PackedMapOfInteger&) const;
|
||||
|
||||
/**
|
||||
* Overloaded operator version of IsSubset().
|
||||
*/
|
||||
Standard_Boolean operator <= (const TColStd_PackedMapOfInteger& MM) const
|
||||
{ return IsSubset(MM); }
|
||||
|
||||
/**
|
||||
* Returns True if this map has common items with the given one.
|
||||
*/
|
||||
Standard_EXPORT Standard_Boolean HasIntersection (const TColStd_PackedMapOfInteger&) const;
|
||||
|
||||
//!@}
|
||||
|
||||
protected:
|
||||
// ---------- PROTECTED METHODS ----------
|
||||
inline Standard_Integer InternalExtent () const
|
||||
{ return TCollection_BasicMap::Extent(); }
|
||||
|
||||
|
||||
private:
|
||||
// ----------- PRIVATE (PROHIBITED) methods
|
||||
/// Copy constructor - prohibited.
|
||||
TColStd_PackedMapOfInteger (const TColStd_PackedMapOfInteger& theOther);
|
||||
|
||||
|
||||
// ---------- PRIVATE FIELDS ----------
|
||||
|
||||
size_t myExtent;
|
||||
|
||||
friend class TColStd_MapIteratorOfPackedMapOfInteger;
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user