ARTS  2.4.0(git:4fb77825)
m_basic_types.h File Reference

Functions for straightforward operations on variables of basic types. More...

#include <sstream>
#include "agenda_class.h"
#include "array.h"
#include "arts.h"
#include "exceptions.h"
#include "gridded_fields.h"
#include "matpackII.h"
#include "matpackVII.h"
#include "messages.h"
#include "mystring.h"
#include "workspace_ng.h"

Go to the source code of this file.

Macros

#define TMPL_NGET_GENERIC(what)
 
#define TMPL_NGET_AGENDA(what)
 
#define NGET_GENERIC(what, type)
 
#define SET_TO_LAST_GENERIC(type)
 

Functions

template<typename T >
void IndexSetToLast (Index &, const T &, const Verbosity &)
 WORKSPACE METHOD: IndexSetToLast. More...
 
void nelemGet (Workspace &, Index &nelem, const ArrayOfAgenda &x, const Verbosity &)
 
void IndexSetToLast (Workspace &, Index &nelem, const ArrayOfAgenda &x, const Verbosity &)
 

Detailed Description

Functions for straightforward operations on variables of basic types.

Author
Oliver Lemke olemk.nosp@m.e@co.nosp@m.re-du.nosp@m.mp.i.nosp@m.nfo
Date
2004-09-20

Definition in file m_basic_types.h.

Macro Definition Documentation

◆ NGET_GENERIC

#define NGET_GENERIC (   what,
  type 
)
Value:
inline void what##Get(Index& what, const type& x, const Verbosity&) { \
what = x.what(); \
}

Definition at line 105 of file m_basic_types.h.

◆ SET_TO_LAST_GENERIC

#define SET_TO_LAST_GENERIC (   type)
Value:
inline void IndexSetToLast(Index& i, const type& x, const Verbosity&) { \
i = x.nelem() - 1; \
}

Definition at line 110 of file m_basic_types.h.

◆ TMPL_NGET_AGENDA

#define TMPL_NGET_AGENDA (   what)
Value:
inline void what##Get(Workspace& ws _U_, Index&, const Agenda&, const Verbosity&) { \
ostringstream os; \
os << "The variable has no such attribute.\n"; \
throw runtime_error(os.str()); \
}

Definition at line 74 of file m_basic_types.h.

◆ TMPL_NGET_GENERIC

#define TMPL_NGET_GENERIC (   what)
Value:
template <typename T> \
void what##Get(Index&, const T&, const Verbosity&) { \
ostringstream os; \
os << "The variable has no such attribute.\n"; \
throw runtime_error(os.str()); \
}

Definition at line 54 of file m_basic_types.h.

Function Documentation

◆ IndexSetToLast() [1/2]

template<typename T >
void IndexSetToLast ( Index nelem,
const T &  v,
const Verbosity verbosity 
)

WORKSPACE METHOD: IndexSetToLast.

Set an Index to point towards last position of array-type variables.

This method works as nelemGet, but gives the index number of the last element (which equals nelem-1).

Author
Patrick Eriksson
Oliver Lemke
Parameters
[out]nelemWS Output
[in]vGeneric Input

Definition at line 94 of file m_basic_types.h.

Referenced by IndexSetToLast_sg_ArrayOfAbsorptionLines_g(), IndexSetToLast_sg_ArrayOfAgenda_g(), IndexSetToLast_sg_ArrayOfArrayOfAbsorptionLines_g(), IndexSetToLast_sg_ArrayOfArrayOfGriddedField1_g(), IndexSetToLast_sg_ArrayOfArrayOfGriddedField2_g(), IndexSetToLast_sg_ArrayOfArrayOfGriddedField3_g(), IndexSetToLast_sg_ArrayOfArrayOfIndex_g(), IndexSetToLast_sg_ArrayOfArrayOfMatrix_g(), IndexSetToLast_sg_ArrayOfArrayOfPropagationMatrix_g(), IndexSetToLast_sg_ArrayOfArrayOfRadiationVector_g(), IndexSetToLast_sg_ArrayOfArrayOfScatteringMetaData_g(), IndexSetToLast_sg_ArrayOfArrayOfSingleScatteringData_g(), IndexSetToLast_sg_ArrayOfArrayOfSpeciesTag_g(), IndexSetToLast_sg_ArrayOfArrayOfStokesVector_g(), IndexSetToLast_sg_ArrayOfArrayOfString_g(), IndexSetToLast_sg_ArrayOfArrayOfTensor3_g(), IndexSetToLast_sg_ArrayOfArrayOfTensor6_g(), IndexSetToLast_sg_ArrayOfArrayOfTime_g(), IndexSetToLast_sg_ArrayOfArrayOfTransmissionMatrix_g(), IndexSetToLast_sg_ArrayOfArrayOfVector_g(), IndexSetToLast_sg_ArrayOfCIARecord_g(), IndexSetToLast_sg_ArrayOfGriddedField1_g(), IndexSetToLast_sg_ArrayOfGriddedField2_g(), IndexSetToLast_sg_ArrayOfGriddedField3_g(), IndexSetToLast_sg_ArrayOfGriddedField4_g(), IndexSetToLast_sg_ArrayOfIndex_g(), IndexSetToLast_sg_ArrayOfMatrix_g(), IndexSetToLast_sg_ArrayOfPpath_g(), IndexSetToLast_sg_ArrayOfPropagationMatrix_g(), IndexSetToLast_sg_ArrayOfQuantumIdentifier_g(), IndexSetToLast_sg_ArrayOfRadiationVector_g(), IndexSetToLast_sg_ArrayOfRetrievalQuantity_g(), IndexSetToLast_sg_ArrayOfScatteringMetaData_g(), IndexSetToLast_sg_ArrayOfSingleScatteringData_g(), IndexSetToLast_sg_ArrayOfSparse_g(), IndexSetToLast_sg_ArrayOfStokesVector_g(), IndexSetToLast_sg_ArrayOfString_g(), IndexSetToLast_sg_ArrayOfTelsemAtlas_g(), IndexSetToLast_sg_ArrayOfTensor3_g(), IndexSetToLast_sg_ArrayOfTensor4_g(), IndexSetToLast_sg_ArrayOfTensor5_g(), IndexSetToLast_sg_ArrayOfTensor6_g(), IndexSetToLast_sg_ArrayOfTensor7_g(), IndexSetToLast_sg_ArrayOfTime_g(), IndexSetToLast_sg_ArrayOfTransmissionMatrix_g(), IndexSetToLast_sg_ArrayOfVector_g(), IndexSetToLast_sg_ArrayOfXsecRecord_g(), and IndexSetToLast_sg_Vector_g().

◆ IndexSetToLast() [2/2]

void IndexSetToLast ( Workspace ,
Index nelem,
const ArrayOfAgenda x,
const Verbosity  
)
inline

Definition at line 235 of file m_basic_types.h.

References Absorption::nelem(), and ARTS::Var::x().

◆ nelemGet()

void nelemGet ( Workspace ,
Index nelem,
const ArrayOfAgenda x,
const Verbosity  
)
inline

Definition at line 228 of file m_basic_types.h.

References Absorption::nelem(), and ARTS::Var::x().

Referenced by nelemGet_sg_ArrayOfAbsorptionLines_g(), nelemGet_sg_ArrayOfAgenda_g(), nelemGet_sg_ArrayOfArrayOfAbsorptionLines_g(), nelemGet_sg_ArrayOfArrayOfGriddedField1_g(), nelemGet_sg_ArrayOfArrayOfGriddedField2_g(), nelemGet_sg_ArrayOfArrayOfGriddedField3_g(), nelemGet_sg_ArrayOfArrayOfIndex_g(), nelemGet_sg_ArrayOfArrayOfMatrix_g(), nelemGet_sg_ArrayOfArrayOfPropagationMatrix_g(), nelemGet_sg_ArrayOfArrayOfRadiationVector_g(), nelemGet_sg_ArrayOfArrayOfScatteringMetaData_g(), nelemGet_sg_ArrayOfArrayOfSingleScatteringData_g(), nelemGet_sg_ArrayOfArrayOfSpeciesTag_g(), nelemGet_sg_ArrayOfArrayOfStokesVector_g(), nelemGet_sg_ArrayOfArrayOfString_g(), nelemGet_sg_ArrayOfArrayOfTensor3_g(), nelemGet_sg_ArrayOfArrayOfTensor6_g(), nelemGet_sg_ArrayOfArrayOfTime_g(), nelemGet_sg_ArrayOfArrayOfTransmissionMatrix_g(), nelemGet_sg_ArrayOfArrayOfVector_g(), nelemGet_sg_ArrayOfCIARecord_g(), nelemGet_sg_ArrayOfGriddedField1_g(), nelemGet_sg_ArrayOfGriddedField2_g(), nelemGet_sg_ArrayOfGriddedField3_g(), nelemGet_sg_ArrayOfGriddedField4_g(), nelemGet_sg_ArrayOfIndex_g(), nelemGet_sg_ArrayOfMatrix_g(), nelemGet_sg_ArrayOfPpath_g(), nelemGet_sg_ArrayOfPropagationMatrix_g(), nelemGet_sg_ArrayOfQuantumIdentifier_g(), nelemGet_sg_ArrayOfRadiationVector_g(), nelemGet_sg_ArrayOfRetrievalQuantity_g(), nelemGet_sg_ArrayOfScatteringMetaData_g(), nelemGet_sg_ArrayOfSingleScatteringData_g(), nelemGet_sg_ArrayOfSparse_g(), nelemGet_sg_ArrayOfStokesVector_g(), nelemGet_sg_ArrayOfString_g(), nelemGet_sg_ArrayOfTelsemAtlas_g(), nelemGet_sg_ArrayOfTensor3_g(), nelemGet_sg_ArrayOfTensor4_g(), nelemGet_sg_ArrayOfTensor5_g(), nelemGet_sg_ArrayOfTensor6_g(), nelemGet_sg_ArrayOfTensor7_g(), nelemGet_sg_ArrayOfTime_g(), nelemGet_sg_ArrayOfTransmissionMatrix_g(), nelemGet_sg_ArrayOfVector_g(), nelemGet_sg_ArrayOfXsecRecord_g(), and nelemGet_sg_Vector_g().

IndexSetToLast
void IndexSetToLast(Index &, const T &, const Verbosity &)
WORKSPACE METHOD: IndexSetToLast.
Definition: m_basic_types.h:94
Agenda
The Agenda class.
Definition: agenda_class.h:44
_U_
#define _U_
Definition: config.h:183
Verbosity
Definition: messages.h:49
Workspace
Workspace class.
Definition: workspace_ng.h:40
ARTS::Var::x
Vector x(Workspace &ws) noexcept
Definition: autoarts.h:7346
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39