Workspace Class Reference

Workspace class. More...

#include <workspace_ng.h>

Collaboration diagram for Workspace:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Workspace ()
 Construct a new workspace.
 Workspace (const Workspace &workspace)
 Workspace copy constructor.
virtual ~Workspace ()
 Destruct the workspace.
void del (Index i)
 Delete WSV.
void duplicate (Index i)
 Duplicate WSV.
void initialize ()
bool is_initialized (Index i)
 Checks existence of the given WSV.
void * pop (Index i)
 Pop the topmost wsv from its stack.
void pop_free (Index i)
 Pop the topmost wsv from its stack and free its memory.
void push (Index i, void *wsv)
 Push a new wsv onto its stack.
void push_uninitialized (Index i, void *wsv)
 Push a new wsv onto its stack but mark it as uninitialized.
Index nelem ()
void * operator[] (Index i)
 Retrieve pointer to the given WSV.

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< WsvRecordwsv_data
static map< String, IndexWsvMap

Private Attributes

Array< stack< WsvStruct * > > ws
 Workspace variable container.

Classes

struct  WsvStruct


Detailed Description

Workspace class.

Manages the workspace variables.

Definition at line 45 of file workspace_ng.h.


Constructor & Destructor Documentation

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.

Parameters:
[in] workspace The workspace to be copied
Author:
Oliver Lemke
Date:
2007-11-28

Definition at line 128 of file workspace_ng.cc.

References Workspace::WsvStruct::auto_allocated, Workspace::WsvStruct::initialized, ws, and Workspace::WsvStruct::wsv.

Workspace::~Workspace (  )  [virtual]

Destruct the workspace.

Frees all WSVs.

Definition at line 153 of file workspace_ng.cc.

References Workspace::WsvStruct::auto_allocated, WorkspaceMemoryHandler::deallocate(), ws, Workspace::WsvStruct::wsv, and wsv_data.


Member Function Documentation

void Workspace::define_wsv_data (  )  [static]

Definition at line 50 of file workspace.cc.

References DESCRIPTION, GROUP, NAME, and wsv_data.

Referenced by main().

void Workspace::define_wsv_map (  )  [static]

Definition at line 50 of file workspace_ng.cc.

References Array< base >::nelem(), wsv_data, and WsvMap.

Referenced by add_wsv(), and main().

Index Workspace::add_wsv ( const WsvRecord wsv  )  [static]

void Workspace::del ( Index  i  ) 

Delete WSV.

Frees the memory of the topmost WSV on the stack.

Parameters:
i WSV index.

Definition at line 73 of file workspace_ng.cc.

References Workspace::WsvStruct::auto_allocated, WorkspaceMemoryHandler::deallocate(), Workspace::WsvStruct::initialized, ws, Workspace::WsvStruct::wsv, and wsv_data.

Referenced by Delete().

void Workspace::duplicate ( Index  i  ) 

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().

bool Workspace::is_initialized ( Index  i  )  [inline]

Checks existence of the given WSV.

Definition at line 77 of file workspace_ng.h.

References ws.

Referenced by Agenda::execute(), and PrintWorkspace().

void * Workspace::pop ( Index  i  ) 

void Workspace::pop_free ( Index  i  ) 

void Workspace::push ( Index  i,
void *  wsv 
)

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.

Parameters:
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_cloudbox_agendaExecute(), iy_space_agendaExecute(), jacobian_agendaExecute(), jacobian_y_agendaExecute(), met_profile_calc_agendaExecute(), refr_index_agendaExecute(), surface_prop_agendaExecute(), and ybatch_calc_agendaExecute().

Index Workspace::nelem (  )  [inline]

Definition at line 89 of file workspace_ng.h.

References ws.

Referenced by PrintWorkspace().

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.

Parameters:
i WSV index.

Definition at line 259 of file workspace_ng.cc.

References WorkspaceMemoryHandler::allocate(), push(), ws, and wsv_data.


Member Data Documentation

Array< stack<WsvStruct *> > Workspace::ws [private]

Definition at line 57 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_ArrayOfArrayOfArrayOfArrayOfGridPos_g(), Delete_sg_ArrayOfArrayOfGField1_g(), Delete_sg_ArrayOfArrayOfGField3_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_ArrayOfGField1_g(), Delete_sg_ArrayOfGField2_g(), Delete_sg_ArrayOfGField3_g(), Delete_sg_ArrayOfGField4_g(), Delete_sg_ArrayOfIndex_g(), Delete_sg_ArrayOfLineRecord_g(), Delete_sg_ArrayOfLineshapeSpec_g(), Delete_sg_ArrayOfMatrix_g(), Delete_sg_ArrayOfPpath_g(), Delete_sg_ArrayOfRetrievalQuantity_g(), Delete_sg_ArrayOfSingleScatteringData_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_GField1_g(), Delete_sg_GField2_g(), Delete_sg_GField3_g(), Delete_sg_GField4_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_SingleScatteringData_g(), Delete_sg_SLIData2_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(), 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_Vector_g(), ReadXML_sg_Agenda_g(), ReadXML_sg_ArrayOfArrayOfArrayOfArrayOfGridPos_g(), ReadXML_sg_ArrayOfArrayOfGField1_g(), ReadXML_sg_ArrayOfArrayOfGField3_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_ArrayOfGField1_g(), ReadXML_sg_ArrayOfGField2_g(), ReadXML_sg_ArrayOfGField3_g(), ReadXML_sg_ArrayOfGField4_g(), ReadXML_sg_ArrayOfIndex_g(), ReadXML_sg_ArrayOfLineRecord_g(), ReadXML_sg_ArrayOfLineshapeSpec_g(), ReadXML_sg_ArrayOfMatrix_g(), ReadXML_sg_ArrayOfPpath_g(), ReadXML_sg_ArrayOfRetrievalQuantity_g(), ReadXML_sg_ArrayOfSingleScatteringData_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_GField1_g(), ReadXML_sg_GField2_g(), ReadXML_sg_GField3_g(), ReadXML_sg_GField4_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_SingleScatteringData_g(), ReadXML_sg_SLIData2_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(), 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_Vector_g(), WriteXML_sg_Agenda_g(), WriteXML_sg_ArrayOfArrayOfArrayOfArrayOfGridPos_g(), WriteXML_sg_ArrayOfArrayOfGField1_g(), WriteXML_sg_ArrayOfArrayOfGField3_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_ArrayOfGField1_g(), WriteXML_sg_ArrayOfGField2_g(), WriteXML_sg_ArrayOfGField3_g(), WriteXML_sg_ArrayOfGField4_g(), WriteXML_sg_ArrayOfIndex_g(), WriteXML_sg_ArrayOfLineRecord_g(), WriteXML_sg_ArrayOfLineshapeSpec_g(), WriteXML_sg_ArrayOfMatrix_g(), WriteXML_sg_ArrayOfPpath_g(), WriteXML_sg_ArrayOfRetrievalQuantity_g(), WriteXML_sg_ArrayOfSingleScatteringData_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_GField1_g(), WriteXML_sg_GField2_g(), WriteXML_sg_GField3_g(), WriteXML_sg_GField4_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_SingleScatteringData_g(), WriteXML_sg_SLIData2_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(), WriteXMLIndexed_sg_Agenda_g(), WriteXMLIndexed_sg_ArrayOfArrayOfArrayOfArrayOfGridPos_g(), WriteXMLIndexed_sg_ArrayOfArrayOfGField1_g(), WriteXMLIndexed_sg_ArrayOfArrayOfGField3_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_ArrayOfGField1_g(), WriteXMLIndexed_sg_ArrayOfGField2_g(), WriteXMLIndexed_sg_ArrayOfGField3_g(), WriteXMLIndexed_sg_ArrayOfGField4_g(), WriteXMLIndexed_sg_ArrayOfIndex_g(), WriteXMLIndexed_sg_ArrayOfLineRecord_g(), WriteXMLIndexed_sg_ArrayOfLineshapeSpec_g(), WriteXMLIndexed_sg_ArrayOfMatrix_g(), WriteXMLIndexed_sg_ArrayOfPpath_g(), WriteXMLIndexed_sg_ArrayOfRetrievalQuantity_g(), WriteXMLIndexed_sg_ArrayOfSingleScatteringData_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_GField1_g(), WriteXMLIndexed_sg_GField2_g(), WriteXMLIndexed_sg_GField3_g(), WriteXMLIndexed_sg_GField4_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_SingleScatteringData_g(), WriteXMLIndexed_sg_SLIData2_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(), and ~Workspace().

map< String, Index > Workspace::WsvMap [static]


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

Generated on Mon Mar 23 14:07:06 2009 for ARTS by  doxygen 1.5.6