TokVal Class Reference

This stores arbitrary token values and remembers the type. More...

#include <token.h>

List of all members.

Public Member Functions

 TokVal ()
 Default Constructor.
 TokVal (const char s[])
 To set TokVal from String (C - style).
 TokVal (const String &s)
 To set TokVal from String (C++ - style).
 TokVal (Index n)
 To set TokVal from an integer.
 TokVal (Numeric x)
 To set TokVal from a Numeric.
 TokVal (ArrayOfString sv)
 To set TokVal from an array of Strings.
 TokVal (ArrayOfIndex nv)
 To set TokVal from an array of integers.
 TokVal (Vector xv)
 To set TokVal from a Vector.
 operator String () const
 Return String.
 operator Index () const
 Return Index.
 operator Numeric () const
 Return Numeric.
 operator ArrayOfString () const
 Return array of Strings.
 operator ArrayOfIndex () const
 Return array of integers.
 operator Vector () const
 Return Vector.

Private Attributes

TokValType mtype
String ms
Index mn
Numeric mx
ArrayOfString msv
ArrayOfIndex mnv
Vector mxv

Friends

ostream & operator<< (ostream &os, const TokVal &a)
 Output operator.


Detailed Description

This stores arbitrary token values and remembers the type.

Only the correct type can be extracted again.

Definition at line 33 of file token.h.


Constructor & Destructor Documentation

TokVal::TokVal (  )  [inline]

Default Constructor.

(Sets type to undefined_t)

Definition at line 37 of file token.h.

TokVal::TokVal ( const char  s[]  )  [inline]

To set TokVal from String (C - style).

Definition at line 42 of file token.h.

TokVal::TokVal ( const String s  )  [inline]

To set TokVal from String (C++ - style).

Definition at line 48 of file token.h.

TokVal::TokVal ( Index  n  )  [inline]

To set TokVal from an integer.

Definition at line 54 of file token.h.

TokVal::TokVal ( Numeric  x  )  [inline]

To set TokVal from a Numeric.

Definition at line 60 of file token.h.

TokVal::TokVal ( ArrayOfString  sv  )  [inline]

To set TokVal from an array of Strings.

Definition at line 66 of file token.h.

TokVal::TokVal ( ArrayOfIndex  nv  )  [inline]

To set TokVal from an array of integers.

Definition at line 72 of file token.h.

TokVal::TokVal ( Vector  xv  )  [inline]

To set TokVal from a Vector.

Definition at line 78 of file token.h.


Member Function Documentation

TokVal::operator String (  )  const

Return String.

Definition at line 33 of file token.cc.

TokVal::operator Index (  )  const

Return Index.

Definition at line 38 of file token.cc.

TokVal::operator Numeric (  )  const

Return Numeric.

Definition at line 43 of file token.cc.

TokVal::operator ArrayOfString (  )  const

Return array of Strings.

Definition at line 49 of file token.cc.

TokVal::operator ArrayOfIndex (  )  const

Return array of integers.

Definition at line 54 of file token.cc.

TokVal::operator Vector (  )  const

Return Vector.

Definition at line 59 of file token.cc.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const TokVal a 
) [friend]

Output operator.

Definition at line 65 of file token.cc.


Member Data Documentation

Definition at line 103 of file token.h.

String TokVal::ms [private]

Definition at line 104 of file token.h.

Index TokVal::mn [private]

Definition at line 105 of file token.h.

Numeric TokVal::mx [private]

Definition at line 106 of file token.h.

Definition at line 107 of file token.h.

Definition at line 108 of file token.h.

Vector TokVal::mxv [private]

Definition at line 109 of file token.h.


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

Generated on Wed Feb 4 08:17:38 2009 for ARTS by  doxygen 1.5.6