ARTS  2.4.0(git:4fb77825)
arts_api_classes.cc File Reference

This file contains all declarations of the ARTS C API class interface. More...

#include "arts_api_classes.h"
#include "absorption.h"
#include "absorptionlines.h"
#include "covariance_matrix.h"
#include "energylevelmap.h"
#include "global_data.h"
#include "lineshapemodel.h"
#include "quantum.h"
#include "supergeneric.h"
#include "xml_io.h"
#include "xml_io_types.h"
#include "zeemandata.h"

Go to the source code of this file.

Macros

#define BasicInterfaceCAPI(TYPE)
 
#define GetterSetterCAPI(TYPE, VALUE, BASETYPE)
 
#define EnumGetterSetterCAPI(TYPE, VALUE, ENUM)
 
#define VoidGetterCAPI(TYPE, VALUE)
 
#define VoidStructGetterCAPI(TYPE, VALUE)
 
#define BasicInputOutputCAPI(TYPE)
 
#define VoidArrayCAPI(TYPE)
 
#define VoidArrayElemCAPI(TYPE, ELEM)
 

Functions

 BasicInterfaceCAPI (Index) BasicInputOutputCAPI(Index) Index getIndex(void *data)
 
void setIndex (void *data, Index newval)
 
 VoidArrayCAPI (ArrayOfIndex) BasicInterfaceCAPI(ArrayOfIndex) BasicInputOutputCAPI(ArrayOfIndex) VoidArrayCAPI(ArrayOfArrayOfIndex) BasicInterfaceCAPI(ArrayOfArrayOfIndex) BasicInputOutputCAPI(ArrayOfArrayOfIndex) BasicInterfaceCAPI(Numeric) BasicInputOutputCAPI(Numeric) Numeric getNumeric(void *data)
 
void setNumeric (void *data, Numeric newval)
 
 BasicInterfaceCAPI (ZeemanModel) GetterSetterCAPI(ZeemanModel
 
Numeric GetterSetterCAPI (ZeemanModel, gl, Numeric) BasicInterfaceCAPI(Rational) BasicInputOutputCAPI(Rational) GetterSetterCAPI(Rational
 
Numeric Index GetterSetterCAPI (Rational, Denom, Index) void simplifyRational(void *data)
 
void printLineShapeModelParameters (void *data)
 
Index getLineShapeModelParametersType (char *data)
 
 BasicInterfaceCAPI (LineShapeSingleSpeciesModel) VoidGetterCAPI(LineShapeSingleSpeciesModel
 
G0 VoidGetterCAPI (LineShapeSingleSpeciesModel, D0) VoidGetterCAPI(LineShapeSingleSpeciesModel
 
G0 G2 VoidGetterCAPI (LineShapeSingleSpeciesModel, D2) VoidGetterCAPI(LineShapeSingleSpeciesModel
 
G0 G2 FVC VoidGetterCAPI (LineShapeSingleSpeciesModel, ETA) VoidGetterCAPI(LineShapeSingleSpeciesModel
 
G0 G2 FVC Y VoidGetterCAPI (LineShapeSingleSpeciesModel, G) VoidGetterCAPI(LineShapeSingleSpeciesModel
 
G0 G2 FVC Y DV BasicInterfaceCAPI (LineShapeModel) VoidArrayCAPI(LineShapeModel) BasicInterfaceCAPI(AbsorptionSingleLine) GetterSetterCAPI(AbsorptionSingleLine
 
G0 G2 FVC Y DV Numeric GetterSetterCAPI (AbsorptionSingleLine, I0, Numeric) GetterSetterCAPI(AbsorptionSingleLine
 
G0 G2 FVC Y DV Numeric Numeric GetterSetterCAPI (AbsorptionSingleLine, g_low, Numeric) GetterSetterCAPI(AbsorptionSingleLine
 
G0 G2 FVC Y DV Numeric Numeric Numeric GetterSetterCAPI (AbsorptionSingleLine, A, Numeric) VoidGetterCAPI(AbsorptionSingleLine
 
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman VoidGetterCAPI (AbsorptionSingleLine, LineShape) VoidArrayElemCAPI(AbsorptionSingleLine
 
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers VoidArrayElemCAPI (AbsorptionSingleLine, UpperQuantumNumbers) BasicInterfaceCAPI(QuantumNumbers) void *getelemQuantumNumbers(Index i
 
Index sizeQuantumNumbers ()
 
Index string2quantumnumbersindex (char *str)
 
 BasicInterfaceCAPI (QuantumIdentifier) BasicInputOutputCAPI(QuantumIdentifier) EnumGetterSetterCAPI(QuantumIdentifier
 
QuantumIdentifier::QType GetterSetterCAPI (QuantumIdentifier, Species, Index) GetterSetterCAPI(QuantumIdentifier
 
QuantumIdentifier::QType Index VoidGetterCAPI (QuantumIdentifier, EnergyLevelQuantumNumbers) VoidGetterCAPI(QuantumIdentifier
 
QuantumIdentifier::QType Index LowerQuantumNumbers VoidGetterCAPI (QuantumIdentifier, UpperQuantumNumbers) BasicInterfaceCAPI(ArrayOfQuantumIdentifier) BasicInputOutputCAPI(ArrayOfQuantumIdentifier) VoidArrayCAPI(ArrayOfQuantumIdentifier) BasicInterfaceCAPI(SpeciesTag) BasicInputOutputCAPI(SpeciesTag) GetterSetterCAPI(SpeciesTag
 
QuantumIdentifier::QType Index LowerQuantumNumbers Index GetterSetterCAPI (SpeciesTag, Isotopologue, Index) GetterSetterCAPI(SpeciesTag
 
QuantumIdentifier::QType Index LowerQuantumNumbers Index Numeric GetterSetterCAPI (SpeciesTag, Lf, Numeric) GetterSetterCAPI(SpeciesTag
 
QuantumIdentifier::QType Index LowerQuantumNumbers Index Numeric Index GetterSetterCAPI (SpeciesTag, CIADataset, Index) EnumGetterSetterCAPI(SpeciesTag
 
QuantumIdentifier::QType Index LowerQuantumNumbers Index Numeric Index Index VoidArrayCAPI (ArrayOfSpeciesTag) BasicInterfaceCAPI(ArrayOfSpeciesTag) BasicInputOutputCAPI(ArrayOfSpeciesTag) VoidArrayCAPI(ArrayOfArrayOfSpeciesTag) BasicInterfaceCAPI(ArrayOfArrayOfSpeciesTag) BasicInputOutputCAPI(ArrayOfArrayOfSpeciesTag) Index setSpeciesTag(void *data
 

Variables

 gu
 
Numeric Nom
 
G0 G2 FVC Y DV F0
 
G0 G2 FVC Y DV Numeric E0
 
G0 G2 FVC Y DV Numeric Numeric g_upp
 
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data { return &static_cast<QuantumNumbers *>(data)->operator[](i)
 
 Type
 
QuantumIdentifier::QType Isotopologue
 
QuantumIdentifier::QType Index LowerQuantumNumbers Species
 
QuantumIdentifier::QType Index LowerQuantumNumbers Index Uf
 
QuantumIdentifier::QType Index LowerQuantumNumbers Index Numeric CIASecond
 

Detailed Description

This file contains all declarations of the ARTS C API class interface.

Author
Richard Larsson larss.nosp@m.on@m.nosp@m.ps.mp.nosp@m.g.de
Date
2020-03-12

Definition in file arts_api_classes.cc.

Macro Definition Documentation

◆ BasicInputOutputCAPI

#define BasicInputOutputCAPI (   TYPE)
Value:
Index xmlread##TYPE(void * data, char * filepath) \
{ \
try { \
xml_read_from_file(filepath, *static_cast<TYPE *>(data), Verbosity()); \
return EXIT_SUCCESS; \
} catch (std::runtime_error& e) { \
return EXIT_FAILURE; \
} \
} \
\
Index xmlsave##TYPE(void * data, char * filepath, Index filetype, Index clobber) \
{ \
try { \
xml_write_to_file(filepath, *static_cast<const TYPE *>(data), FileType(filetype), not clobber, Verbosity()); \
return EXIT_SUCCESS; \
} catch (std::runtime_error& e) { \
return EXIT_FAILURE; \
} \
}

Definition at line 107 of file arts_api_classes.cc.

◆ BasicInterfaceCAPI

#define BasicInterfaceCAPI (   TYPE)
Value:
void * create##TYPE() \
{ \
return new TYPE; \
} \
\
void delete##TYPE(void * data) \
{ \
delete static_cast<TYPE *>(data); \
} \
\
void print##TYPE(void * data) \
{ \
std::cout << (*static_cast<TYPE *>(data)) << std::endl; \
}

Definition at line 47 of file arts_api_classes.cc.

◆ EnumGetterSetterCAPI

#define EnumGetterSetterCAPI (   TYPE,
  VALUE,
  ENUM 
)
Value:
Index get##VALUE##TYPE(void * data) \
{ \
return Index(static_cast<TYPE *>(data) -> VALUE ()); \
} \
Index set##VALUE##TYPE(void * data, Index newval) \
{ \
if (static_cast<TYPE *>(data) -> validIndexFor##VALUE (newval)) { \
static_cast<TYPE *>(data) -> VALUE (ENUM(newval)); \
return EXIT_SUCCESS; \
} else { \
return EXIT_FAILURE; \
} \
} \
Index string2index##VALUE##TYPE(void * data, char * newval) \
{ \
return Index(static_cast<TYPE *>(data) -> string2##VALUE(newval)); \
}

Definition at line 75 of file arts_api_classes.cc.

◆ GetterSetterCAPI

#define GetterSetterCAPI (   TYPE,
  VALUE,
  BASETYPE 
)
Value:
BASETYPE get##VALUE##TYPE(void * data) \
{ \
return static_cast<TYPE *>(data) -> VALUE (); \
} \
void set##VALUE##TYPE(void * data, BASETYPE newval) \
{ \
static_cast<TYPE *>(data) -> VALUE (newval); \
}

Definition at line 64 of file arts_api_classes.cc.

◆ VoidArrayCAPI

#define VoidArrayCAPI (   TYPE)
Value:
Index size##TYPE(void * data) \
{ \
return static_cast<TYPE *>(data) -> size(); \
} \
void resize##TYPE(Index n, void * data) \
{ \
static_cast<TYPE *>(data) -> resize(n); \
} \
void * getelem##TYPE(Index i, void * data) \
{ \
return &static_cast<TYPE *>(data) -> operator[](i); \
}

Definition at line 129 of file arts_api_classes.cc.

◆ VoidArrayElemCAPI

#define VoidArrayElemCAPI (   TYPE,
  ELEM 
)
Value:
Index size##ELEM##TYPE(void * data) \
{ \
return static_cast<TYPE *>(data) -> ELEM().size(); \
} \
void resize##ELEM##TYPE(Index n, void * data) \
{ \
static_cast<TYPE *>(data) -> ELEM().resize(n); \
} \
void * getelem##ELEM##TYPE(Index i, void * data) \
{ \
return &static_cast<TYPE *>(data) -> ELEM()[i]; \
}

Definition at line 144 of file arts_api_classes.cc.

◆ VoidGetterCAPI

#define VoidGetterCAPI (   TYPE,
  VALUE 
)
Value:
void * get##VALUE##TYPE(void * data) \
{ \
return &static_cast<TYPE *>(data) -> VALUE(); \
}

Definition at line 94 of file arts_api_classes.cc.

◆ VoidStructGetterCAPI

#define VoidStructGetterCAPI (   TYPE,
  VALUE 
)
Value:
void * get##VALUE##TYPE(void * data) \
{ \
return &static_cast<TYPE *>(data) -> VALUE; \
}

Definition at line 100 of file arts_api_classes.cc.

Function Documentation

◆ BasicInterfaceCAPI() [1/5]

BasicInterfaceCAPI ( Index  )

Definition at line 160 of file arts_api_classes.cc.

References data.

◆ BasicInterfaceCAPI() [2/5]

G0 G2 FVC Y DV BasicInterfaceCAPI ( LineShapeModel  )

◆ BasicInterfaceCAPI() [3/5]

BasicInterfaceCAPI ( LineShapeSingleSpeciesModel  )

◆ BasicInterfaceCAPI() [4/5]

BasicInterfaceCAPI ( QuantumIdentifier  )

◆ BasicInterfaceCAPI() [5/5]

BasicInterfaceCAPI ( ZeemanModel  )

◆ getLineShapeModelParametersType()

Index getLineShapeModelParametersType ( char *  data)

Definition at line 195 of file arts_api_classes.cc.

References data, and LineShape::string2temperaturemodel().

◆ GetterSetterCAPI() [1/9]

G0 G2 FVC Y DV Numeric Numeric Numeric GetterSetterCAPI ( AbsorptionSingleLine  ,
,
Numeric   
)

◆ GetterSetterCAPI() [2/9]

G0 G2 FVC Y DV Numeric Numeric GetterSetterCAPI ( AbsorptionSingleLine  ,
g_low  ,
Numeric   
)

◆ GetterSetterCAPI() [3/9]

G0 G2 FVC Y DV Numeric GetterSetterCAPI ( AbsorptionSingleLine  ,
I0  ,
Numeric   
)

◆ GetterSetterCAPI() [4/9]

QuantumIdentifier::QType GetterSetterCAPI ( QuantumIdentifier  ,
Species  ,
Index   
)

◆ GetterSetterCAPI() [5/9]

Numeric Index GetterSetterCAPI ( Rational  ,
Denom  ,
Index   
)

Definition at line 189 of file arts_api_classes.cc.

References data.

◆ GetterSetterCAPI() [6/9]

QuantumIdentifier::QType Index LowerQuantumNumbers Index Numeric Index GetterSetterCAPI ( SpeciesTag  ,
CIADataset  ,
Index   
)

◆ GetterSetterCAPI() [7/9]

QuantumIdentifier::QType Index LowerQuantumNumbers Index GetterSetterCAPI ( SpeciesTag  ,
Isotopologue  ,
Index   
)

◆ GetterSetterCAPI() [8/9]

QuantumIdentifier::QType Index LowerQuantumNumbers Index Numeric GetterSetterCAPI ( SpeciesTag  ,
Lf  ,
Numeric   
)

◆ GetterSetterCAPI() [9/9]

Numeric GetterSetterCAPI ( ZeemanModel  ,
gl  ,
Numeric   
)

◆ printLineShapeModelParameters()

void printLineShapeModelParameters ( void *  data)

Definition at line 194 of file arts_api_classes.cc.

References data.

◆ setIndex()

void setIndex ( void *  data,
Index  newval 
)

Definition at line 163 of file arts_api_classes.cc.

References data.

◆ setNumeric()

void setNumeric ( void *  data,
Numeric  newval 
)

Definition at line 176 of file arts_api_classes.cc.

References data.

◆ sizeQuantumNumbers()

Index sizeQuantumNumbers ( )

Definition at line 233 of file arts_api_classes.cc.

References J.

◆ string2quantumnumbersindex()

Index string2quantumnumbersindex ( char *  str)

Definition at line 234 of file arts_api_classes.cc.

References string2quantumnumbertype().

◆ VoidArrayCAPI() [1/2]

VoidArrayCAPI ( ArrayOfIndex  )

Definition at line 164 of file arts_api_classes.cc.

References data.

◆ VoidArrayCAPI() [2/2]

QuantumIdentifier::QType Index LowerQuantumNumbers Index Numeric Index Index VoidArrayCAPI ( ArrayOfSpeciesTag  )

References data, and newdata.

◆ VoidArrayElemCAPI()

G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers VoidArrayElemCAPI ( AbsorptionSingleLine  ,
UpperQuantumNumbers   
)

◆ VoidGetterCAPI() [1/7]

G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman VoidGetterCAPI ( AbsorptionSingleLine  ,
LineShape   
)

◆ VoidGetterCAPI() [2/7]

G0 VoidGetterCAPI ( LineShapeSingleSpeciesModel  ,
D0   
)

◆ VoidGetterCAPI() [3/7]

G0 G2 VoidGetterCAPI ( LineShapeSingleSpeciesModel  ,
D2   
)

◆ VoidGetterCAPI() [4/7]

G0 G2 FVC VoidGetterCAPI ( LineShapeSingleSpeciesModel  ,
ETA   
)

◆ VoidGetterCAPI() [5/7]

G0 G2 FVC Y VoidGetterCAPI ( LineShapeSingleSpeciesModel  ,
 
)

◆ VoidGetterCAPI() [6/7]

QuantumIdentifier::QType Index VoidGetterCAPI ( QuantumIdentifier  ,
EnergyLevelQuantumNumbers   
)

◆ VoidGetterCAPI() [7/7]

QuantumIdentifier::QType Index LowerQuantumNumbers VoidGetterCAPI ( QuantumIdentifier  ,
UpperQuantumNumbers   
)

Variable Documentation

◆ CIASecond

QuantumIdentifier::QType Index LowerQuantumNumbers Index Numeric CIASecond

Definition at line 259 of file arts_api_classes.cc.

Referenced by abs_cia_dataReadFromCIA(), and abs_cia_dataReadFromXML().

◆ data

G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void* data { return &static_cast<QuantumNumbers *>(data)->operator[](i)

Definition at line 232 of file arts_api_classes.cc.

Referenced by ARTS::AgendaMethod::abs_nlteFromRaw(), abs_nlteFromRaw(), ARTS::Method::abs_nlteFromRaw(), Linefunctions::apply_VVH_scaling(), atmfields_checkedCalc(), backend_channel_responseGaussian(), BasicInterfaceCAPI(), chk_interpolation_grids_loose(), chk_interpolation_grids_loose_check_data(), dsingle_partition_function_dT(), EnergyLevelMap::EnergyLevelMap(), f_gridFromSensorAMSUgeneric(), LineShape::from_linefunctiondata(), LineShape::from_linemixingdata(), LineShape::from_pressurebroadeningdata(), get_sorted_indexes(), getLineShapeModelParametersType(), GetterSetterCAPI(), binistream::ieee_double2float(), binistream::ieee_single2float(), Sparse::insert_elements(), mult(), StokesVector::MultiplyAndAdd(), nca_get_data_double(), nca_get_data_int(), nca_get_data_long(), nca_get_data_text(), nca_get_dataa_double(), ARTS::AgendaMethod::nlte_fieldFromRaw(), nlte_fieldFromRaw(), ARTS::Method::nlte_fieldFromRaw(), LineShape::operator<<(), LineShape::operator>>(), pnd_fieldCalcFrompnd_field_raw(), printLineShapeModelParameters(), LineShape::SingleSpeciesModel::read(), LineShape::Model::read(), Absorption::ReadFromArtscat3Stream(), Absorption::ReadFromArtscat4Stream(), Absorption::ReadFromArtscat5Stream(), Absorption::ReadFromHitran2001Stream(), Absorption::ReadFromHitran2004Stream(), Absorption::ReadFromHitranOnlineStream(), Absorption::ReadFromJplStream(), Absorption::ReadFromLBLRTMStream(), Absorption::ReadFromMytran2Stream(), ARTS::AgendaMethod::rtp_nlteFromRaw(), rtp_nlteFromRaw(), ARTS::Method::rtp_nlteFromRaw(), Zeeman::SelectPolarization(), Linefunctions::set_cross_section_of_band(), Linefunctions::set_doppler(), Linefunctions::set_lineshape(), Linefunctions::set_lorentz(), Linefunctions::set_voigt(), setIndex(), setNumeric(), single_partition_function(), sorted_index_of_ppath_field(), spectrometer_matrix(), transpose_mult(), VoidArrayCAPI(), LineShape::SingleSpeciesModel::write(), LineShape::Model::write(), xml_read_from_stream(), xml_write_to_stream(), and ybatchMetProfiles().

◆ E0

◆ F0

◆ g_upp

G0 G2 FVC Y DV Numeric Numeric g_upp

Definition at line 222 of file arts_api_classes.cc.

◆ gu

gu

Definition at line 181 of file arts_api_classes.cc.

Referenced by Zeeman::GetSimpleModel().

◆ Isotopologue

◆ Nom

Numeric Nom

Definition at line 188 of file arts_api_classes.cc.

◆ Species

◆ Type

QuantumIdentifier::QType Index LowerQuantumNumbers Index Numeric Index Type

Definition at line 240 of file arts_api_classes.cc.

◆ Uf

QuantumIdentifier::QType Index LowerQuantumNumbers Index Uf

Definition at line 257 of file arts_api_classes.cc.

data
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
Definition: arts_api_classes.cc:232
FileType
FileType
Definition: xml_io.h:37
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
ARTS::Group::Verbosity
Verbosity Verbosity
Definition: autoarts.h:114