NEST  2.6.0,not_revisioned_source_dir@0
network_impl.h
Go to the documentation of this file.
1 /*
2  * network_impl.h
3  *
4  * This file is part of NEST.
5  *
6  * Copyright (C) 2004 The NEST Initiative
7  *
8  * NEST is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * NEST is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with NEST. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef NETWORK_IMPL_H
24 #define NETWORK_IMPL_H
25 
26 #include "network.h"
27 #include "conn_builder.h"
28 #include "conn_builder_factory.h"
29 
30 template <typename ConnBuilder>
31 void nest::Network::register_conn_builder(const std::string& name)
32 {
33  assert(!connruledict_->known(name));
35  assert(cb != 0);
36  const int id = connbuilder_factories_.size();
37  connbuilder_factories_.push_back(cb);
38  connruledict_->insert(name, id);
39 }
40 
41 #endif
42 
Generic factory class for ConnBuilder objects.
Definition: conn_builder_factory.h:43
assert(pNet!=0)
Dictionary * connruledict_
Dictionary for connection rules.
Definition: network.h:840
void register_conn_builder(const std::string &name)
Add a connectivity rule, i.e.
Definition: network_impl.h:31
std::vector< GenericConnBuilderFactory * > connbuilder_factories_
Definition: network.h:860
Declarations for class Network.
Token & insert(const Name &n, const Token &t)
Definition: dict.h:279
Factory class for generating objects of type ConnBuilder.
Definition: conn_builder_factory.h:58
bool known(const Name &) const
Definition: dict.h:259