NEST  2.6.0,not_revisioned_source_dir@0
slistartup.h
Go to the documentation of this file.
1 /*
2  * slistartup.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 SLISTARTUP_H
24 #define SLISTARTUP_H
25 
26 #include <string>
27 #include "sliconfig.h"
28 #include "slimodule.h"
29 #include "token.h"
30 #include "slifunction.h"
31 #include "name.h"
32 #include "compose.hpp"
33 
34 #include "dirent.h"
35 #include "errno.h"
36 
37 class SLIStartup: public SLIModule
38 {
39  const std::string startupfilename;
40  const std::string slilibpath;
41  std::string slihomepath;
42  std::string slidocdir;
43 
44  std::string locateSLIInstallationPath(void);
45  bool checkpath(std::string const &, std::string &) const;
46  std::string getenv(const std::string &) const;
47  std::string checkenvpath(std::string const &, SLIInterpreter *, std::string) const;
48 
51  bool debug_;
52  public:
53 
66 
71 
75 
83 
86 
93 
103 
105 
107  {
108  public:
109  void execute(SLIInterpreter *) const;
110  };
111 
113 
114  SLIStartup(int, char**);
116 
117  void init(SLIInterpreter *);
118 
119  const std::string name(void) const
120  {
121  return "SLIStartup";
122  }
123 };
124 
125 #endif
Name have_libneurosim_name
Definition: slistartup.h:91
SLIStartup(int, char **)
Definition: slistartup.cc:193
Name threading_name
Definition: slistartup.h:85
Name longlongsize_name
Definition: slistartup.h:79
Name prgsourcedir_name
Definition: slistartup.h:62
Name longsize_name
Definition: slistartup.h:77
const std::string startupfilename
Definition: slistartup.h:39
Name exitcode_abort_name
Definition: slistartup.h:97
Name start_name
Definition: slistartup.h:74
Name intsize_name
Definition: slistartup.h:76
const std::string slilibpath
Definition: slistartup.h:40
bool checkpath(std::string const &, std::string &) const
Returns true, if the interpreter startup file sli-init.sli is in the supplied path and false otherwis...
Definition: slistartup.cc:61
Name exitcode_segfault_name
Definition: slistartup.h:99
void init(SLIInterpreter *)
Initialise the module.
Definition: slistartup.cc:308
Definition: slifunction.h:35
Definition: slistartup.h:37
Represent strings by ints to facilitate fast comparison.
Definition: name.h:53
Name exitcode_name
Definition: slistartup.h:56
GetenvFunction getenvfunction
Definition: slistartup.h:112
Name host_name
Definition: slistartup.h:67
Name have_gsl_name
Definition: slistartup.h:89
Name exitcode_unknownerror_name
Definition: slistartup.h:102
Token targs
Definition: slistartup.h:49
Name statusdict_name
Definition: slistartup.h:73
~SLIStartup()
Definition: slistartup.h:115
Name havelonglong_name
Definition: slistartup.h:78
Name exitcode_success_name
Definition: slistartup.h:95
Name prgminor_name
Definition: slistartup.h:58
Name have_mpi_name
Definition: slistartup.h:87
Name prgname_name
Definition: slistartup.h:55
Name architecturedict_name
Definition: slistartup.h:82
Definition: slistartup.h:106
Name platform_name
Definition: slistartup.h:84
Name doublesize_name
Definition: slistartup.h:80
Name prgdocdir_name
Definition: slistartup.h:65
Name pointersize_name
Definition: slistartup.h:81
Name have_music_name
Definition: slistartup.h:90
Name prefix_name
Definition: slistartup.h:61
Name exitcode_userabort_name
Definition: slistartup.h:98
Definition: interpret.h:69
int verbosity_
Definition: slistartup.h:50
Name prgmajor_name
Definition: slistartup.h:57
Name prgdatadir_name
Definition: slistartup.h:64
Name hostcpu_name
Definition: slistartup.h:70
Name exitcode_exception_name
Definition: slistartup.h:100
std::string getenv(const std::string &) const
Definition: slistartup.cc:115
std::string checkenvpath(std::string const &, SLIInterpreter *, std::string) const
Checks if the environment variable envvar contains a directory.
Definition: slistartup.cc:151
Name exitcodes_name
Definition: slistartup.h:94
std::string slihomepath
Definition: slistartup.h:41
std::string slidocdir
Definition: slistartup.h:42
Base class for all SLI Interpreter modules.
Definition: slimodule.h:34
Name getenv_name
Definition: slistartup.h:72
bool debug_
Definition: slistartup.h:51
Name prgbuilt_name
Definition: slistartup.h:60
Name ismpi_name
Definition: slistartup.h:88
Name argv_name
Definition: slistartup.h:54
Name prgbuilddir_name
Definition: slistartup.h:63
Name ndebug_name
Definition: slistartup.h:92
A type-independent container for C++-types.
Definition: token.h:68
Name hostvendor_name
Definition: slistartup.h:69
Name prgpatch_name
Definition: slistartup.h:59
std::string locateSLIInstallationPath(void)
Name environment_name
Definition: slistartup.h:104
void execute(SLIInterpreter *) const
Definition: slistartup.cc:124
Name exitcode_scripterror_name
Definition: slistartup.h:96
Name exitcode_fatal_name
Definition: slistartup.h:101
Name hostos_name
Definition: slistartup.h:68
const std::string name(void) const
Return name of the module.
Definition: slistartup.h:119