Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions
NCollection_Set< TheItemType > Class Template Reference

#include <NCollection_Set.hxx>

Inheritance diagram for NCollection_Set< TheItemType >:
Inheritance graph
[legend]

Public Types

typedef NCollection_TListNode
< TheItemType > 
SetNode
 
typedef
NCollection_TListIterator
< TheItemType > 
Iterator
 

Public Member Functions

 NCollection_Set (const Handle< NCollection_BaseAllocator > &theAllocator=0L)
 Constructor. More...
 
 NCollection_Set (const NCollection_Set &theOther)
 Copy constructor. More...
 
virtual Standard_Integer Size (void) const
 Size - Number of items. More...
 
virtual void Assign (const NCollection_BaseCollection< TheItemType > &theOther)
 Replace this list by the items of theOther collection. More...
 
NCollection_Setoperator= (const NCollection_Set &theOther)
 Replace this list by the items of theOther Set. More...
 
void Clear (void)
 Clear this set. More...
 
Standard_Boolean Add (const TheItemType &theItem)
 Add item. More...
 
Standard_Boolean Remove (const TheItemType &theItem)
 Remove item. More...
 
void Remove (Iterator &theIter)
 Remove - wrapper against 'hiding' warnings. More...
 
Standard_Boolean Contains (const TheItemType &theItem) const
 Contains - item inclusion query. More...
 
Standard_Boolean IsASubset (const NCollection_Set &theOther)
 IsASubset. More...
 
Standard_Boolean IsAProperSubset (const NCollection_Set &theOther)
 IsAProperSubset. More...
 
void Union (const NCollection_Set &theOther)
 Union. More...
 
void Intersection (const NCollection_Set &theOther)
 Intersection. More...
 
void Difference (const NCollection_Set &theOther)
 Difference (Subtraction) More...
 
 ~NCollection_Set (void)
 Destructor - clears the List. More...
 
- Public Member Functions inherited from NCollection_BaseCollection< TheItemType >
 NCollection_BaseCollection (const Handle< NCollection_BaseAllocator > &theAllocator=0L)
 Common for all collections constructor takes care of theAllocator. More...
 
virtual ~NCollection_BaseCollection (void)
 Destructor - must be implemented to release the memory. More...
 
const Handle
< NCollection_BaseAllocator > & 
Allocator () const
 Returns attached allocator. More...
 
- Public Member Functions inherited from NCollection_BaseList
Standard_Integer Extent (void) const
 
Standard_Boolean IsEmpty (void) const
 

Additional Inherited Members

- Protected Member Functions inherited from NCollection_BaseCollection< TheItemType >
const Handle
< NCollection_BaseAllocator > & 
IterAllocator (void) const
 
void exchangeAllocators (NCollection_BaseCollection &theOther)
 Exchange allocators of two collections. More...
 
- Protected Member Functions inherited from NCollection_BaseList
 NCollection_BaseList (void)
 
void PClear (NCollection_DelListNode fDel, Handle< NCollection_BaseAllocator > &theAllocator)
 
const NCollection_ListNodePFirst (void) const
 
const NCollection_ListNodePLast (void) const
 
void PAppend (NCollection_ListNode *theNode)
 
void PAppend (NCollection_ListNode *theNode, Iterator &theIt)
 
void PAppend (NCollection_BaseList &theOther)
 
void PPrepend (NCollection_ListNode *theNode)
 
void PPrepend (NCollection_BaseList &theOther)
 
void PRemoveFirst (NCollection_DelListNode fDel, Handle< NCollection_BaseAllocator > &theAllocator)
 
void PRemove (Iterator &theIter, NCollection_DelListNode fDel, Handle< NCollection_BaseAllocator > &theAllocator)
 
void PInsertBefore (NCollection_ListNode *theNode, Iterator &theIter)
 
void PInsertBefore (NCollection_BaseList &theOther, Iterator &theIter)
 
void PInsertAfter (NCollection_ListNode *theNode, Iterator &theIter)
 
void PInsertAfter (NCollection_BaseList &theOther, Iterator &theIter)
 
void PReverse ()
 
- Protected Attributes inherited from NCollection_BaseCollection< TheItemType >
Handle< NCollection_BaseAllocatormyAllocator
 
- Protected Attributes inherited from NCollection_BaseList
NCollection_ListNodemyFirst
 
NCollection_ListNodemyLast
 
Standard_Integer myLength
 

Detailed Description

template<class TheItemType>
class NCollection_Set< TheItemType >

Purpose: A set is an unordered collection of items without duplications. To test for duplications the operators == and != are used on the items. Inherits BaseList, adding the data item to each node.

Member Typedef Documentation

template<class TheItemType >
typedef NCollection_TListIterator<TheItemType> NCollection_Set< TheItemType >::Iterator
template<class TheItemType >
typedef NCollection_TListNode<TheItemType> NCollection_Set< TheItemType >::SetNode

Constructor & Destructor Documentation

template<class TheItemType >
NCollection_Set< TheItemType >::NCollection_Set ( const Handle< NCollection_BaseAllocator > &  theAllocator = 0L)
inline

Constructor.

template<class TheItemType >
NCollection_Set< TheItemType >::NCollection_Set ( const NCollection_Set< TheItemType > &  theOther)
inline

Copy constructor.

template<class TheItemType >
NCollection_Set< TheItemType >::~NCollection_Set ( void  )
inline

Destructor - clears the List.

Member Function Documentation

template<class TheItemType >
Standard_Boolean NCollection_Set< TheItemType >::Add ( const TheItemType &  theItem)
inline

Add item.

template<class TheItemType >
virtual void NCollection_Set< TheItemType >::Assign ( const NCollection_BaseCollection< TheItemType > &  theOther)
inlinevirtual

Replace this list by the items of theOther collection.

Implements NCollection_BaseCollection< TheItemType >.

template<class TheItemType >
void NCollection_Set< TheItemType >::Clear ( void  )
inline

Clear this set.

template<class TheItemType >
Standard_Boolean NCollection_Set< TheItemType >::Contains ( const TheItemType &  theItem) const
inline

Contains - item inclusion query.

template<class TheItemType >
void NCollection_Set< TheItemType >::Difference ( const NCollection_Set< TheItemType > &  theOther)
inline

Difference (Subtraction)

template<class TheItemType >
void NCollection_Set< TheItemType >::Intersection ( const NCollection_Set< TheItemType > &  theOther)
inline

Intersection.

template<class TheItemType >
Standard_Boolean NCollection_Set< TheItemType >::IsAProperSubset ( const NCollection_Set< TheItemType > &  theOther)
inline

IsAProperSubset.

template<class TheItemType >
Standard_Boolean NCollection_Set< TheItemType >::IsASubset ( const NCollection_Set< TheItemType > &  theOther)
inline

IsASubset.

template<class TheItemType >
NCollection_Set& NCollection_Set< TheItemType >::operator= ( const NCollection_Set< TheItemType > &  theOther)
inline

Replace this list by the items of theOther Set.

template<class TheItemType >
Standard_Boolean NCollection_Set< TheItemType >::Remove ( const TheItemType &  theItem)
inline

Remove item.

template<class TheItemType >
void NCollection_Set< TheItemType >::Remove ( Iterator theIter)
inline

Remove - wrapper against 'hiding' warnings.

template<class TheItemType >
virtual Standard_Integer NCollection_Set< TheItemType >::Size ( void  ) const
inlinevirtual

Size - Number of items.

Implements NCollection_BaseCollection< TheItemType >.

template<class TheItemType >
void NCollection_Set< TheItemType >::Union ( const NCollection_Set< TheItemType > &  theOther)
inline

Union.


The documentation for this class was generated from the following file: