NEST  2.6.0,not_revisioned_source_dir@0
nest_timemodifier.h
Go to the documentation of this file.
1 /*
2  * nest_timemodifier.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 NEST_TIMEMODIFIER_H
24 #define NEST_TIMEMODIFIER_H
25 
26 #include "scheduler.h"
27 
28 /*
29 TimeModifier is an interface class which defines the scheduler's
30 ability to modify the representation of time. It is only safe
31 to change the number of tics representing a millisecond if no
32 Time objects exist or it is guaranteed that all Time objects are
33 reinitialized before usage. Only the Scheduler can do this.
34 Therefore the functions
35  set_tics_per_ms
36 and
37  set_tics_per_step_default
38 are only accessible by specific members of the Scheduler
39  (reset, set_status)
40 
41 Diesmann
42 */
43 
44 
45 namespace nest
46 {
47 
49  {
50  // allow Scheduler::set_status to change Time representation
51  friend void Scheduler::set_status(DictionaryDatum const &);
52 
53  // allow Scheduler::rest to change Time representation
54  friend void Scheduler::reset();
55 
56  private:
57 
63  static void set_time_representation(double_t tics_per_ms, double_t ms_per_step);
64 
68  static void reset_to_defaults();
69 
70  };
71 
72 
73 
74 } // Namespace
75 
76 
77 
78 #endif
void reset()
Bring scheduler back to its initial state.
Definition: scheduler.cpp:109
double double_t
Double precision floating point numbers.
Definition: nest.h:93
static void set_time_representation(double_t tics_per_ms, double_t ms_per_step)
Set the rime represeantation (TICS_PER_MS_, MS_PER_TICS_ and TICS_PER_STEP)
Definition: nest_timemodifier.cpp:27
static void reset_to_defaults()
Reset TICS_PER_MS_, MS_PER_TICS_ and TICS_PER_STEP_ to compiled in default values.
Definition: nest_timemodifier.cpp:32
Definition: nest_timemodifier.h:48
void set_status(const DictionaryDatum &)