NEST  2.6.0,not_revisioned_source_dir@0
modelrangemanager.h
Go to the documentation of this file.
1 /*
2  * modelrangemanager.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 MODELRANGEMANAGER_H
24 #define MODELRANGEMANAGER_H
25 
26 #include <vector>
27 #include "nest.h"
28 #include "modelrange.h"
29 
30 namespace nest {
31 
33  {
34  public:
36  void add_range(index model, index first_gid, index last_gid);
37  bool is_in_range(index gid) const {return ((gid <= last_gid_) && (gid >= first_gid_));}
39  bool model_in_use(index i) const;
40  void clear();
41  void print() const;
42  const modelrange& get_range(index gid) const;
43 
44  private:
45  std::vector<modelrange> modelranges_;
48  };
49 }
50 #endif
size_t index
Unsigned long type for enumerations.
Definition: nest.h:109
Definition: modelrangemanager.h:32
void clear()
Definition: modelrangemanager.cpp:94
void add_range(index model, index first_gid, index last_gid)
Definition: modelrangemanager.cpp:34
const modelrange & get_range(index gid) const
Definition: modelrangemanager.cpp:99
index last_gid_
Definition: modelrangemanager.h:47
Modelrangemanager()
Definition: modelrangemanager.cpp:30
bool model_in_use(index i) const
Definition: modelrangemanager.cpp:80
index first_gid_
Definition: modelrangemanager.h:46
bool is_in_range(index gid) const
Definition: modelrangemanager.h:37
long_t get_model_id(index gid)
Definition: modelrangemanager.cpp:53
const Name model("model")
Node parameter.
Definition: nest_names.h:196
Definition: modelrange.h:30
Default types used by the NEST kernel.
std::vector< modelrange > modelranges_
Definition: modelrangemanager.h:45
long long_t
Integer number with at least 32 bit.
Definition: nest.h:96