casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EnvVar.h
Go to the documentation of this file.
1 //# EnvVar.h: Environment variables class
2 //# Copyright (C) 1993,1994,1995,1999,2002
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef CASA_ENVVAR_H
29 #define CASA_ENVVAR_H
30 
31 #include <casacore/casa/aips.h>
33 
34 namespace casacore { //# NAMESPACE CASACORE - BEGIN
35 
36 // <summary>
37 // This class allows for getting enviroment variables
38 // </summary>
39 
40 // <use visibility=export>
41 // <reviewed reviewer="Paul Shannon" date="1995/02/08" tests="tEnvVar" demos="">
42 
43 // <synopsis>
44 // Environment variables are familiar to every Unix, MSDOS and VMS
45 // computer user. This class makes it convenient to get and
46 // enquire about environment variables from within a C++ program.
47 // </synopsis>
48 
49 // <example>
50 // Check if an environment variable is defined.
51 // If so, get its value.
52 // <srcblock>
53 // if (EnvironmentVariable::isDefined ("PATH")) {
54 // cout << EnvironmentVariable::get ("PATH") << endl;
55 // }
56 // </srcblock>
57 // </example>
58 
59 // <todo asof=1994/02/08>
60 // </todo>
61 
63 {
64 public:
65  // Is environment variable with given name defined?
66  static Bool isDefined (const String& name);
67 
68  // Get the value of environment variable with given name.
69  // If not defined, return an empty String.
70  static String get (const String& name);
71 
72  // Define environment variable.
73  // If it already exists, its value will be overwritten.
74  static void set (const String& name, const String& value);
75 
76 private:
77  // This class is not meant to be constructed.
79 };
80 
81 
82 
83 } //# NAMESPACE CASACORE - END
84 
85 #endif
86 
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
EnvironmentVariable()
This class is not meant to be constructed.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
This class allows for getting enviroment variables.
Definition: EnvVar.h:62
static void set(const String &name, const String &value)
Define environment variable.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
static Bool isDefined(const String &name)
Is environment variable with given name defined?
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42