ARTS 2.5.11 (git: 6827797f)
WsvRecord Class Reference

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

#include <wsv_aux.h>

Public Member Functions

 WsvRecord ()
 Default constructor.
 
 WsvRecord (const char *name, const char *description, const String &group, const TokVal &val)
 Initializing constructor.
 
 WsvRecord (const char *name, const char *description, const Index group, const TokVal &val)
 Initializing constructor.
 
 WsvRecord (const char *name, const char *description, const String &group)
 Initializing constructor.
 
 WsvRecord (const char *name, const char *description, const Index group)
 Initializing constructor.
 
const StringName () const
 Name of this workspace variable.
 
const StringDescription () const
 A text describing this workspace variable.
 
Index Group () const
 The wsv group to which this variable belongs.
 
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 41 of file wsv_aux.h.

Constructor & Destructor Documentation

◆ WsvRecord() [1/5]

WsvRecord::WsvRecord ( )

Default constructor.

Definition at line 12 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 19 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 37 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 49 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 64 of file wsv_aux.cc.

Member Function Documentation

◆ default_value()

const TokVal & WsvRecord::default_value ( ) const
inline

Definition at line 87 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 78 of file wsv_aux.h.

References mdescription.

Referenced by operator<<().

◆ get_copy()

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

Definition at line 73 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 81 of file wsv_aux.h.

References mgroup.

Referenced by operator<<().

◆ has_defaults()

bool WsvRecord::has_defaults ( ) const

Definition at line 69 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 75 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 88 of file wsv_aux.h.

References defval, and v.

Member Data Documentation

◆ defval

TokVal WsvRecord::defval
private

Definition at line 97 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 93 of file wsv_aux.h.

Referenced by Description().

◆ mgroup

Index WsvRecord::mgroup {-1}
private

Definition at line 95 of file wsv_aux.h.

Referenced by Group(), and WsvRecord().

◆ mname

String WsvRecord::mname
private

Definition at line 91 of file wsv_aux.h.

Referenced by Name(), and WsvRecord().


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