23#ifndef MODEL_MANAGER_IMPL_H
24#define MODEL_MANAGER_IMPL_H
42template <
class ModelT >
48 const std::string msg =
49 String::compose(
"A model called '%1' already exists. Please choose a different name!", name );
57template <
template <
typename target
identifierT >
class ConnectionT >
65 register_specific_connection_model_< ConnectionT< TargetIdentifierPtrRport > >( name );
68 register_specific_connection_model_< ConnectionT< TargetIdentifierIndex > >( name +
"_hpc" );
72 register_specific_connection_model_< ConnectionLabel< ConnectionT< TargetIdentifierPtrRport > > >( name +
"_lbl" );
78template <
typename CompleteConnectionT >
87 String::compose(
"A synapse type called '%1' already exists.\nPlease choose a different name!", name );
94 const std::string msg = String::compose(
95 "CopyModel cannot generate another synapse. Maximal synapse model count of %1 exceeded.",
MAX_SYN_ID );
100 synapsedict_[ name ] =
static_cast< long >( new_syn_id );
121 proxy->
set_vp(
kernel().vp_manager.node_id_to_vp( node_id ) );
bool known(const std::string &key) const
Check whether there exists a value with specified key in the dictionary.
Definition dictionary.h:677
void resize_connections()
Definition connection_manager.cpp:1714
Definition connector_model.h:69
bool has_property(const ConnectionModelProperties &property) const
Definition connector_model.h:132
virtual void set_syn_id(synindex syn_id)=0
virtual std::unique_ptr< SecondaryEvent > get_secondary_event()=0
Definition connector_model.h:152
Generic Model template.
Definition genericmodel.h:46
Base class for all Kernel exceptions.
Definition exceptions.h:65
std::vector< std::vector< ConnectorModel * > > connection_models_
The list of connection models.
Definition model_manager.h:265
size_t get_num_connection_models() const
Definition model_manager.cpp:99
void register_connection_model(const std::string &name)
Register a synape model with a custom Connector model and without any common properties.
Definition model_manager_impl.h:59
std::vector< std::vector< Node * > > proxy_nodes_
Placeholders for remote nodes, one per thread.
Definition model_manager.h:275
void register_specific_connection_model_(const std::string &name)
Definition model_manager_impl.h:80
Dictionary synapsedict_
Dictionary of all synapse models.
Definition model_manager.h:268
size_t register_node_model_(Model *model)
Definition model_manager.cpp:162
Dictionary modeldict_
Dictionary of all node models.
Definition model_manager.h:267
size_t register_node_model(const std::string &name, std::string deprecation_info=std::string())
Register a node-model prototype.
Definition model_manager_impl.h:44
Node * get_proxy_node(size_t tid, size_t node_id)
Definition model_manager_impl.h:116
size_t get_model_id(size_t node_id) const
Get the ID of the model to which this node ID is assigned.
Definition modelrange_manager.cpp:81
Base class for all Models.
Definition model.h:53
Throw if an existing name is attempted to be redefined.
Definition exceptions.h:1099
Base class for all NEST network objects.
Definition node.h:99
void set_vp(size_t)
Store the number of the virtual process to which the node is assigned.
Definition node.h:1244
void set_node_id_(size_t)
Set global node id.
Definition node.h:1207
void assert_single_threaded() const
Fails if NEST is in thread-parallel section.
Definition vp_manager.h:192
ConnectionManager connection_manager
Definition kernel_manager.h:239
ModelRangeManager modelrange_manager
Definition kernel_manager.h:238
VPManager vp_manager
Definition kernel_manager.h:234
#define LOG(s, fctn, msg)
Definition logging.h:29
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
constexpr synindex invalid_synindex
Definition nest_types.h:116
constexpr uint64_t MAX_SYN_ID
Definition nest_types.h:96
KernelManager & kernel()
Definition kernel_manager.h:311