00001
00002
00003
00004 #ifndef RGMA_ENVIRONMENT_H
00005 #define RGMA_ENVIRONMENT_H
00006
00007 #include <semaphore.h>
00008 #include <string>
00009 #include <vector>
00010
00011 namespace glite
00012 {
00013 namespace rgma
00014 {
00015
00021 class Environment
00022 {
00023
00024 public:
00025
00033 static const char* getenv(const std::string& name);
00034
00035 private:
00036
00037 struct VariableFromScript
00038 {
00039 std::string name;
00040 char* value;
00041 VariableFromScript(std::string name) : name(name), value(0) {}
00042 };
00043
00047 static void setupEnvironmentFromScripts();
00048
00049 static bool environmentSetUp;
00050 static sem_t settingUpLock;
00051 static int semInitStatus;
00052 static const class APILogging& cat;
00053 };
00054 }
00055 }
00056 #endif //glite_ENVIRONMENT_H