Toolkit TKernel » Package NCollection

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>

Inheritance diagram for NCollection_Array1 < TheItemType >:

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]





#include <TColStd_Array1OfReal.hxx>

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]




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值