AipsrcVector.h

Classes

AipsrcVector -- Read multiple values from the Aipsrc resource files (full description)
AipsrcVector_String -- Specialization of AipsrcVector for String (full description)
AipsrcVector_Bool -- Specialization of AipsrcVector for Bool (full description)

template <class T> class AipsrcVector : public Aipsrc

Interface

Public Members
AipsrcVector()
~AipsrcVector()
static Bool find(Vector<T> &value, const String &keyword)
static Bool find(Vector<T> &value, const String &keyword, const Vector<T> &deflt)
static Bool find(Vector<T> &value, const String &keyword, const String &defun, const String &resun)
static Bool find(Vector<T> &value, const String &keyword, const String &defun, const String &resun, const Vector<T> &deflt)
static uInt registerRC(const String &keyword, const Vector<T> &deflt)
static uInt registerRC(const String &keyword, const Unit &defun, const Unit &resun, const Vector<T> &deflt)
static const Vector<T> &get(uInt keyword)
static void set(uInt keyword, const Vector<T> &deflt)
static void save(uInt keyword)
Private Members
AipsrcVector<T> &operator=(const AipsrcVector<T> &other)
AipsrcVector(const AipsrcVector<T> &other)

Description

Review Status

Reviewed By:
mhaller
Date Reviewed:
1997/10/08
Programs:
Tests:

Prerequisite

Etymology

A class for getting multiple values from the Aipsrc files

Synopsis

The available functions (and notes) are the same as in AipsrcValue, but with a Vector result.

Template Type Argument Requirements

Example

Motivation

Programs need a way to get multi-valued keywords from the Aipsrc files.

Thrown Exceptions

To Do

Member Description

AipsrcVector()

Default constructor See a note in AipsrcValue.

~AipsrcVector()

static Bool find(Vector<T> &value, const String &keyword)
static Bool find(Vector<T> &value, const String &keyword, const Vector<T> &deflt)

The find() functions will, given a keyword, return the value of a matched keyword found in the files. If no match found the function will be False, and the default returned if specified.

static Bool find(Vector<T> &value, const String &keyword, const String &defun, const String &resun)
static Bool find(Vector<T> &value, const String &keyword, const String &defun, const String &resun, const Vector<T> &deflt)

These find() functions will, given a keyword, read the values of a matched keyword as a Quantity. If no unit has been given in the keyword value, the defun Unit will be assumed. The value returned will be converted to the resun Unit. If no match found, the default value is returned (see example above).

static uInt registerRC(const String &keyword, const Vector<T> &deflt)
static uInt registerRC(const String &keyword, const Unit &defun, const Unit &resun, const Vector<T> &deflt)

Functions to register keywords for later use in get() and set(). The returned value is the index for get() and set().

static const Vector<T> &get(uInt keyword)

Gets are like find, but using registered integers rather than names.

static void set(uInt keyword, const Vector<T> &deflt)

Sets allow registered values to be set

static void save(uInt keyword)

Save registered value to $HOME/.aipsrc

AipsrcVector<T> &operator=(const AipsrcVector<T> &other)

Copy constructor (not implemented)

AipsrcVector(const AipsrcVector<T> &other)


template <> class AipsrcVector_String<String> : public Aipsrc

Interface

Public Members
AipsrcVector_String()
~AipsrcVector_String()
static Bool find(Vector<String> &value, const String &keyword)
static Bool find(Vector<String> &value, const String &keyword, const Vector<String> &deflt)
static uInt registerRC(const String &keyword, const Vector<String> &deflt)
static const Vector<String> &get(uInt keyword)
static void set(uInt keyword, const Vector<String> &deflt)
static void save(uInt keyword)
Private Members
AipsrcVector_String<String> &operator=(const AipsrcVector_String<String> &other)
AipsrcVector_String(const AipsrcVector_String<String> &other)

Description

Synopsis

Warning The name AipsrcVector_String is only for cxx2html documentation problems. Use AipsrcVector in your code.

Member Description

AipsrcVector_String()

~AipsrcVector_String()

static Bool find(Vector<String> &value, const String &keyword)

static Bool find(Vector<String> &value, const String &keyword, const Vector<String> &deflt)

static uInt registerRC(const String &keyword, const Vector<String> &deflt)

static const Vector<String> &get(uInt keyword)

static void set(uInt keyword, const Vector<String> &deflt)

static void save(uInt keyword)

AipsrcVector_String<String> &operator=(const AipsrcVector_String<String> &other)

AipsrcVector_String(const AipsrcVector_String<String> &other)


template <> class AipsrcVector_Bool<Bool> : public Aipsrc

Interface

Public Members
AipsrcVector_Bool()
~AipsrcVector_Bool()
static Bool find(Vector<Bool> &value, const String &keyword)
static Bool find(Vector<Bool> &value, const String &keyword, const Vector<Bool> &deflt)
static uInt registerRC(const String &keyword, const Vector<Bool> &deflt)
static const Vector<Bool> &get(uInt keyword)
static void set(uInt keyword, const Vector<Bool> &deflt)
static void save(uInt keyword)
Private Members
AipsrcVector_Bool<Bool> &operator=(const AipsrcVector_Bool<Bool> &other)
AipsrcVector_Bool(const AipsrcVector_Bool<Bool> &other)

Description

Synopsis

Warning The name AipsrcVector_Bool is only for cxx2html documentation problems. Use AipsrcVector in your code.

Member Description

AipsrcVector_Bool()

~AipsrcVector_Bool()

static Bool find(Vector<Bool> &value, const String &keyword)

static Bool find(Vector<Bool> &value, const String &keyword, const Vector<Bool> &deflt)

static uInt registerRC(const String &keyword, const Vector<Bool> &deflt)

static const Vector<Bool> &get(uInt keyword)

static void set(uInt keyword, const Vector<Bool> &deflt)

static void save(uInt keyword)

AipsrcVector_Bool<Bool> &operator=(const AipsrcVector_Bool<Bool> &other)

AipsrcVector_Bool(const AipsrcVector_Bool<Bool> &other)