NEST  2.6.0,not_revisioned_source_dir@0
Classes
Instance template

The Instance template is used to extend normal classes with a pool based memory management. More...

Classes

class  nest::Instance< ClassT >
 Instance is a template is used to provide a pool-based management for arbitrary classes. More...
 

Detailed Description

The Instance template is used to extend normal classes with a pool based memory management.

It provides a framework of functions which allow the kernel to efficiently create or delete nodes. Also functions for getting information about the allocated/used memory are included. For example the function allocate in an arbitrary template class can be written as

template<typename ElementT>
{
Node *n=new Instance<ElementT>;
assert(n !=NULL);
return n;
}

to take advantage of the pool based allocator. Likewise the function reserve_additional() looks like

template< typename ElementT>
{
}
Note
Probably the best way to see how Instance is used is to look into the code where it is used. One Place for this is GenericModel-Template
J. M. Eppler, 2003-11-12, 02:49