NEST main@caf0ae8
 
Loading...
Searching...
No Matches
connection_id.h
Go to the documentation of this file.
1/*
2 * connection_id.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 CONNECTION_ID_H
24#define CONNECTION_ID_H
25
26#include "dictionary.h"
27
28
29namespace nest
30{
31
33{
34public:
36 ConnectionID( long source_node_id, long target_node_id, long target_thread, long synapse_modelid, long port );
37 ConnectionID( long source_node_id, long target_thread, long synapse_modelid, long port );
38 ConnectionID( const ConnectionID& ) = default;
39
40 Dictionary get_dict() const;
41 bool operator==( const ConnectionID& c ) const;
42 void print_me( std::ostream& out ) const;
43 long get_source_node_id() const;
44 long get_target_node_id() const;
45 long get_target_thread() const;
46 long get_synapse_model_id() const;
47 long get_port() const;
48
49protected:
54 long port_;
55};
56
58 : source_node_id_( -1 )
59 , target_node_id_( -1 )
60 , target_thread_( -1 )
61 , synapse_modelid_( -1 )
62 , port_( -1 )
63{
64}
65
66inline long
71
72inline long
77
78inline long
83
84inline long
89
90inline long
92{
93 return port_;
94}
95
96} // namespace
97
98#endif /* #ifndef CONNECTION_ID_H */
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
Definition connection_id.h:33
ConnectionID()
Definition connection_id.h:57
long target_node_id_
Definition connection_id.h:51
Dictionary get_dict() const
Definition connection_id.cpp:56
ConnectionID(const ConnectionID &)=default
long get_target_thread() const
Definition connection_id.h:79
long get_port() const
Definition connection_id.h:91
long get_target_node_id() const
Definition connection_id.h:73
long get_synapse_model_id() const
Definition connection_id.h:85
long synapse_modelid_
Definition connection_id.h:53
long get_source_node_id() const
Definition connection_id.h:67
long source_node_id_
Definition connection_id.h:50
void print_me(std::ostream &out) const
Definition connection_id.cpp:82
long port_
Definition connection_id.h:54
bool operator==(const ConnectionID &c) const
Definition connection_id.cpp:75
long target_thread_
Definition connection_id.h:52
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33