SIRF  3.4.0
getenv.h
1 #pragma once
2 
3 #ifndef SIRF_GETENV
4 #define SIRF_GETENV
5 
6 #include "sirf/iUtilities/LocalisedException.h"
7 
8 namespace sirf {
9  std::string getenv(const char* name, bool throws=false)
10  {
11  const char* value = std::getenv(name);
12  std::string s;
13  if (value)
14  s = value;
15  else if (throws)
16  THROW(s + "??? Environmental variable " + name + " not defined\n");
17  return s;
18  }
19 }
20 
21 #endif
Abstract data container.
Definition: GeometricalInfo.cpp:141