ARTS 2.5.0 (git: 9ee3ac6c)
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 (ArrayOfSpeciesTag nst)
 To set TokVal from an array of species tags. 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 ArrayOfSpeciesTag () 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
 
ArrayOfSpeciesTag mnst
 
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 42 of file token.h.

Constructor & Destructor Documentation

◆ TokVal() [1/10]

TokVal::TokVal ( )
inline

Default Constructor.

(Sets type to undefined_t)

Definition at line 45 of file token.h.

◆ TokVal() [2/10]

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

To set TokVal from String (C - style).

Definition at line 49 of file token.h.

◆ TokVal() [3/10]

TokVal::TokVal ( const String s)
inline

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

Definition at line 53 of file token.h.

◆ TokVal() [4/10]

TokVal::TokVal ( Index  n)
inline

To set TokVal from an integer.

Definition at line 57 of file token.h.

◆ TokVal() [5/10]

TokVal::TokVal ( Numeric  x)
inline

To set TokVal from a Numeric.

Definition at line 61 of file token.h.

◆ TokVal() [6/10]

TokVal::TokVal ( ArrayOfString  sv)
inline

To set TokVal from an array of Strings.

Definition at line 65 of file token.h.

◆ TokVal() [7/10]

TokVal::TokVal ( ArrayOfIndex  nv)
inline

To set TokVal from an array of integers.

Definition at line 77 of file token.h.

◆ TokVal() [8/10]

TokVal::TokVal ( ArrayOfSpeciesTag  nst)
inline

To set TokVal from an array of species tags.

Definition at line 89 of file token.h.

◆ TokVal() [9/10]

TokVal::TokVal ( Vector  xv)
inline

To set TokVal from a Vector.

Definition at line 101 of file token.h.

◆ TokVal() [10/10]

TokVal::TokVal ( Matrix  m)
inline

To set TokVal from a Matrix.

Definition at line 105 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, and ARTS_ASSERT.

◆ operator ArrayOfSpeciesTag()

TokVal::operator ArrayOfSpeciesTag ( ) const

Return array of integers.

Definition at line 62 of file token.cc.

References Array_SpeciesTag_t, and ARTS_ASSERT.

◆ operator ArrayOfString()

TokVal::operator ArrayOfString ( ) const

Return array of Strings.

Definition at line 52 of file token.cc.

References Array_String_t, and ARTS_ASSERT.

◆ operator Index()

TokVal::operator Index ( ) const

Return Index.

Definition at line 42 of file token.cc.

References ARTS_ASSERT, and Index_t.

◆ operator Matrix()

TokVal::operator Matrix ( ) const

Return Matrix.

Definition at line 72 of file token.cc.

References ARTS_ASSERT, and Matrix_t.

◆ operator Numeric()

TokVal::operator Numeric ( ) const

Return Numeric.

Definition at line 47 of file token.cc.

References ARTS_ASSERT, and Numeric_t.

◆ operator String()

TokVal::operator String ( ) const

Return String.

Definition at line 37 of file token.cc.

References ARTS_ASSERT, and String_t.

◆ operator Vector()

TokVal::operator Vector ( ) const

Return Vector.

Definition at line 67 of file token.cc.

References ARTS_ASSERT, and 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 140 of file token.h.

◆ mn

Index TokVal::mn
private

Definition at line 134 of file token.h.

◆ mnst

ArrayOfSpeciesTag TokVal::mnst
private

Definition at line 138 of file token.h.

◆ mnv

ArrayOfIndex TokVal::mnv
private

Definition at line 137 of file token.h.

◆ ms

String TokVal::ms
private

Definition at line 133 of file token.h.

◆ msv

ArrayOfString TokVal::msv
private

Definition at line 136 of file token.h.

◆ mtype

TokValType TokVal::mtype
private

Definition at line 132 of file token.h.

◆ mx

Numeric TokVal::mx
private

Definition at line 135 of file token.h.

◆ mxv

Vector TokVal::mxv
private

Definition at line 139 of file token.h.


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