ARTS
2.0.49
|
#include <workspace_ng.h>
Classes | |
struct | WsvStruct |
Public Member Functions | |
Workspace () | |
Construct a new workspace. More... | |
Workspace (const Workspace &workspace) | |
Workspace copy constructor. More... | |
virtual | ~Workspace () |
Destruct the workspace. More... | |
void | del (Index i) |
Delete WSV. More... | |
void | duplicate (Index i) |
Duplicate WSV. More... | |
void | initialize () |
bool | is_initialized (Index i) |
Checks existence of the given WSV. More... | |
void * | pop (Index i) |
Pop the topmost wsv from its stack. More... | |
void | pop_free (Index i) |
Pop the topmost wsv from its stack and free its memory. More... | |
void | push (Index i, void *wsv) |
Push a new wsv onto its stack. More... | |
void | push_uninitialized (Index i, void *wsv) |
Push a new wsv onto its stack but mark it as uninitialized. More... | |
Index | nelem () |
void * | operator[] (Index i) |
Retrieve pointer to the given WSV. More... | |
Static Public Member Functions | |
static void | define_wsv_data () |
static void | define_wsv_map () |
static Index | add_wsv (const WsvRecord &wsv) |
Static Public Attributes | |
static Array< WsvRecord > | wsv_data |
static map< String, Index > | WsvMap |
Private Attributes | |
Array< stack< WsvStruct * > > | ws |
Workspace variable container. More... | |
Workspace::Workspace | ( | ) |
Construct a new workspace.
Create the stacks for the WSVs.
Definition at line 45 of file workspace_ng.cc.
Workspace::Workspace | ( | const Workspace & | workspace | ) |
Workspace copy constructor.
Make a copy of a workspace. The copy constructor will only copy the topmost layer of the workspace variable stacks.
[in] | workspace | The workspace to be copied |
Definition at line 128 of file workspace_ng.cc.
References Workspace::WsvStruct::auto_allocated, Workspace::WsvStruct::initialized, ws, and Workspace::WsvStruct::wsv.
|
virtual |
Destruct the workspace.
Frees all WSVs.
Definition at line 153 of file workspace_ng.cc.
References Workspace::WsvStruct::auto_allocated, WorkspaceMemoryHandler::deallocate(), ws, wsmh, Workspace::WsvStruct::wsv, and wsv_data.
Definition at line 59 of file workspace_ng.cc.
References define_wsv_map(), Array< base >::nelem(), and wsv_data.
Referenced by ArtsParser::parse_generic_output(), ArtsParser::parse_specific_output(), ArtsParser::read_name_or_value(), and ArtsParser::set_gin_to_default().
|
static |
Definition at line 50 of file workspace.cc.
References DESCRIPTION, GROUP, NAME, and wsv_data.
Referenced by main().
|
static |
Definition at line 50 of file workspace_ng.cc.
References Array< base >::nelem(), wsv_data, and WsvMap.
void Workspace::del | ( | Index | i | ) |
Delete WSV.
Frees the memory of the topmost WSV on the stack.
i | WSV index. |
Definition at line 73 of file workspace_ng.cc.
References Workspace::WsvStruct::auto_allocated, WorkspaceMemoryHandler::deallocate(), Workspace::WsvStruct::initialized, ws, wsmh, Workspace::WsvStruct::wsv, and wsv_data.
Referenced by Delete().
void Workspace::duplicate | ( | Index | i | ) |
Duplicate WSV.
Copies the topmost WSV and puts it back on the WSV stack.
i | WSV index. |
Definition at line 93 of file workspace_ng.cc.
References Workspace::WsvStruct::auto_allocated, WorkspaceMemoryHandler::duplicate(), Workspace::WsvStruct::initialized, ws, wsmh, Workspace::WsvStruct::wsv, and wsv_data.
Referenced by abs_scalar_gas_agendaExecute(), doit_conv_test_agendaExecute(), doit_mono_agendaExecute(), doit_rte_agendaExecute(), doit_scat_field_agendaExecute(), emission_agendaExecute(), Agenda::execute(), forloop_agendaExecute(), iy_clearsky_agendaExecute(), iy_clearsky_basic_agendaExecute(), iy_cloudbox_agendaExecute(), iy_space_agendaExecute(), jacobian_agendaExecute(), jacobian_y_agendaExecute(), main_agendaExecute(), met_profile_calc_agendaExecute(), opt_prop_gas_agendaExecute(), opt_prop_part_agendaExecute(), pha_mat_spt_agendaExecute(), ppath_step_agendaExecute(), refr_index_agendaExecute(), sensor_response_agendaExecute(), spt_calc_agendaExecute(), surface_prop_agendaExecute(), test_agendaExecute(), and ybatch_calc_agendaExecute().
void Workspace::initialize | ( | ) |
Definition at line 112 of file workspace_ng.cc.
References Array< base >::nelem(), ws, and wsv_data.
Referenced by main(), and option_methods().
|
inline |
Checks existence of the given WSV.
Definition at line 79 of file workspace_ng.h.
References ws.
Referenced by Agenda::execute(), and PrintWorkspace().
|
inline |
void * Workspace::operator[] | ( | Index | i | ) |
Retrieve pointer to the given WSV.
This method returns a void pointer to the topmost instance of the given workspace variable.
i | WSV index. |
Definition at line 259 of file workspace_ng.cc.
References WorkspaceMemoryHandler::allocate(), push(), ws, wsmh, and wsv_data.
void * Workspace::pop | ( | Index | i | ) |
Pop the topmost wsv from its stack.
Removes the topmost element from the wsv's stack. If necessary, the calling function has to free the wsv's memory.
i | WSV index. |
Definition at line 181 of file workspace_ng.cc.
References ws, and Workspace::WsvStruct::wsv.
Referenced by abs_scalar_gas_agendaExecute(), doit_conv_test_agendaExecute(), doit_mono_agendaExecute(), doit_rte_agendaExecute(), doit_scat_field_agendaExecute(), emission_agendaExecute(), forloop_agendaExecute(), iy_clearsky_agendaExecute(), iy_clearsky_basic_agendaExecute(), iy_cloudbox_agendaExecute(), iy_space_agendaExecute(), jacobian_agendaExecute(), jacobian_y_agendaExecute(), met_profile_calc_agendaExecute(), opt_prop_gas_agendaExecute(), opt_prop_part_agendaExecute(), pha_mat_spt_agendaExecute(), ppath_step_agendaExecute(), refr_index_agendaExecute(), sensor_response_agendaExecute(), spt_calc_agendaExecute(), surface_prop_agendaExecute(), and ybatch_calc_agendaExecute().
void Workspace::pop_free | ( | Index | i | ) |
Pop the topmost wsv from its stack and free its memory.
Removes the topmost element from the wsv's stack and frees memory.
i | WSV index. |
Definition at line 201 of file workspace_ng.cc.
References WorkspaceMemoryHandler::deallocate(), ws, wsmh, Workspace::WsvStruct::wsv, and wsv_data.
Referenced by abs_scalar_gas_agendaExecute(), doit_conv_test_agendaExecute(), doit_mono_agendaExecute(), doit_rte_agendaExecute(), doit_scat_field_agendaExecute(), emission_agendaExecute(), Agenda::execute(), forloop_agendaExecute(), iy_clearsky_agendaExecute(), iy_clearsky_basic_agendaExecute(), iy_cloudbox_agendaExecute(), iy_space_agendaExecute(), jacobian_agendaExecute(), jacobian_y_agendaExecute(), main_agendaExecute(), met_profile_calc_agendaExecute(), opt_prop_gas_agendaExecute(), opt_prop_part_agendaExecute(), pha_mat_spt_agendaExecute(), ppath_step_agendaExecute(), refr_index_agendaExecute(), sensor_response_agendaExecute(), spt_calc_agendaExecute(), surface_prop_agendaExecute(), test_agendaExecute(), and ybatch_calc_agendaExecute().
void Workspace::push | ( | Index | i, |
void * | wsv | ||
) |
Push a new wsv onto its stack.
Adds the pointer to the variable to the stack of the WSV with index i.
i | WSV index. |
wsv | Void pointer to variable that should be put on the stack. |
Definition at line 223 of file workspace_ng.cc.
References Workspace::WsvStruct::auto_allocated, Workspace::WsvStruct::initialized, ws, and Workspace::WsvStruct::wsv.
Referenced by abs_scalar_gas_agendaExecute(), doit_conv_test_agendaExecute(), doit_mono_agendaExecute(), doit_rte_agendaExecute(), doit_scat_field_agendaExecute(), emission_agendaExecute(), forloop_agendaExecute(), iy_clearsky_agendaExecute(), iy_clearsky_basic_agendaExecute(), iy_cloudbox_agendaExecute(), iy_space_agendaExecute(), jacobian_agendaExecute(), jacobian_y_agendaExecute(), main_agendaExecute(), met_profile_calc_agendaExecute(), operator[](), opt_prop_gas_agendaExecute(), opt_prop_part_agendaExecute(), pha_mat_spt_agendaExecute(), ppath_step_agendaExecute(), refr_index_agendaExecute(), sensor_response_agendaExecute(), spt_calc_agendaExecute(), surface_prop_agendaExecute(), test_agendaExecute(), and ybatch_calc_agendaExecute().
void Workspace::push_uninitialized | ( | Index | i, |
void * | wsv | ||
) |
Push a new wsv onto its stack but mark it as uninitialized.
Adds the pointer to the variable to the stack of the WSV with index i. The variable is flagged as uninitialized. This is used for agenda output-only variables.
i | WSV index. |
wsv | Void pointer to variable that should be put on the stack. |
Definition at line 242 of file workspace_ng.cc.
References Workspace::WsvStruct::auto_allocated, Workspace::WsvStruct::initialized, ws, and Workspace::WsvStruct::wsv.
Referenced by abs_scalar_gas_agendaExecute(), doit_mono_agendaExecute(), emission_agendaExecute(), iy_clearsky_agendaExecute(), iy_clearsky_basic_agendaExecute(), iy_cloudbox_agendaExecute(), iy_space_agendaExecute(), jacobian_y_agendaExecute(), met_profile_calc_agendaExecute(), refr_index_agendaExecute(), sensor_response_agendaExecute(), surface_prop_agendaExecute(), and ybatch_calc_agendaExecute().
Workspace variable container.
Definition at line 56 of file workspace_ng.h.
Referenced by del(), duplicate(), initialize(), is_initialized(), nelem(), operator[](), pop(), pop_free(), push(), push_uninitialized(), Workspace(), and ~Workspace().
Definition at line 59 of file workspace_ng.h.
Referenced by add_wsv(), AgendaAppend_g(), AgendaSet_g(), Agenda::check(), check_agenda_data(), define_wsv_data(), define_wsv_map(), del(), Delete_sg_Agenda_g(), Delete_sg_ArrayOfArrayOfGriddedField1_g(), Delete_sg_ArrayOfArrayOfGriddedField3_g(), Delete_sg_ArrayOfArrayOfIndex_g(), Delete_sg_ArrayOfArrayOfLineRecord_g(), Delete_sg_ArrayOfArrayOfMatrix_g(), Delete_sg_ArrayOfArrayOfSpeciesTag_g(), Delete_sg_ArrayOfArrayOfTensor3_g(), Delete_sg_ArrayOfArrayOfTensor6_g(), Delete_sg_ArrayOfGriddedField1_g(), Delete_sg_ArrayOfGriddedField2_g(), Delete_sg_ArrayOfGriddedField3_g(), Delete_sg_ArrayOfGriddedField4_g(), Delete_sg_ArrayOfIndex_g(), Delete_sg_ArrayOfLineRecord_g(), Delete_sg_ArrayOfLineshapeSpec_g(), Delete_sg_ArrayOfMatrix_g(), Delete_sg_ArrayOfRetrievalQuantity_g(), Delete_sg_ArrayOfScatteringMetaData_g(), Delete_sg_ArrayOfSingleScatteringData_g(), Delete_sg_ArrayOfSparse_g(), Delete_sg_ArrayOfString_g(), Delete_sg_ArrayOfTensor3_g(), Delete_sg_ArrayOfTensor4_g(), Delete_sg_ArrayOfTensor6_g(), Delete_sg_ArrayOfTensor7_g(), Delete_sg_ArrayOfVector_g(), Delete_sg_GasAbsLookup_g(), Delete_sg_GriddedField1_g(), Delete_sg_GriddedField2_g(), Delete_sg_GriddedField3_g(), Delete_sg_GriddedField4_g(), Delete_sg_GridPos_g(), Delete_sg_Index_g(), Delete_sg_Matrix_g(), Delete_sg_MCAntenna_g(), Delete_sg_Numeric_g(), Delete_sg_Ppath_g(), Delete_sg_ScatteringMetaData_g(), Delete_sg_SingleScatteringData_g(), Delete_sg_Sparse_g(), Delete_sg_String_g(), Delete_sg_Tensor3_g(), Delete_sg_Tensor4_g(), Delete_sg_Tensor5_g(), Delete_sg_Tensor6_g(), Delete_sg_Tensor7_g(), Delete_sg_Timer_g(), Delete_sg_Vector_g(), Delete_sg_Verbosity_g(), duplicate(), Agenda::execute(), initialize(), main(), operator<<(), operator[](), option_describe(), option_input(), option_methods(), option_workspacevariables(), ArtsParser::parse_agenda(), ArtsParser::parse_generic_input(), ArtsParser::parse_generic_output(), ArtsParser::parse_specific_input(), ArtsParser::parse_specific_output(), pop_free(), MRecord::print(), PrintWsvName(), ReadNetCDF_sg_ArrayOfMatrix_g(), ReadNetCDF_sg_ArrayOfVector_g(), ReadNetCDF_sg_Matrix_g(), ReadNetCDF_sg_Tensor3_g(), ReadNetCDF_sg_Tensor4_g(), ReadNetCDF_sg_Tensor5_g(), ReadNetCDF_sg_Vector_g(), ReadXML_sg_Agenda_g(), ReadXML_sg_ArrayOfArrayOfGriddedField1_g(), ReadXML_sg_ArrayOfArrayOfGriddedField3_g(), ReadXML_sg_ArrayOfArrayOfIndex_g(), ReadXML_sg_ArrayOfArrayOfLineRecord_g(), ReadXML_sg_ArrayOfArrayOfMatrix_g(), ReadXML_sg_ArrayOfArrayOfSpeciesTag_g(), ReadXML_sg_ArrayOfArrayOfTensor3_g(), ReadXML_sg_ArrayOfArrayOfTensor6_g(), ReadXML_sg_ArrayOfGriddedField1_g(), ReadXML_sg_ArrayOfGriddedField2_g(), ReadXML_sg_ArrayOfGriddedField3_g(), ReadXML_sg_ArrayOfGriddedField4_g(), ReadXML_sg_ArrayOfIndex_g(), ReadXML_sg_ArrayOfLineRecord_g(), ReadXML_sg_ArrayOfLineshapeSpec_g(), ReadXML_sg_ArrayOfMatrix_g(), ReadXML_sg_ArrayOfRetrievalQuantity_g(), ReadXML_sg_ArrayOfScatteringMetaData_g(), ReadXML_sg_ArrayOfSingleScatteringData_g(), ReadXML_sg_ArrayOfSparse_g(), ReadXML_sg_ArrayOfString_g(), ReadXML_sg_ArrayOfTensor3_g(), ReadXML_sg_ArrayOfTensor4_g(), ReadXML_sg_ArrayOfTensor6_g(), ReadXML_sg_ArrayOfTensor7_g(), ReadXML_sg_ArrayOfVector_g(), ReadXML_sg_GasAbsLookup_g(), ReadXML_sg_GriddedField1_g(), ReadXML_sg_GriddedField2_g(), ReadXML_sg_GriddedField3_g(), ReadXML_sg_GriddedField4_g(), ReadXML_sg_GridPos_g(), ReadXML_sg_Index_g(), ReadXML_sg_Matrix_g(), ReadXML_sg_MCAntenna_g(), ReadXML_sg_Numeric_g(), ReadXML_sg_Ppath_g(), ReadXML_sg_ScatteringMetaData_g(), ReadXML_sg_SingleScatteringData_g(), ReadXML_sg_Sparse_g(), ReadXML_sg_String_g(), ReadXML_sg_Tensor3_g(), ReadXML_sg_Tensor4_g(), ReadXML_sg_Tensor5_g(), ReadXML_sg_Tensor6_g(), ReadXML_sg_Tensor7_g(), ReadXML_sg_Timer_g(), ReadXML_sg_Vector_g(), ReadXML_sg_Verbosity_g(), ArtsParser::tasklist_insert_set_delete(), write_agenda_wrapper_header(), write_method_header(), write_method_header_documentation(), WriteNetCDF_sg_ArrayOfMatrix_g(), WriteNetCDF_sg_ArrayOfVector_g(), WriteNetCDF_sg_Matrix_g(), WriteNetCDF_sg_Tensor3_g(), WriteNetCDF_sg_Tensor4_g(), WriteNetCDF_sg_Tensor5_g(), WriteNetCDF_sg_Vector_g(), WriteXML_sg_Agenda_g(), WriteXML_sg_ArrayOfArrayOfGriddedField1_g(), WriteXML_sg_ArrayOfArrayOfGriddedField3_g(), WriteXML_sg_ArrayOfArrayOfIndex_g(), WriteXML_sg_ArrayOfArrayOfLineRecord_g(), WriteXML_sg_ArrayOfArrayOfMatrix_g(), WriteXML_sg_ArrayOfArrayOfSpeciesTag_g(), WriteXML_sg_ArrayOfArrayOfTensor3_g(), WriteXML_sg_ArrayOfArrayOfTensor6_g(), WriteXML_sg_ArrayOfGriddedField1_g(), WriteXML_sg_ArrayOfGriddedField2_g(), WriteXML_sg_ArrayOfGriddedField3_g(), WriteXML_sg_ArrayOfGriddedField4_g(), WriteXML_sg_ArrayOfIndex_g(), WriteXML_sg_ArrayOfLineRecord_g(), WriteXML_sg_ArrayOfLineshapeSpec_g(), WriteXML_sg_ArrayOfMatrix_g(), WriteXML_sg_ArrayOfRetrievalQuantity_g(), WriteXML_sg_ArrayOfScatteringMetaData_g(), WriteXML_sg_ArrayOfSingleScatteringData_g(), WriteXML_sg_ArrayOfSparse_g(), WriteXML_sg_ArrayOfString_g(), WriteXML_sg_ArrayOfTensor3_g(), WriteXML_sg_ArrayOfTensor4_g(), WriteXML_sg_ArrayOfTensor6_g(), WriteXML_sg_ArrayOfTensor7_g(), WriteXML_sg_ArrayOfVector_g(), WriteXML_sg_GasAbsLookup_g(), WriteXML_sg_GriddedField1_g(), WriteXML_sg_GriddedField2_g(), WriteXML_sg_GriddedField3_g(), WriteXML_sg_GriddedField4_g(), WriteXML_sg_GridPos_g(), WriteXML_sg_Index_g(), WriteXML_sg_Matrix_g(), WriteXML_sg_MCAntenna_g(), WriteXML_sg_Numeric_g(), WriteXML_sg_Ppath_g(), WriteXML_sg_ScatteringMetaData_g(), WriteXML_sg_SingleScatteringData_g(), WriteXML_sg_Sparse_g(), WriteXML_sg_String_g(), WriteXML_sg_Tensor3_g(), WriteXML_sg_Tensor4_g(), WriteXML_sg_Tensor5_g(), WriteXML_sg_Tensor6_g(), WriteXML_sg_Tensor7_g(), WriteXML_sg_Timer_g(), WriteXML_sg_Vector_g(), WriteXML_sg_Verbosity_g(), WriteXMLIndexed_sg_Agenda_g(), WriteXMLIndexed_sg_ArrayOfArrayOfGriddedField1_g(), WriteXMLIndexed_sg_ArrayOfArrayOfGriddedField3_g(), WriteXMLIndexed_sg_ArrayOfArrayOfIndex_g(), WriteXMLIndexed_sg_ArrayOfArrayOfLineRecord_g(), WriteXMLIndexed_sg_ArrayOfArrayOfMatrix_g(), WriteXMLIndexed_sg_ArrayOfArrayOfSpeciesTag_g(), WriteXMLIndexed_sg_ArrayOfArrayOfTensor3_g(), WriteXMLIndexed_sg_ArrayOfArrayOfTensor6_g(), WriteXMLIndexed_sg_ArrayOfGriddedField1_g(), WriteXMLIndexed_sg_ArrayOfGriddedField2_g(), WriteXMLIndexed_sg_ArrayOfGriddedField3_g(), WriteXMLIndexed_sg_ArrayOfGriddedField4_g(), WriteXMLIndexed_sg_ArrayOfIndex_g(), WriteXMLIndexed_sg_ArrayOfLineRecord_g(), WriteXMLIndexed_sg_ArrayOfLineshapeSpec_g(), WriteXMLIndexed_sg_ArrayOfMatrix_g(), WriteXMLIndexed_sg_ArrayOfRetrievalQuantity_g(), WriteXMLIndexed_sg_ArrayOfScatteringMetaData_g(), WriteXMLIndexed_sg_ArrayOfSingleScatteringData_g(), WriteXMLIndexed_sg_ArrayOfSparse_g(), WriteXMLIndexed_sg_ArrayOfString_g(), WriteXMLIndexed_sg_ArrayOfTensor3_g(), WriteXMLIndexed_sg_ArrayOfTensor4_g(), WriteXMLIndexed_sg_ArrayOfTensor6_g(), WriteXMLIndexed_sg_ArrayOfTensor7_g(), WriteXMLIndexed_sg_ArrayOfVector_g(), WriteXMLIndexed_sg_GasAbsLookup_g(), WriteXMLIndexed_sg_GriddedField1_g(), WriteXMLIndexed_sg_GriddedField2_g(), WriteXMLIndexed_sg_GriddedField3_g(), WriteXMLIndexed_sg_GriddedField4_g(), WriteXMLIndexed_sg_GridPos_g(), WriteXMLIndexed_sg_Index_g(), WriteXMLIndexed_sg_Matrix_g(), WriteXMLIndexed_sg_MCAntenna_g(), WriteXMLIndexed_sg_Numeric_g(), WriteXMLIndexed_sg_Ppath_g(), WriteXMLIndexed_sg_ScatteringMetaData_g(), WriteXMLIndexed_sg_SingleScatteringData_g(), WriteXMLIndexed_sg_Sparse_g(), WriteXMLIndexed_sg_String_g(), WriteXMLIndexed_sg_Tensor3_g(), WriteXMLIndexed_sg_Tensor4_g(), WriteXMLIndexed_sg_Tensor5_g(), WriteXMLIndexed_sg_Tensor6_g(), WriteXMLIndexed_sg_Tensor7_g(), WriteXMLIndexed_sg_Timer_g(), WriteXMLIndexed_sg_Vector_g(), WriteXMLIndexed_sg_Verbosity_g(), and ~Workspace().
The map associated with wsv_data.
Definition at line 62 of file workspace_ng.h.
Referenced by AgRecord::AgRecord(), check_agenda_data(), define_wsv_map(), Delete(), get_wsv_id(), option_describe(), option_input(), option_methods(), ArtsParser::parse_generic_input(), ArtsParser::parse_generic_output(), ArtsParser::parse_method_args(), ArtsParser::parse_specific_input(), ArtsParser::parse_specific_output(), ArtsParser::read_name_or_value(), and ArtsParser::set_gin_to_default().