SIRF
3.4.0
sources
SIRF
src
common
include
sirf
common
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
sirf
Abstract data container.
Definition:
GeometricalInfo.cpp:141
Generated by
1.8.13