Go to the documentation of this file.
31 #include <casacore/casa/aips.h>
32 #include <casacore/casa/BasicSL/String.h>
33 #include <casacore/casa/Containers/Block.h>
34 #include <casacore/casa/Arrays/Vector.h>
35 #include <casacore/casa/OS/Mutex.h>
40 template <
class T>
class AipsrcValue;
41 template <
class T>
class AipsrcVector;
351 static void show(ostream &oStream);
static String home
AIPSHOME.
static CallOnce0 theirCallOnce
Object to ensure safe multi-threaded lazy single initialization.
static void genSet(Vector< String > &namlst, Vector< String > &vallst, const String &nam, const String &val)
Set (new or overwrite) keyword/value pair.
static String site
AIPSSITE.
static const Block< String > & values()
The following functions return the full lists of available data.
AipsrcValue< Bool > AipsrcBool
static Bool findNoParse(String &value, const String &keyword, uInt start)
Actual find function to use during parse() without recursing into parse()
static void set(uInt keyword, const String &deflt)
Sets allow registered values to be set.
static void save(uInt keyword, const Vector< String > &tname)
static void save(const String keyword, const String val)
Actual saving.
static Bool find(uInt &value, const String &keyword, Int Nname, const String tname[])
These finds check a (possible) value of the keyword against a list of coded values provided,...
static uInt registerRC(const String &keyword, const String &deflt)
Functions to register keywords for later use in get() and set().
AipsrcValue< Int > AipsrcInt
static Bool find(uInt &value, const String &keyword, const Vector< String > &tname, const String &deflt)
static const Block< String > & patterns()
static const String & get(uInt keyword)
Gets are like find, but using registered integers rather than names.
static void show(ostream &oStream)
The following show() function, useful for debugging, outputs all keyword/value pairs found.
AipsrcVector< Int > AipsrcVInt
static String host
AIPSHOST.
static const uInt & get(uInt &code, uInt keyword)
get for code
static const String & aipsHome()
Returns: ~/aips++
static Bool find(String &value, const String &keyword, const String &deflt)
This find usually saves you some lines of code, since you can supply the default you want to use when...
static Bool findNoHome(String &value, const String &keyword, const String &deflt)
static Bool find(uInt &value, const String &keyword, const Vector< String > &tname)
static void fillAips()
Fill in root, arch, site, host and home.
static Bool find(String &value, const String &keyword)
static Bool find(String &value, const String &keyword, uInt start)
Actual find function.
static void genSave(Vector< String > &namlst, Vector< String > &vallst, const String &fnam)
Save the names/values in file.
static const String & aipsSite()
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
static void reRead()
The reRead() function will reinitialise the static maps and read the aipsrc files again.
static Double lastParse
Last time data was (re)read.
static void save(uInt keyword, const String tname[])
static Bool matchKeyword(uInt &where, const String &keyword, uInt start)
Locate the right keyword in the static maps.
static Bool find(uInt &value, const String &keyword, Int Nname, const String tname[], const String &deflt)
static Block< String > nstrlst
AipsrcVector< Double > AipsrcVDouble
this file contains all the compiler specific defines
static void setAipsPath(const String &path=String())
Set an AIPSPATH that should be used in stead of a global AIPSPATH.
static uInt registerRC(const String &keyword, Int Nname, const String tname[], const String &deflt)
static String arch
AIPSARCH.
static void show()
Prints all info on cout.
static const String & aipsRoot()
Returns the appropriate Casacore or system variable values.
static uInt registerRC(const String &keyword, const Vector< String > &tname, const String &deflt)
static uInt genRestore(Vector< String > &namlst, Vector< String > &vallst, const String &fileList)
The following set is a general set of functions.
static Bool genGet(String &val, Vector< String > &namlst, Vector< String > &vallst, const String &nam)
Get the value of a keyword.
static Bool findNoHome(String &value, const String &keyword)
static const String & aipsHost()
static void doParse(String &fileList)
AipsrcVector< Bool > AipsrcVBool
static void set(uInt keyword, Int Nname, const String tname[], const String &deflt)
Specialization of AipsrcValue for Bool.
static uInt genParse(Block< String > &keywordPattern, Block< String > &keywordValue, uInt &fileEnd, const String &fileList)
The following parse function can be used for any list of files.
static String root
AIPSROOT.
static uInt fileEnd
The start of the non-home values.
static Block< String > keywordValue
List of values belonging to keywords found.
AipsrcVector< String > AipsrcVString
static Bool filled
Indicate above filled.
String: the storage and methods of handling collections of characters.
static void parse()
Read in the aipsrc files.
bool Bool
Define the standard types used by Casacore.
static Bool findDir(String &foundDir, const String &lastPart="", const Vector< String > &prepends=Vector< String >(), const Vector< String > &appends=Vector< String >(), Bool useStds=True)
Sets foundDir to the first /firstPart/lastPart path that it finds present on the system,...
static void set(uInt keyword, const Vector< String > &tname, const String &deflt)
static Block< uInt > codlst
static String extAipsPath
The possibly set external AIPSPATH.
static void save(uInt keyword)
Save a registered keyword value to $HOME/.aipsrc
static uInt registerRC(const String &keyword, Block< String > &nlst)
The registration function.
AipsrcValue< Double > AipsrcDouble
static Block< String > keywordPattern
List of patterns deducted from names.
static Bool genUnSet(Vector< String > &namlst, Vector< String > &vallst, const String &nam)
Remove a keyword from list (False if not in list)
Wrapper around std::call_once.
static Block< String > ncodlst
static Block< String > strlst
String register list.
static const String & aipsArch()