NEST  2.6.0,not_revisioned_source_dir@0
modelrange.h
Go to the documentation of this file.
1 /*
2  * modelrange.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 MODELRANGE_H
24 #define MODELRANGE_H
25 
26 #include "nest.h"
27 
28 namespace nest {
29 
30  class modelrange
31  {
32  public:
33  modelrange(index model, index first_gid, index last_gid);
34  bool is_in_range(index gid) const {return ((gid >=first_gid_) && (gid <=last_gid_));}
35  index get_model_id() const {return model_;}
36  index get_first_gid() const {return first_gid_;}
37  index get_last_gid() const {return last_gid_;}
38  void extend_range(index new_last_gid);
39 
40  private:
44  };
45 }
46 
47 #endif
size_t index
Unsigned long type for enumerations.
Definition: nest.h:109
index last_gid_
Definition: modelrange.h:43
index get_last_gid() const
Definition: modelrange.h:37
index first_gid_
Definition: modelrange.h:42
modelrange(index model, index first_gid, index last_gid)
Definition: modelrange.cpp:25
index get_model_id() const
Definition: modelrange.h:35
bool is_in_range(index gid) const
Definition: modelrange.h:34
index model_
Definition: modelrange.h:41
const Name model("model")
Node parameter.
Definition: nest_names.h:196
Definition: modelrange.h:30
void extend_range(index new_last_gid)
Definition: modelrange.cpp:29
Default types used by the NEST kernel.
index get_first_gid() const
Definition: modelrange.h:36