Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Data Structures | Public Member Functions | Protected Member Functions | Protected Attributes
NCollection_BaseCollection< TheItemType > Class Template Referenceabstract

#include <NCollection_BaseCollection.hxx>

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

Data Structures

class  Iterator
 

Public Member Functions

 NCollection_BaseCollection (const Handle< NCollection_BaseAllocator > &theAllocator=0L)
 Common for all collections constructor takes care of theAllocator. More...
 
virtual Standard_Integer Size (void) const =0
 Number of items. More...
 
virtual void Assign (const NCollection_BaseCollection &theOther)=0
 Virtual assignment. More...
 
virtual IteratorCreateIterator (void) const =0
 Method to create iterators for base collections. More...
 
virtual ~NCollection_BaseCollection (void)
 Destructor - must be implemented to release the memory. More...
 
const Handle
< NCollection_BaseAllocator > & 
Allocator () const
 Returns attached allocator. More...
 

Protected Member Functions

const Handle
< NCollection_BaseAllocator > & 
IterAllocator (void) const
 
void exchangeAllocators (NCollection_BaseCollection &theOther)
 Exchange allocators of two collections. More...
 

Protected Attributes

Handle< NCollection_BaseAllocatormyAllocator
 

Detailed Description

template<class TheItemType>
class NCollection_BaseCollection< TheItemType >

Purpose: NCollection_BaseCollection is the base abstract class for all collection templates of this package. The set of collections is similar to that of TCollection. Also the methods of classes have mostly the same names for easy switch from TCollection <-> NCollection containers.

NCollection is a nocdlpack, thus it is compiled without WOK. BaseCollection allows assigning the collections of different kinds (the items type being the same) with a few obvious exclusions - one can not assign any collection to the map having double data (two keys or a key plus value). Only the maps of the very same type may be assigned through operator= Said maps are: DoubleMap, DataMap, IndexedDataMap

For the users needing control over the memory usage the allocators were added (see NCollection_BaseAllocator header) Others may forget it - BaseAllocator is used by default and then memory is managed through Standard::Allocate/::Free.

Constructor & Destructor Documentation

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

Common for all collections constructor takes care of theAllocator.

template<class TheItemType>
virtual NCollection_BaseCollection< TheItemType >::~NCollection_BaseCollection ( void  )
inlinevirtual

Destructor - must be implemented to release the memory.

Member Function Documentation

template<class TheItemType>
const Handle< NCollection_BaseAllocator >& NCollection_BaseCollection< TheItemType >::Allocator ( ) const
inline

Returns attached allocator.

template<class TheItemType>
virtual void NCollection_BaseCollection< TheItemType >::Assign ( const NCollection_BaseCollection< TheItemType > &  theOther)
pure virtual
template<class TheItemType>
virtual Iterator& NCollection_BaseCollection< TheItemType >::CreateIterator ( void  ) const
pure virtual
template<class TheItemType>
void NCollection_BaseCollection< TheItemType >::exchangeAllocators ( NCollection_BaseCollection< TheItemType > &  theOther)
inlineprotected

Exchange allocators of two collections.

template<class TheItemType>
const Handle< NCollection_BaseAllocator >& NCollection_BaseCollection< TheItemType >::IterAllocator ( void  ) const
inlineprotected
template<class TheItemType>
virtual Standard_Integer NCollection_BaseCollection< TheItemType >::Size ( void  ) const
pure virtual

Number of items.

Implemented in NCollection_IndexedDataMap< TheKeyType, TheItemType, Hasher >, NCollection_IndexedDataMap< Standard_Integer, TColStd_SequenceOfInteger >, NCollection_IndexedDataMap< TopoDS_Shape, BOPCol_ListOfShape, TopTools_ShapeMapHasher >, NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >, NCollection_IndexedMap< TheKeyType, Hasher >, NCollection_IndexedMap< Handle< BOPDS_PaveBlock >, TColStd_MapTransientHasher >, NCollection_IndexedMap< Poly_MakeLoops::Link >, NCollection_DataMap< TheKeyType, TheItemType, Hasher >, NCollection_DataMap< Standard_Integer, Graphic3d_ZLayerSettings >, NCollection_DataMap< size_t, OpenGl_SetterInterface * >, NCollection_DataMap< Handle< Standard_Transient >, Standard_Address, TColStd_MapTransientHasher >, NCollection_DataMap< Handle< OpenGl_ShaderProgram >, OpenGl_MaterialState >, NCollection_DataMap< int, int >, NCollection_DataMap< TopoDS_Shape, Handle< AIS_ColoredDrawer >, TopTools_ShapeMapHasher >, NCollection_DataMap< TopoDS_Shape, Standard_Address, TopTools_ShapeMapHasher >, NCollection_DataMap< Handle< Graphic3d_ClipPlane >, PlaneProps >, NCollection_DataMap< Standard_Utf32Char, Standard_Integer >, NCollection_DataMap< TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher >, NCollection_DataMap< TheObjType, TreeNode * >, NCollection_DataMap< Standard_Integer, Handle< OpenGl_Workspace > >, NCollection_DataMap< Handle_TopoDS_TShape, Handle_VrmlData_Appearance >, NCollection_DataMap< Standard_Integer, Standard_Integer, TColStd_MapIntegerHasher >, NCollection_DataMap< Aspect_XAtom, Atom >, NCollection_DataMap< K, V >, NCollection_DataMap< TopoDS_Shape, BOPCol_ListOfShape, TopTools_ShapeMapHasher >, NCollection_DataMap< Standard_Utf32Char, TopoDS_Shape >, NCollection_DataMap< Handle< BOPDS_PaveBlock >, Handle< BOPDS_CommonBlock >, TColStd_MapTransientHasher >, NCollection_DataMap< Standard_Integer, OpenGl_Structure * >, NCollection_DataMap< TopoDS_Shape, Standard_Integer, TopTools_ShapeMapHasher >, NCollection_DataMap< Handle_TopoDS_TShape, Standard_Mutex * >, NCollection_DataMap< Standard_Integer, Handle< OpenGl_View > >, NCollection_Map< TheKeyType, Hasher >, NCollection_Map< Handle_VrmlData_Node >, NCollection_Map< TopoDS_Shape, TopTools_OrientedShapeMapHasher >, NCollection_Map< NCollection_CellFilter::Cell >, NCollection_Map< TopoDS_Shape, TopTools_ShapeMapHasher >, NCollection_Map< Standard_Integer >, NCollection_Map< Standard_Address >, NCollection_Map< Standard_Integer, TColStd_MapIntegerHasher >, NCollection_Map< BOPDS_PassKey, BOPDS_PassKeyMapHasher >, NCollection_Map< Handle_NIS_Drawer >, NCollection_SList< TheItemType >, NCollection_Array1< TheItemType >, NCollection_Array1< theVec_t >, NCollection_Array1< NCollection_Vec2 >, NCollection_Array1< OpenGl_SequenceOfStructure >, NCollection_Vector< TheItemType >, NCollection_Vector< Standard_Size >, NCollection_Vector< Handle< OpenGl_VertexBuffer > >, NCollection_Vector< Interface_FileParameter >, NCollection_Vector< BinLDrivers_DocumentSection >, NCollection_Vector< BRepMesh_Vertex >, NCollection_Vector< IntPolyh_Edge >, NCollection_Vector< NCollection_UBTreeFiller::ObjBnd >, NCollection_Vector< IntPolyh_Couple >, NCollection_Vector< Handle< OpenGl_Texture > >, NCollection_Vector< IntPolyh_Triangle >, NCollection_Vector< IntPolyh_Point >, NCollection_Vector< Type >, NCollection_Vector< gp_XYZ >, NCollection_Vector< Handle< NCollection_Array1 > >, NCollection_Vector< GLuint >, NCollection_Vector< BRepMesh_Circ >, NCollection_Vector< Poly_CoherentLink >, NCollection_Vector< Standard_ShortReal >, NCollection_Vector< IntPolyh_StartPoint >, NCollection_Vector< Poly_CoherentNode >, NCollection_Vector< Poly_CoherentTriangle >, NCollection_Vector< IntPolyh_SectionLine >, NCollection_Vector< NIS_InteractiveObject * >, NCollection_Vector< OpenGl_Font::Tile >, NCollection_Array2< TheItemType >, NCollection_Sequence< TheItemType >, NCollection_Sequence< Handle< OpenGl_ShaderProgram > >, NCollection_Sequence< const OpenGl_Structure * >, NCollection_Sequence< HCurve >, NCollection_Sequence< Handle< OpenGl_ShaderObject > >, NCollection_Sequence< Handle< Graphic3d_ShaderObject > >, NCollection_Sequence< NCollection_List >, NCollection_Sequence< BRepExtrema_SolutionElem >, NCollection_Sequence< IntSurf_PntOn2S >, NCollection_Sequence< HArrow >, NCollection_Sequence< Handle< Graphic3d_ShaderVariable > >, NCollection_Sequence< OpenGl_Layer >, NCollection_Sequence< Handle< Graphic3d_ClipPlane > >, NCollection_Stack< TheItemType >, NCollection_Queue< TheItemType >, NCollection_List< TheItemType >, NCollection_Set< TheItemType >, NCollection_List< Handle_NIS_View >, NCollection_List< Handle_VrmlData_Node >, NCollection_List< Handle_NIS_InteractiveObject >, NCollection_List< Handle< BOPDS_PaveBlock > >, NCollection_List< const OpenGl_Structure * >, NCollection_List< TColStd_MapOfInteger * >, NCollection_List< BOPTools_ConnexityBlock >, NCollection_List< const char * >, NCollection_List< TCollection_ExtendedString >, NCollection_List< BOPDS_PassKeyBoolean >, NCollection_List< NIS_InteractiveContext * >, NCollection_List< TopoDS_Shape >, NCollection_List< Standard_Integer >, NCollection_List< BOPDS_Pave >, NCollection_List< BOPAlgo_CheckResult >, NCollection_List< TCollection_AsciiString >, NCollection_List< VrmlData_ShapeConvert::ShapeData >, NCollection_List< const OpenGl_Group * >, NCollection_List< NIS_DrawList * >, and NCollection_List< OpenGl_Light >.

Field Documentation

template<class TheItemType>
Handle< NCollection_BaseAllocator > NCollection_BaseCollection< TheItemType >::myAllocator
protected

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