Open CASCADE Technology » Module FoundationClasses » Toolkit TKernel » Package NCollection
NCollection_BaseCollection< TheItemType > Class Template Reference
The NCollection and the TCollection package
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 throughStandard::Allocate/Free.
Collections of Standard Objects
TCollection
The collections of standard object classes provide frequently used instantiation of generic classes from the TCollection package with objects from the Standard package, strings from the TCollection package and geometric primitives.
There exists a limitation: OCCT generic classes require compilation of definitions in the CDL language and therefore can only be instantiated in WOK.
NCollection
The NCollection unit meets the requirements of OCCT community and all end users who do not use WOK development environment in their projects.
The NCollection provides a full replacement of all TCollection generic classes so that any OCCT collection could be instantiated via C++ template definitions. It is used in WOK environment (as nocdlpack development unit) or in any other configuration, since it only uses the standard capabilities of C++ language.
Earlier releases of OCCT offered NCollection classes in the form of macro definitions. Now it is strongly recommended to use C++ template classes instead, as they are more flexible and reliable. The old definitions based on C macros (in the header files NCollection_Define*.hxx) are kept for backward compatibility and no longer supported.
See the different between NCollction and TCollection package
#include <NCollection_Array1.hxx>
Constructor & Destructor Documentation
template<class TheItemType >
NCollection_Array1< TheItemType >::NCollection_Array1 ( const Standard_Integer theLower,
const Standard_Integer theUpper
)
[inline]
template<class TheItemType >
NCollection_Array1< TheItemType >::NCollection_Array1 ( const NCollection_Array1< TheItemType > & theOther ) [inline]
template<class TheItemType >
NCollection_Array1< TheItemType >::NCollection_Array1 ( const TheItemType & theBegin,
const Standard_Integer theLower,
const Standard_Integer theUpper
)
[inline]
template<class TheItemType >
NCollection_Array1< TheItemType >::~NCollection_Array1 ( void ) [inline]
Constructor & Destructor Documentation
TColStd_Array1OfReal::TColStd_Array1OfReal | ( | const Standard_Integer | Low, | |
const Standard_Integer | Up | |||
) |
TColStd_Array1OfReal::TColStd_Array1OfReal | ( | const Standard_Real & | Item, | |
const Standard_Integer | Low, | |||
const Standard_Integer | Up | |||
) |
TColStd_Array1OfReal::~TColStd_Array1OfReal | ( | ) | [inline] |