thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
DynamicLoader.h
1 // -*- C++ -*-
2 //
3 // DynamicLoader.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2019 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef ThePEG_DynamicLoader_H
10 #define ThePEG_DynamicLoader_H
11 // This is the declaration of the DynamicLoader class.
12 
13 #include "ThePEG/Config/ThePEG.h"
14 
15 namespace ThePEG {
16 
28 
29 public:
30 
34  static bool loadcmd(string);
35 
42  static bool load(string file);
43 
48  static void appendPath(string);
49 
54  static void prependPath(string);
55 
59  static string lastErrorMessage;
60 
65  static void dlname(string);
66 
71  static string dlnameversion(string libs);
72 
77  static const vector<string> & allPaths();
78 
83  static const vector<string> & appendedPaths();
84 
89  static const vector<string> & prependedPaths();
90 
91 private:
92 
97  static vector<string> paths;
98 
103  static vector<string> prepaths;
104 
109  static vector<string> apppaths;
110 
115  static vector<string> defaultPaths();
116 
121  static map<string,string> versionMap;
122 
123 };
124 
125 }
126 
127 #endif /* ThePEG_DynamicLoader_H */
static vector< string > defaultPaths()
Used to initialize the paths vector from the ThePEG_PATH environment.
static string lastErrorMessage
Return the last error message issued from the platforms loader.
Definition: DynamicLoader.h:59
static bool load(string file)
Try to load the file given as argument.
static void prependPath(string)
Add a path to the top of the list of directories to seach for dynaically linkable libraries...
static string dlnameversion(string libs)
Given a list of generic library names, return the same list with appended version numbers where avail...
static const vector< string > & allPaths()
Return the full list of directories to seach for dynaically linkable libraries.
static bool loadcmd(string)
The actual load command used on the current platform.
static vector< string > apppaths
The list of appended directories to seach for dynaically linkable libraries.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
This is the main config header file for ThePEG.
static vector< string > prepaths
The list of prepended directories to seach for dynaically linkable libraries.
static map< string, string > versionMap
Map of names of dynamic libraries with correct version numbers indexed by their generic names...
static const vector< string > & prependedPaths()
Return the list of prepended directories to seach for dynaically linkable libraries.
static void dlname(string)
Insert the name of the given library with correct version numbers appended, in the corresponding map...
DynamicLoader is the general interface to the dynamic loader functions of the underlying operating sy...
Definition: DynamicLoader.h:27
static vector< string > paths
The list of directories to seach for dynaically linkable libraries.
Definition: DynamicLoader.h:97
static void appendPath(string)
Add a path to the bottom of the list of directories to seach for dynaically linkable libraries...
static const vector< string > & appendedPaths()
Return the list of appended directories to seach for dynaically linkable libraries.