10#ifndef M_BASIC_TYPES_H
11#define M_BASIC_TYPES_H
20#include "matpack_data.h"
21#include "matpack_concepts.h"
37#define TMPL_NGET_GENERIC(what) \
38 template <typename T> \
39 void what##Get(Index& n, const T& x, const Verbosity&) { \
40 if constexpr (matpack::has_##what<T>) \
43 ARTS_USER_ERROR("The variable has no " #what " attribute.\n") \
56#undef TMPL_NGET_GENERIC
58#define TMPL_NGET_AGENDA(what) \
59inline void what##Get(Workspace& ws _U_, Index&, const Agenda&, const Verbosity&) { \
61 os << "The variable has no such attribute.\n"; \
62 throw runtime_error(os.str()); \
75#undef TMPL_NGET_AGENDA
79 if constexpr (matpack::has_nelem<T>)
90#define NGET_GENERIC(what, type) \
91inline void what##Get(Index& what, const type& x, const Verbosity&) { \
95#define SET_TO_LAST_GENERIC(type) \
96inline void IndexSetToLast(Index& i, const type& x, const Verbosity&) { \
211#undef SET_TO_LAST_GENERIC
224 nelem = x.
nelem() - 1;
Declarations for agendas.
This file contains the definition of Array.
The global header file for ARTS.
Index nelem() const ARTS_NOEXCEPT
#define ARTS_USER_ERROR(...)
The declarations of all the exception classes.
Implementation of gridded fields.
void IndexSetToLast(Index &n, const T &x, const Verbosity &)
WORKSPACE METHOD: IndexSetToLast.
#define NGET_GENERIC(what, type)
#define TMPL_NGET_GENERIC(what)
#define TMPL_NGET_AGENDA(what)
void nelemGet(Workspace &, Index &nelem, const ArrayOfAgenda &x, const Verbosity &)
#define SET_TO_LAST_GENERIC(type)
Declarations having to do with the four output streams.
This file contains the definition of String, the ARTS string class.
This file contains the Workspace class.