NEST  2.6.0,not_revisioned_source_dir@0
dynmodule.h
Go to the documentation of this file.
1 /*
2  * dynmodule.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 DYNMODULE_H
24 #define DYNMODULE_H
25 
26 #include <iostream>
27 #include <string>
28 #include "sliexceptions.h"
29 
30 class SLIInterpreter;
31 
32 namespace nest {
33  class Network;
34 }
35 
39 class DynModule
40 {
41  public:
42  virtual ~DynModule(){};
43 
52  virtual void init(SLIInterpreter *, nest::Network *) = 0;
53 
58  {
60  }
61 
65  virtual const std::string name(void) const=0;
66 
70  virtual const std::string commandstring(void) const;
71 
75  void install(std::ostream &, SLIInterpreter *, nest::Network *);
76 
77 };
78 
79 #endif
virtual void init(SLIInterpreter *, nest::Network *)=0
Initialise the module.
virtual void unregister(SLIInterpreter *, nest::Network *)
Unregister the symbols defined in module.
Definition: dynmodule.h:57
Exception to be thrown if an error occurs while loading/unloading dynamic modules.
Definition: sliexceptions.h:359
virtual ~DynModule()
Definition: dynmodule.h:42
Definition: interpret.h:69
Main administrative interface to the network.
Definition: network.h:135
virtual const std::string name(void) const =0
Return name of the module.
Base class for dynamically loadable SLI interpreter modules.
Definition: dynmodule.h:39
void install(std::ostream &, SLIInterpreter *, nest::Network *)
Print installation message via interpreter message command.
Definition: dynmodule.cpp:26
virtual const std::string commandstring(void) const
Return sli command sequence to be executed for initialisation.
Definition: dynmodule.cpp:35