NEST
2.6.0,not_revisioned_source_dir@0
|
Generic Model template. More...
#include <genericmodel.h>
Public Member Functions | |
GenericModel (const std::string &) | |
GenericModel (const char[]) | |
GenericModel (const GenericModel &, const std::string &) | |
Create copy of model with new name. More... | |
Model * | clone (const std::string &) const |
Return pointer to cloned model with same name. More... | |
bool | has_proxies () |
bool | potential_global_receiver () |
bool | one_node_per_process () |
bool | is_off_grid () |
port | send_test_event (Node &, rport, synindex, bool) |
Node const & | get_prototype () const |
Return const reference to the prototype. More... | |
void | set_model_id (int) |
Set the model id on the prototype. More... | |
Public Member Functions inherited from nest::Model | |
Model (const std::string &name) | |
Model (const Model &m) | |
virtual | ~Model () |
void | set_threads () |
Set number of threads based on number set in network. More... | |
Node * | allocate (thread t) |
Allocate new Node and return its pointer. More... | |
void | free (thread t, Node *) |
void | clear () |
Deletes all nodes which belong to this model. More... | |
void | reserve_additional (thread t, size_t n) |
Reserve memory for at least n additional Nodes. More... | |
std::string | get_name () const |
Return name of the Model. More... | |
size_t | mem_available () |
Return the available memory. More... | |
size_t | mem_capacity () |
Return the memory capacity. More... | |
void | set_status (DictionaryDatum) |
Change properties of the prototype node according to the entries in the dictionary. More... | |
DictionaryDatum | get_status (void) |
Export properties of the prototype node by setting entries in the status dictionary. More... | |
void | set_type_id (index id) |
Set the model id on the prototype. More... | |
index | get_type_id () const |
Private Member Functions | |
void | set_status_ (DictionaryDatum) |
DictionaryDatum | get_status_ () |
size_t | get_element_size () const |
Return the size of the prototype. More... | |
Node * | allocate_ (void *) |
Call placement new on the supplied memory position. More... | |
void | init_memory_ (sli::pool &) |
Initialize the pool allocator with the node specific properties. More... | |
Private Attributes | |
ElementT | proto_ |
Prototype node from which all instances are constructed. More... | |
Generic Model template.
The template GenericModel should be used as base class for custom model classes. It already includes the element factory functionality, as well as a pool based memory manager, so that the user can concentrate on the "real" model aspects.
nest::GenericModel< ElementT >::GenericModel | ( | const std::string & | name | ) |
References nest::Model::set_threads().
nest::GenericModel< ElementT >::GenericModel | ( | const char | name[] | ) |
References nest::Model::set_threads().
nest::GenericModel< ElementT >::GenericModel | ( | const GenericModel< ElementT > & | oldmod, |
const std::string & | newname | ||
) |
Create copy of model with new name.
References nest::Model::get_type_id(), nest::Model::set_threads(), and nest::Model::set_type_id().
|
privatevirtual |
Call placement new on the supplied memory position.
Implements nest::Model.
References nest::names::n.
|
virtual |
Return pointer to cloned model with same name.
Implements nest::Model.
|
privatevirtual |
Return the size of the prototype.
Implements nest::Model.
|
virtual |
Return const reference to the prototype.
Implements nest::Model.
|
privatevirtual |
Implements nest::Model.
References nest::names::d.
|
inlinevirtual |
Implements nest::Model.
|
privatevirtual |
Initialize the pool allocator with the node specific properties.
Implements nest::Model.
References sli::pool::init().
|
inlinevirtual |
Implements nest::Model.
|
inlinevirtual |
Implements nest::Model.
|
inlinevirtual |
Implements nest::Model.
|
inlinevirtual |
Model::send_test_event() is a forwarding function that calls send_test_event() from the prototype. Since proxies know the model they represent, they can now answer a call to check connection by referring back to the model.
Implements nest::Model.
|
virtual |
Set the model id on the prototype.
Implements nest::Model.
|
privatevirtual |
Implements nest::Model.
|
private |
Prototype node from which all instances are constructed.