Ice Sheet System Model  4.18
Code documentation
VectorParam.h
Go to the documentation of this file.
1 
5 #ifndef _VECTORPARAM_H_
6 #define _VECTORPARAM_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 VectorParam: public Param{
21 
22  private:
23  /*just hold 3 values for 3 vertices: */
24  int enum_type;
26 
27  public:
28  /*VectorParam constructors, destructors: {{{*/
29  VectorParam();
31  ~VectorParam();
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){ _error_("not implemented yet!"); };
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 an integer");}
44  void GetParameterValue(int** pintarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
45  void GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
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(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
49  void GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
50  void GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
51  void GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
52  void GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
53  void GetParameterValue(Matrix<IssmDouble>** pmat){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
54  void GetParameterValue(Vector<IssmDouble>** poutput);
55  void GetParameterValue(FILE** pfid){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
56  void GetParameterValue(DataSet** pdataset){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a DataSet");}
57  int InstanceEnum(){return enum_type;}
58 
59  void SetEnum(int enum_in){this->enum_type = enum_in;};
60  void SetValue(bool boolean){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a boolean");}
61  void SetValue(int integer){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an integer");}
62  void SetValue(IssmDouble scalar){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a scalar");}
63  void SetValue(char* string){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
64  void SetValue(char** stringarray,int M){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
65  void SetValue(IssmDouble* IssmDoublearray,int M){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
66  void SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
67  void SetValue(int* intarray,int M){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
68  void SetValue(int* pintarray,int M,int N){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
69  void SetValue(Vector<IssmDouble>* vec);
70  void SetValue(Matrix<IssmDouble>* mat){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
71  void SetValue(FILE* fid){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
72  void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
73  /*}}}*/
74 };
75 #endif /* _VECTORPARAM_H */
Matrix< IssmDouble >
VectorParam::enum_type
int enum_type
Definition: VectorParam.h:24
VectorParam
Definition: VectorParam.h:20
VectorParam::SetValue
void SetValue(int integer)
Definition: VectorParam.h:61
VectorParam::SetValue
void SetValue(char *string)
Definition: VectorParam.h:63
VectorParam::SetValue
void SetValue(IssmDouble scalar)
Definition: VectorParam.h:62
IssmDouble
double IssmDouble
Definition: types.h:37
Param
Definition: Param.h:21
VectorParam::VectorParam
VectorParam()
Definition: VectorParam.cpp:18
VectorParam::SetValue
void SetValue(Matrix< IssmDouble > *mat)
Definition: VectorParam.h:70
VectorParam::SetValue
void SetValue(IssmDouble **array, int M, int *mdim_array, int *ndim_array)
Definition: VectorParam.h:72
VectorParam::GetParameterValue
void GetParameterValue(FILE **pfid)
Definition: VectorParam.h:55
VectorParam::Echo
void Echo()
Definition: VectorParam.cpp:53
VectorParam::SetValue
void SetValue(IssmDouble *pIssmDoublearray, int M, int N)
Definition: VectorParam.h:66
VectorParam::GetParameterValue
void GetParameterValue(char **pstring)
Definition: VectorParam.h:48
VectorParam::GetParameterValue
void GetParameterValue(char ***pstringarray, int *pM)
Definition: VectorParam.h:49
VectorParam::value
Vector< IssmDouble > * value
Definition: VectorParam.h:25
VectorParam::SetEnum
void SetEnum(int enum_in)
Definition: VectorParam.h:59
VectorParam::GetParameterValue
void GetParameterValue(IssmDouble *pIssmDouble)
Definition: VectorParam.h:46
VectorParam::GetParameterValue
void GetParameterValue(IssmDouble **pIssmDoublearray, int *pM, int *pN)
Definition: VectorParam.h:51
VectorParam::GetParameterValue
void GetParameterValue(Matrix< IssmDouble > **pmat)
Definition: VectorParam.h:53
VectorParam::SetValue
void SetValue(IssmDouble *IssmDoublearray, int M)
Definition: VectorParam.h:65
VectorParam::~VectorParam
~VectorParam()
Definition: VectorParam.cpp:34
VectorParam::GetParameterValue
void GetParameterValue(int **pintarray, int *pM)
Definition: VectorParam.h:44
EnumToStringx
const char * EnumToStringx(int enum_in)
Definition: EnumToStringx.cpp:15
VectorParam::Marshall
void Marshall(char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
Definition: VectorParam.h:38
VectorParam::GetParameterValue
void GetParameterValue(int *pinteger)
Definition: VectorParam.h:43
Param.h
abstract class for Param object
VectorParam::ObjectEnum
int ObjectEnum()
Definition: VectorParam.cpp:62
VectorParam::GetParameterValue
void GetParameterValue(bool *pbool)
Definition: VectorParam.h:42
VectorParam::GetParameterValue
void GetParameterValue(int **pintarray, int *pM, int *pN)
Definition: VectorParam.h:45
VectorParam::GetParameterValue
void GetParameterValue(DataSet **pdataset)
Definition: VectorParam.h:56
VectorParam::SetValue
void SetValue(int *pintarray, int M, int N)
Definition: VectorParam.h:68
VectorParam::copy
Param * copy()
Definition: VectorParam.cpp:40
VectorParam::GetParameterValue
void GetParameterValue(IssmDouble **pIssmDoublearray, int *pM)
Definition: VectorParam.h:50
VectorParam::SetValue
void SetValue(FILE *fid)
Definition: VectorParam.h:71
VectorParam::InstanceEnum
int InstanceEnum()
Definition: VectorParam.h:57
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
VectorParam::SetValue
void SetValue(int *intarray, int M)
Definition: VectorParam.h:67
VectorParam::Id
int Id()
Definition: VectorParam.cpp:60
VectorParam::SetValue
void SetValue(bool boolean)
Definition: VectorParam.h:60
VectorParam::GetParameterValue
void GetParameterValue(IssmDouble ***parray, int *pM, int **pmdims, int **pndims)
Definition: VectorParam.h:52
VectorParam::GetParameterValue
void GetParameterValue(IssmDouble *pdouble, IssmDouble time)
Definition: VectorParam.h:47
VectorParam::DeepEcho
void DeepEcho()
Definition: VectorParam.cpp:46
DataSet
Declaration of DataSet class.
Definition: DataSet.h:14
Vector< IssmDouble >
VectorParam::SetValue
void SetValue(char **stringarray, int M)
Definition: VectorParam.h:64