BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pyInterpreter.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: pyInterpreter.h,v 1.15.18.1 2007/03/25 21:25:21 oliver Exp $
5 //
6 
7 #ifndef BALL_PYTHON_PYINTERPRETER_H
8 #define BALL_PYTHON_PYINTERPRETER_H
9 
10 #ifndef BALL_COMMON_H
11 # include <BALL/common.h>
12 #endif
13 
14 #ifndef BALL_DATAYPE_STRING_H
15 # include <BALL/DATATYPE/string.h>
16 #endif
17 
18 #ifndef BALL_SYSTEM_PATH_H
19 # include <BALL/SYSTEM/path.h>
20 #endif
21 
22 #include <vector>
23 
24 namespace BALL
25 {
33  {
34  private:
35  // We don't want anybody to instantiate this!
36  PyInterpreter();
38 
39  public:
42 
43  typedef std::vector<String> PathStrings;
45 
48 
57  static void initialize();
58 
63  static void finalize();
64 
68  static bool isInitialized();
69 
71  static void setSysPath(const PathStrings& path_strings);
72 
74  static const PathStrings& getSysPath();
75 
77  static bool isValid() { return valid_;}
78 
80  static String getStartupLog() { return start_log_;}
81 
83 
84 
92  static String run(const String& s, bool& result);
93 
97  static String runFile(const String& filename)
99 
106  static bool importModule(const String& module_name);
108  protected:
110  static bool valid_;
112  };
113 
114 } // namespace BALL
115 
116 #endif // BALL_PYTHON_PYINTERPRETER_H