casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Static Public Member Functions
casa::AttValue Class Reference

Provision of type identification services for Attribute classes. More...

#include <AttValBase.h>

List of all members.

Public Types

enum  ValueType {
  AtuInt,
  AtInt,
  AtFloat,
  AtDouble,
  AtBool,
  AtString,
  AtQuantity,
  AtInvalid
}
 The possible value types. More...

Static Public Member Functions

static AttValue::ValueType whatType (uInt *)
 Determine the type of a scalar or Array variable.
static AttValue::ValueType whatType (Vector< uInt > *)
static AttValue::ValueType whatType (Int *)
static AttValue::ValueType whatType (Vector< Int > *)
static AttValue::ValueType whatType (Float *)
static AttValue::ValueType whatType (Vector< Float > *)
static AttValue::ValueType whatType (Double *)
static AttValue::ValueType whatType (Vector< Double > *)
static AttValue::ValueType whatType (Bool *)
static AttValue::ValueType whatType (Vector< Bool > *)
static AttValue::ValueType whatType (String *)
static AttValue::ValueType whatType (Vector< String > *)
static AttValue::ValueType whatType (Quantity *)
static AttValue::ValueType whatType (Vector< Quantity > *)
static AttValue::ValueType whatType (void *)

Detailed Description

Provision of type identification services for Attribute classes.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd
Test programs:
tAttribute

Etymology

"AttValue" is a contraction of "Attribute Value"

Synopsis

AttValue provides type identification services for use in the Attribute classes.

Example

AttValue can be used to provide an enumeration which identifies the type of a variable, for example:

    Int i;
    if (AttValue::whatType(&i) != AttValue::AtInt) {
      throw(AipsError(String("Incorrect type identification in AttValue")));
    }

Motivation

This is a support class to unify type identification for the various Attribute classes.

To Do

Definition at line 77 of file AttValBase.h.


Member Enumeration Documentation

The possible value types.

Enumerator:
AtuInt 
AtInt 
AtFloat 
AtDouble 
AtBool 
AtString 
AtQuantity 
AtInvalid 

Definition at line 82 of file AttValBase.h.


Member Function Documentation

static AttValue::ValueType casa::AttValue::whatType ( uInt ) [inline, static]

Determine the type of a scalar or Array variable.

Definition at line 95 of file AttValBase.h.

References AtuInt.

static AttValue::ValueType casa::AttValue::whatType ( Vector< uInt > *  ) [inline, static]

Definition at line 97 of file AttValBase.h.

References AtuInt.

static AttValue::ValueType casa::AttValue::whatType ( Int ) [inline, static]

Definition at line 99 of file AttValBase.h.

References AtInt.

static AttValue::ValueType casa::AttValue::whatType ( Vector< Int > *  ) [inline, static]

Definition at line 101 of file AttValBase.h.

References AtInt.

static AttValue::ValueType casa::AttValue::whatType ( Float ) [inline, static]

Definition at line 103 of file AttValBase.h.

References AtFloat.

static AttValue::ValueType casa::AttValue::whatType ( Vector< Float > *  ) [inline, static]

Definition at line 105 of file AttValBase.h.

References AtFloat.

static AttValue::ValueType casa::AttValue::whatType ( Double ) [inline, static]

Definition at line 107 of file AttValBase.h.

References AtDouble.

static AttValue::ValueType casa::AttValue::whatType ( Vector< Double > *  ) [inline, static]

Definition at line 109 of file AttValBase.h.

References AtDouble.

static AttValue::ValueType casa::AttValue::whatType ( Bool ) [inline, static]

Definition at line 111 of file AttValBase.h.

References AtBool.

static AttValue::ValueType casa::AttValue::whatType ( Vector< Bool > *  ) [inline, static]

Definition at line 113 of file AttValBase.h.

References AtBool.

static AttValue::ValueType casa::AttValue::whatType ( String ) [inline, static]

Definition at line 115 of file AttValBase.h.

References AtString.

static AttValue::ValueType casa::AttValue::whatType ( Vector< String > *  ) [inline, static]

Definition at line 117 of file AttValBase.h.

References AtString.

static AttValue::ValueType casa::AttValue::whatType ( Quantity ) [inline, static]

Definition at line 119 of file AttValBase.h.

References AtQuantity.

static AttValue::ValueType casa::AttValue::whatType ( Vector< Quantity > *  ) [inline, static]

Definition at line 121 of file AttValBase.h.

References AtQuantity.

static AttValue::ValueType casa::AttValue::whatType ( void *  ) [inline, static]

Definition at line 123 of file AttValBase.h.

References AtInvalid.


The documentation for this class was generated from the following file: