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