ARTS  2.4.0(git:4fb77825)
TokVal Class Reference

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

#include <token.h>

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 40 of file token.h.

Constructor & Destructor Documentation

◆ TokVal() [1/9]

TokVal::TokVal ( )
inline

Default Constructor.

(Sets type to undefined_t)

Definition at line 43 of file token.h.

◆ TokVal() [2/9]

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

To set TokVal from String (C - style).

Definition at line 47 of file token.h.

◆ TokVal() [3/9]

TokVal::TokVal ( const String s)
inline

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

Definition at line 51 of file token.h.

◆ TokVal() [4/9]

TokVal::TokVal ( Index  n)
inline

To set TokVal from an integer.

Definition at line 55 of file token.h.

◆ TokVal() [5/9]

TokVal::TokVal ( Numeric  x)
inline

To set TokVal from a Numeric.

Definition at line 59 of file token.h.

◆ TokVal() [6/9]

TokVal::TokVal ( ArrayOfString  sv)
inline

To set TokVal from an array of Strings.

Definition at line 63 of file token.h.

◆ TokVal() [7/9]

TokVal::TokVal ( ArrayOfIndex  nv)
inline

To set TokVal from an array of integers.

Definition at line 74 of file token.h.

◆ TokVal() [8/9]

TokVal::TokVal ( Vector  xv)
inline

To set TokVal from a Vector.

Definition at line 85 of file token.h.

◆ TokVal() [9/9]

TokVal::TokVal ( Matrix  m)
inline

To set TokVal from a Matrix.

Definition at line 89 of file token.h.

Member Function Documentation

◆ operator ArrayOfIndex()

TokVal::operator ArrayOfIndex ( ) const

Return array of integers.

Definition at line 57 of file token.cc.

References Array_Index_t.

◆ operator ArrayOfString()

TokVal::operator ArrayOfString ( ) const

Return array of Strings.

Definition at line 52 of file token.cc.

References Array_String_t.

◆ operator Index()

TokVal::operator Index ( ) const

Return Index.

Definition at line 42 of file token.cc.

References Index_t.

◆ operator Matrix()

TokVal::operator Matrix ( ) const

Return Matrix.

Definition at line 67 of file token.cc.

References Matrix_t.

◆ operator Numeric()

TokVal::operator Numeric ( ) const

Return Numeric.

Definition at line 47 of file token.cc.

References Numeric_t.

◆ operator String()

TokVal::operator String ( ) const

Return String.

Definition at line 37 of file token.cc.

References String_t.

◆ operator Vector()

TokVal::operator Vector ( ) const

Return Vector.

Definition at line 62 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.

Member Data Documentation

◆ mm

Matrix TokVal::mm
private

Definition at line 121 of file token.h.

Referenced by operator<<().

◆ mn

Index TokVal::mn
private

Definition at line 116 of file token.h.

Referenced by operator<<().

◆ mnv

ArrayOfIndex TokVal::mnv
private

Definition at line 119 of file token.h.

Referenced by operator<<().

◆ ms

String TokVal::ms
private

Definition at line 115 of file token.h.

Referenced by operator<<().

◆ msv

ArrayOfString TokVal::msv
private

Definition at line 118 of file token.h.

Referenced by operator<<().

◆ mtype

TokValType TokVal::mtype
private

Definition at line 114 of file token.h.

Referenced by operator<<().

◆ mx

Numeric TokVal::mx
private

Definition at line 117 of file token.h.

Referenced by operator<<().

◆ mxv

Vector TokVal::mxv
private

Definition at line 120 of file token.h.

Referenced by operator<<().


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