ARTS 2.5.9 (git: 825fa5f2)
WsvRecord Class Reference

This class contains all static information for one workspace variable. More...

#include <wsv_aux.h>

Public Member Functions

 WsvRecord ()
 Default constructor. More...
 
 WsvRecord (const char *name, const char *description, const String &group, const TokVal &val)
 Initializing constructor. More...
 
 WsvRecord (const char *name, const char *description, const Index group, const TokVal &val)
 Initializing constructor. More...
 
 WsvRecord (const char *name, const char *description, const String &group)
 Initializing constructor. More...
 
 WsvRecord (const char *name, const char *description, const Index group)
 Initializing constructor. More...
 
const StringName () const
 Name of this workspace variable. More...
 
const StringDescription () const
 A text describing this workspace variable. More...
 
Index Group () const
 The wsv group to which this variable belongs. More...
 
bool has_defaults () const
 
std::shared_ptr< void > get_copy () const
 
const TokValdefault_value () const
 
void update_default_value (ArtsType auto &&v)
 

Private Attributes

String mname
 
String mdescription
 
Index mgroup {-1}
 
TokVal defval
 

Detailed Description

This class contains all static information for one workspace variable.

The program make_wsv_h.cc uses these records to generate the file wsv.h, which contains both the declaration of the wsv handles and the declaration of the workspace itself.

Author
Stefan Buehler

Definition at line 58 of file wsv_aux.h.

Constructor & Destructor Documentation

◆ WsvRecord() [1/5]

WsvRecord::WsvRecord ( )

Default constructor.

Definition at line 29 of file wsv_aux.cc.

◆ WsvRecord() [2/5]

WsvRecord::WsvRecord ( const char *  name,
const char *  description,
const String group,
const TokVal val 
)

Initializing constructor.

This is used by Workspace::define_wsv_data() to set the information for each workspace variable.

Definition at line 36 of file wsv_aux.cc.

References get_wsv_group_id(), mgroup, and mname.

◆ WsvRecord() [3/5]

WsvRecord::WsvRecord ( const char *  name,
const char *  description,
const Index  group,
const TokVal val 
)

Initializing constructor.

This is used by the parser to create automatically allocated variables

Definition at line 54 of file wsv_aux.cc.

◆ WsvRecord() [4/5]

WsvRecord::WsvRecord ( const char *  name,
const char *  description,
const String group 
)

Initializing constructor.

This is used by Workspace::define_wsv_data() to set the information for each workspace variable.

Definition at line 66 of file wsv_aux.cc.

References get_wsv_group_id(), mgroup, and mname.

◆ WsvRecord() [5/5]

WsvRecord::WsvRecord ( const char *  name,
const char *  description,
const Index  group 
)

Initializing constructor.

This is used by the parser to create automatically allocated variables

Definition at line 81 of file wsv_aux.cc.

Member Function Documentation

◆ default_value()

const TokVal & WsvRecord::default_value ( ) const
inline

Definition at line 104 of file wsv_aux.h.

References defval.

Referenced by operator<<().

◆ Description()

const String & WsvRecord::Description ( ) const
inline

A text describing this workspace variable.

Definition at line 95 of file wsv_aux.h.

References mdescription.

Referenced by operator<<().

◆ get_copy()

std::shared_ptr< void > WsvRecord::get_copy ( ) const

Definition at line 90 of file wsv_aux.cc.

References TokVal::copy_value(), defval, and has_defaults().

◆ Group()

Index WsvRecord::Group ( ) const
inline

The wsv group to which this variable belongs.

Definition at line 98 of file wsv_aux.h.

References mgroup.

Referenced by operator<<().

◆ has_defaults()

bool WsvRecord::has_defaults ( ) const

Definition at line 86 of file wsv_aux.cc.

References defval, and TokVal::holdsAny().

Referenced by get_copy(), and operator<<().

◆ Name()

const String & WsvRecord::Name ( ) const
inline

Name of this workspace variable.

Definition at line 92 of file wsv_aux.h.

References mname.

Referenced by Workspace::add_wsv(), and operator<<().

◆ update_default_value()

void WsvRecord::update_default_value ( ArtsType auto &&  v)
inline

Definition at line 105 of file wsv_aux.h.

References defval, and v.

Member Data Documentation

◆ defval

TokVal WsvRecord::defval
private

Definition at line 114 of file wsv_aux.h.

Referenced by default_value(), get_copy(), has_defaults(), and update_default_value().

◆ mdescription

String WsvRecord::mdescription
private

Definition at line 110 of file wsv_aux.h.

Referenced by Description().

◆ mgroup

Index WsvRecord::mgroup {-1}
private

Definition at line 112 of file wsv_aux.h.

Referenced by Group(), and WsvRecord().

◆ mname

String WsvRecord::mname
private

Definition at line 108 of file wsv_aux.h.

Referenced by Name(), and WsvRecord().


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