Generic Model template. More...
#include <genericmodel.h>
Public Member Functions | |
| GenericModel (const std::string &, const std::string &deprecation_info) | |
| GenericModel (const GenericModel &, const std::string &) | |
| Create copy of model with new name. | |
| Model * | clone (const std::string &) const override |
| Return pointer to cloned model with same name. | |
| bool | has_proxies () override |
| bool | one_node_per_process () override |
| bool | is_off_grid () override |
| void | calibrate_time (const TimeConverter &tc) override |
| size_t | send_test_event (Node &, size_t, synindex, bool) override |
| Send a test event to a target node. | |
| void | sends_secondary_event (GapJunctionEvent &ge) override |
| SignalType | sends_signal () const override |
| Check what type of signal this model is sending. | |
| void | sends_secondary_event (InstantaneousRateConnectionEvent &re) override |
| void | sends_secondary_event (DiffusionConnectionEvent &de) override |
| void | sends_secondary_event (DelayedRateConnectionEvent &re) override |
| void | sends_secondary_event (LearningSignalConnectionEvent &re) override |
| void | sends_secondary_event (SICEvent &sic) override |
| Node const & | get_prototype () const override |
| Return const reference to the prototype. | |
| void | set_model_id (int) override |
| Set the model id on the prototype. | |
| int | get_model_id () override |
| Get the model id from the prototype. | |
| void | deprecation_warning (const std::string &) override |
| Issue deprecation warning on first call if model is deprecated. | |
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. | |
| Node * | create (size_t t) |
| Allocate new Node and return its pointer. | |
| void | clear () |
| Deletes all nodes which belong to this model. | |
| void | reserve_additional (size_t t, size_t n) |
| Reserve space for n additional Nodes. | |
| std::string | get_name () const |
| Return name of the Model. | |
| size_t | mem_available () |
| Return the available memory. | |
| size_t | mem_capacity () |
| Return the memory capacity. | |
| void | set_status (const Dictionary &) |
| Change properties of the prototype node according to the entries in the dictionary. | |
| Dictionary | get_status () |
| Export properties of the prototype node by setting entries in the status dictionary. | |
| void | set_type_id (size_t id) |
| Set the model id on the prototype. | |
| size_t | get_type_id () const |
Private Member Functions | |
| void | set_status_ (const Dictionary &) override |
| Dictionary | get_status_ () override |
| size_t | get_element_size () const override |
| Return the size of the prototype. | |
| Node * | create_ () override |
| Call placement new on the supplied memory position. | |
Private Attributes | |
| ElementT | proto_ |
| Prototype node from which all instances are constructed. | |
| std::string | deprecation_info_ |
| String containing deprecation information; empty if model not deprecated. | |
| bool | deprecation_warning_issued_ |
| False until deprecation warning has been issued once. | |
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, |
| const std::string & | deprecation_info | ||
| ) |
| 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().
|
inlineoverridevirtual |
Implements nest::Model.
|
overridevirtual |
Return pointer to cloned model with same name.
Implements nest::Model.
|
overrideprivatevirtual |
Call placement new on the supplied memory position.
Implements nest::Model.
|
overridevirtual |
Issue deprecation warning on first call if model is deprecated.
| calling | function |
Implements nest::Model.
References nest::DEPRECATED, and LOG.
|
overrideprivatevirtual |
Return the size of the prototype.
Implements nest::Model.
|
overridevirtual |
Get the model id from the prototype.
Implements nest::Model.
|
overridevirtual |
Return const reference to the prototype.
Implements nest::Model.
|
overrideprivatevirtual |
Implements nest::Model.
References nest::names::elementsize().
|
inlineoverridevirtual |
Implements nest::Model.
|
inlineoverridevirtual |
Implements nest::Model.
|
inlineoverridevirtual |
Implements nest::Model.
|
inlineoverridevirtual |
Send a test event to a target node.
This is a forwarding function that calls Node::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.
|
inlineoverridevirtual |
Implements nest::Model.
|
inlineoverridevirtual |
Implements nest::Model.
|
inlineoverridevirtual |
Implements nest::Model.
|
inlineoverridevirtual |
Implements nest::Model.
|
inlineoverridevirtual |
Implements nest::Model.
|
inlineoverridevirtual |
Implements nest::Model.
|
inlineoverridevirtual |
Check what type of signal this model is sending.
Required so that proxynode can formward this call to model that in turn delegates the call to the underlying prototype.
Implements nest::Model.
|
overridevirtual |
Set the model id on the prototype.
Implements nest::Model.
References nest::Node::set_model_id().
|
overrideprivatevirtual |
Implements nest::Model.
|
private |
String containing deprecation information; empty if model not deprecated.
|
private |
False until deprecation warning has been issued once.
|
private |
Prototype node from which all instances are constructed.