Ice Sheet System Model  4.18
Code documentation
DataSetParam.cpp
Go to the documentation of this file.
1 
5 /*header files: */
6 /*{{{*/
7 #ifdef HAVE_CONFIG_H
8  #include <config.h>
9 #else
10 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
11 #endif
12 
13 #include "../classes.h"
14 #include "shared/shared.h"
15 /*}}}*/
16 
17 /*DataSetParam constructors and destructor*/
19  value=NULL;
20  return;
21 }
22 /*}}}*/
23 DataSetParam::DataSetParam(int in_enum_type,DataSet* in_value){/*{{{*/
24 
25  enum_type=in_enum_type;
26  value=in_value->Copy();
27 }
28 /*}}}*/
30  delete value;
31 }
32 /*}}}*/
33 
34 /*Object virtual functions definitions:*/
36 
37  return new DataSetParam(this->enum_type,this->value);
38 
39 }
40 /*}}}*/
41 void DataSetParam::DeepEcho(void){/*{{{*/
42 
43  _printf_(setw(22)<<" DataSetParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" ----- begin\n");
44  this->value->Echo();
45  _printf_(setw(22)<<" DataSetParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" ----- end\n");
46 }
47 /*}}}*/
48 void DataSetParam::Echo(void){/*{{{*/
49  this->DeepEcho();
50 }
51 /*}}}*/
52 int DataSetParam::Id(void){ return -1; }/*{{{*/
53 /*}}}*/
54 void DataSetParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/
55 
56  if(marshall_direction==MARSHALLING_BACKWARD)value=new DataSet();
57 
60  value->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
61 
62 }
63 /*}}}*/
64 int DataSetParam::ObjectEnum(void){/*{{{*/
65 
66  return DataSetParamEnum;
67 
68 }
69 /*}}}*/
70 
71 /*DataSetParam virtual functions definitions: */
72 void DataSetParam::GetParameterValue(DataSet** pdataset){/*{{{*/
73  *pdataset=value->Copy();
74 }
75 /*}}}*/
76 void DataSetParam::SetValue(DataSet* dataset){/*{{{*/
77  this->value=dataset;
78 }
79 /*}}}*/
Param
Definition: Param.h:21
DataSetParam::copy
Param * copy()
Definition: DataSetParam.cpp:35
_printf_
#define _printf_(StreamArgs)
Definition: Print.h:22
MARSHALLING_ENUM
#define MARSHALLING_ENUM(EN)
Definition: Marshalling.h:14
DataSetParam::Echo
void Echo()
Definition: DataSetParam.cpp:48
DataSetParam::DataSetParam
DataSetParam()
Definition: DataSetParam.cpp:18
DataSetParam::enum_type
int enum_type
Definition: DataSetParam.h:23
DataSetParam::GetParameterValue
void GetParameterValue(bool *pbool)
Definition: DataSetParam.h:42
DataSetParam::ObjectEnum
int ObjectEnum()
Definition: DataSetParam.cpp:64
EnumToStringx
const char * EnumToStringx(int enum_in)
Definition: EnumToStringx.cpp:15
DataSetParam::DeepEcho
void DeepEcho()
Definition: DataSetParam.cpp:41
DataSet::Echo
void Echo()
Definition: DataSet.cpp:307
MARSHALLING
#define MARSHALLING(FIELD)
Definition: Marshalling.h:29
DataSetParam::SetValue
void SetValue(bool boolean)
Definition: DataSetParam.h:60
DataSetParam::value
DataSet * value
Definition: DataSetParam.h:26
MARSHALLING_BACKWARD
@ MARSHALLING_BACKWARD
Definition: Marshalling.h:10
DataSetParam::Marshall
void Marshall(char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
Definition: DataSetParam.cpp:54
DataSetParamEnum
@ DataSetParamEnum
Definition: EnumDefinitions.h:1029
DataSet::Copy
DataSet * Copy(void)
Definition: DataSet.cpp:49
DataSetParam::Id
int Id()
Definition: DataSetParam.cpp:52
DataSet
Declaration of DataSet class.
Definition: DataSet.h:14
shared.h
DataSetParam::~DataSetParam
~DataSetParam()
Definition: DataSetParam.cpp:29
DataSet::Marshall
void Marshall(char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
Definition: DataSet.cpp:93