Ice Sheet System Model  4.18
Code documentation
DataSetParam.h
Go to the documentation of this file.
1 
5 #ifndef _DATASETPARAM_H_
6 #define _DATASETPARAM_H_
7 
8 /*Headers:*/
9 /*{{{*/
10 #ifdef HAVE_CONFIG_H
11  #include <config.h>
12 #else
13 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
14 #endif
15 
16 #include "./Param.h"
17 #include "../../shared/shared.h"
18 /*}}}*/
19 
20 class DataSetParam: public Param{
21 
22  private:
23  int enum_type;
24 
25  public:
27 
28  /*DataSetParam constructors, destructors: {{{*/
29  DataSetParam();
30  DataSetParam(int enum_type,DataSet* dataset);
31  ~DataSetParam();
32  /*}}}*/
33  /*Object virtual functions definitions:{{{ */
34  Param* copy();
35  void DeepEcho();
36  void Echo();
37  int Id();
38  void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);
39  int ObjectEnum();
40  /*}}}*/
41  /*Param vritual function definitions: {{{*/
42  void GetParameterValue(bool* pbool){ _error_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
43  void GetParameterValue(int* pinteger){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
44  void GetParameterValue(int** pintarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
45  void GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
46  void GetParameterValue(IssmDouble* pIssmDouble){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
47  void GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
48  void GetParameterValue(FILE** pfile){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a file pointer");}
49  void GetParameterValue(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
50  void GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
51  void GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
52  void GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
53  void GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("DataSet param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
54  void GetParameterValue(Vector<IssmDouble>** pvec){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
55  void GetParameterValue(Matrix<IssmDouble>** pmat){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
56  void GetParameterValue(DataSet** pdataset);
57  int InstanceEnum(){return enum_type;}
58 
59  void SetEnum(int enum_in){this->enum_type = enum_in;};
60  void SetValue(bool boolean){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
61  void SetValue(int integer){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
62  void SetValue(IssmDouble scalar){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
63  void SetValue(char* string){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
64  void SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a file pointer");}
65  void SetValue(char** stringarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
66  void SetValue(IssmDouble* IssmDoublearray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
67  void SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
68  void SetValue(int* intarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
69  void SetValue(int* pintarray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
70  void SetValue(Vector<IssmDouble>* vec){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
71  void SetValue(Matrix<IssmDouble>* mat){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
72  void SetValue(DataSet* dataset);
73  void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("DataSet param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
74  /*}}}*/
75 };
76 #endif /* _INTPARAM_H */
Matrix< IssmDouble >
DataSetParam::SetValue
void SetValue(IssmDouble *IssmDoublearray, int M)
Definition: DataSetParam.h:66
DataSetParam::GetParameterValue
void GetParameterValue(FILE **pfile)
Definition: DataSetParam.h:48
DataSetParam::SetValue
void SetValue(int integer)
Definition: DataSetParam.h:61
IssmDouble
double IssmDouble
Definition: types.h:37
Param
Definition: Param.h:21
DataSetParam::copy
Param * copy()
Definition: DataSetParam.cpp:35
DataSetParam::SetValue
void SetValue(Vector< IssmDouble > *vec)
Definition: DataSetParam.h:70
DataSetParam::SetValue
void SetValue(int *intarray, int M)
Definition: DataSetParam.h:68
DataSetParam::Echo
void Echo()
Definition: DataSetParam.cpp:48
DataSetParam::DataSetParam
DataSetParam()
Definition: DataSetParam.cpp:18
DataSetParam::GetParameterValue
void GetParameterValue(int **pintarray, int *pM)
Definition: DataSetParam.h:44
DataSetParam::GetParameterValue
void GetParameterValue(char **pstring)
Definition: DataSetParam.h:49
DataSetParam::GetParameterValue
void GetParameterValue(IssmDouble **pIssmDoublearray, int *pM)
Definition: DataSetParam.h:51
DataSetParam::enum_type
int enum_type
Definition: DataSetParam.h:23
DataSetParam::GetParameterValue
void GetParameterValue(bool *pbool)
Definition: DataSetParam.h:42
DataSetParam::GetParameterValue
void GetParameterValue(IssmDouble *pdouble, IssmDouble time)
Definition: DataSetParam.h:47
DataSetParam::ObjectEnum
int ObjectEnum()
Definition: DataSetParam.cpp:64
DataSetParam::SetValue
void SetValue(char **stringarray, int M)
Definition: DataSetParam.h:65
EnumToStringx
const char * EnumToStringx(int enum_in)
Definition: EnumToStringx.cpp:15
DataSetParam::SetValue
void SetValue(IssmDouble **array, int M, int *mdim_array, int *ndim_array)
Definition: DataSetParam.h:73
DataSetParam::DeepEcho
void DeepEcho()
Definition: DataSetParam.cpp:41
Param.h
abstract class for Param object
DataSetParam::GetParameterValue
void GetParameterValue(IssmDouble *pIssmDouble)
Definition: DataSetParam.h:46
DataSetParam::SetValue
void SetValue(char *string)
Definition: DataSetParam.h:63
DataSetParam::SetValue
void SetValue(bool boolean)
Definition: DataSetParam.h:60
DataSetParam::SetValue
void SetValue(FILE *fid)
Definition: DataSetParam.h:64
DataSetParam::value
DataSet * value
Definition: DataSetParam.h:26
DataSetParam
Definition: DataSetParam.h:20
DataSetParam::InstanceEnum
int InstanceEnum()
Definition: DataSetParam.h:57
DataSetParam::GetParameterValue
void GetParameterValue(Vector< IssmDouble > **pvec)
Definition: DataSetParam.h:54
DataSetParam::SetValue
void SetValue(Matrix< IssmDouble > *mat)
Definition: DataSetParam.h:71
DataSetParam::GetParameterValue
void GetParameterValue(IssmDouble ***parray, int *pM, int **pmdims, int **pndims)
Definition: DataSetParam.h:53
DataSetParam::GetParameterValue
void GetParameterValue(int *pinteger)
Definition: DataSetParam.h:43
DataSetParam::Marshall
void Marshall(char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
Definition: DataSetParam.cpp:54
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
DataSetParam::GetParameterValue
void GetParameterValue(char ***pstringarray, int *pM)
Definition: DataSetParam.h:50
DataSetParam::SetValue
void SetValue(IssmDouble *pIssmDoublearray, int M, int N)
Definition: DataSetParam.h:67
DataSetParam::GetParameterValue
void GetParameterValue(IssmDouble **pIssmDoublearray, int *pM, int *pN)
Definition: DataSetParam.h:52
DataSetParam::Id
int Id()
Definition: DataSetParam.cpp:52
DataSetParam::GetParameterValue
void GetParameterValue(Matrix< IssmDouble > **pmat)
Definition: DataSetParam.h:55
DataSetParam::GetParameterValue
void GetParameterValue(int **pintarray, int *pM, int *pN)
Definition: DataSetParam.h:45
DataSetParam::SetValue
void SetValue(IssmDouble scalar)
Definition: DataSetParam.h:62
DataSet
Declaration of DataSet class.
Definition: DataSet.h:14
DataSetParam::SetEnum
void SetEnum(int enum_in)
Definition: DataSetParam.h:59
Vector< IssmDouble >
DataSetParam::SetValue
void SetValue(int *pintarray, int M, int N)
Definition: DataSetParam.h:69
DataSetParam::~DataSetParam
~DataSetParam()
Definition: DataSetParam.cpp:29