ARTS  2.2.66
TokVal Class Reference

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

#include <token.h>

Collaboration diagram for TokVal:

Public Member Functions

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

Private Attributes

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

Friends

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

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() [1/9]

TokVal::TokVal ( )
inline

Default Constructor.

(Sets type to undefined_t)

Definition at line 37 of file token.h.

◆ TokVal() [2/9]

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

To set TokVal from String (C - style).

Definition at line 41 of file token.h.

◆ TokVal() [3/9]

TokVal::TokVal ( const String s)
inline

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

Definition at line 45 of file token.h.

◆ TokVal() [4/9]

TokVal::TokVal ( Index  n)
inline

To set TokVal from an integer.

Definition at line 49 of file token.h.

◆ TokVal() [5/9]

TokVal::TokVal ( Numeric  x)
inline

To set TokVal from a Numeric.

Definition at line 53 of file token.h.

◆ TokVal() [6/9]

TokVal::TokVal ( ArrayOfString  sv)
inline

To set TokVal from an array of Strings.

Definition at line 57 of file token.h.

◆ TokVal() [7/9]

TokVal::TokVal ( ArrayOfIndex  nv)
inline

To set TokVal from an array of integers.

Definition at line 61 of file token.h.

◆ TokVal() [8/9]

TokVal::TokVal ( Vector  xv)
inline

To set TokVal from a Vector.

Definition at line 65 of file token.h.

◆ TokVal() [9/9]

TokVal::TokVal ( Matrix  m)
inline

To set TokVal from a Matrix.

Definition at line 69 of file token.h.

References operator<<.

Member Function Documentation

◆ operator ArrayOfIndex()

TokVal::operator ArrayOfIndex ( ) const

Return array of integers.

Definition at line 54 of file token.cc.

References Array_Index_t.

◆ operator ArrayOfString()

TokVal::operator ArrayOfString ( ) const

Return array of Strings.

Definition at line 49 of file token.cc.

References Array_String_t.

◆ operator Index()

TokVal::operator Index ( ) const

Return Index.

Definition at line 38 of file token.cc.

References Index_t.

◆ operator Matrix()

TokVal::operator Matrix ( ) const

Return Matrix.

Definition at line 64 of file token.cc.

References Matrix_t.

◆ operator Numeric()

TokVal::operator Numeric ( ) const

Return Numeric.

Definition at line 43 of file token.cc.

References Numeric_t.

◆ operator String()

TokVal::operator String ( ) const

Return String.

Definition at line 33 of file token.cc.

References String_t.

◆ operator Vector()

TokVal::operator Vector ( ) const

Return Vector.

Definition at line 59 of file token.cc.

References Vector_t.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const TokVal a 
)
friend

Output operator.

Referenced by TokVal().

Member Data Documentation

◆ mm

Matrix TokVal::mm
private

Definition at line 101 of file token.h.

Referenced by operator<<().

◆ mn

Index TokVal::mn
private

Definition at line 96 of file token.h.

Referenced by operator<<().

◆ mnv

ArrayOfIndex TokVal::mnv
private

Definition at line 99 of file token.h.

Referenced by operator<<().

◆ ms

String TokVal::ms
private

Definition at line 95 of file token.h.

Referenced by operator<<().

◆ msv

ArrayOfString TokVal::msv
private

Definition at line 98 of file token.h.

Referenced by operator<<().

◆ mtype

TokValType TokVal::mtype
private

Definition at line 94 of file token.h.

Referenced by operator<<().

◆ mx

Numeric TokVal::mx
private

Definition at line 97 of file token.h.

Referenced by operator<<().

◆ mxv

Vector TokVal::mxv
private

Definition at line 100 of file token.h.

Referenced by operator<<().


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