1 | /*! \file BoolParam.h
|
---|
2 | * \brief: header file for triavertexinput object
|
---|
3 | */
|
---|
4 |
|
---|
5 | #ifndef _BOOLPARAM_H_
|
---|
6 | #define _BOOLPARAM_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 BoolParam: public Param{
|
---|
21 |
|
---|
22 | public:
|
---|
23 | /*just hold 3 values for 3 vertices: */
|
---|
24 | int enum_type;
|
---|
25 | bool value;
|
---|
26 |
|
---|
27 | /*BoolParam constructors, destructors: {{{*/
|
---|
28 | BoolParam();
|
---|
29 | BoolParam(int enum_type,bool value);
|
---|
30 | ~BoolParam();
|
---|
31 | /*}}}*/
|
---|
32 | /*Object virtual functions definitions:{{{ */
|
---|
33 | Param* copy();
|
---|
34 | void DeepEcho();
|
---|
35 | void Echo();
|
---|
36 | int Id();
|
---|
37 | void Marshall(MarshallHandle* marshallhandle);
|
---|
38 | int ObjectEnum();
|
---|
39 | /*}}}*/
|
---|
40 | /*Param vritual function definitions: {{{*/
|
---|
41 | void GetParameterValue(bool* pbool){*pbool=value;}
|
---|
42 | void GetParameterValue(int* pinteger){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
|
---|
43 | void GetParameterValue(int** pintarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
|
---|
44 | void GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
|
---|
45 | void GetParameterValue(IssmDouble* pIssmDouble){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
|
---|
46 | void GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
|
---|
47 | void GetParameterValue(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
|
---|
48 | void GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
|
---|
49 | void GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
|
---|
50 | void GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
|
---|
51 | void GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
|
---|
52 | void GetParameterValue(Vector<IssmDouble>** pvec){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
|
---|
53 | void GetParameterValue(Matrix<IssmDouble>** pmat){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
|
---|
54 | void GetParameterValue(FILE** pfid){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
|
---|
55 | void GetParameterValue(DataSet** pdataset){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a DataSet");}
|
---|
56 | int InstanceEnum(){return enum_type;}
|
---|
57 |
|
---|
58 | void SetEnum(int enum_in){this->enum_type = enum_in;};
|
---|
59 | void SetValue(bool boolean){this->value=boolean;}
|
---|
60 | void SetValue(int integer){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an int");}
|
---|
61 | void SetValue(IssmDouble scalar){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an IssmPDouble");}
|
---|
62 | void SetValue(char* string){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
|
---|
63 | void SetValue(char** stringarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
|
---|
64 | void SetValue(IssmDouble* IssmDoublearray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
|
---|
65 | void SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
|
---|
66 | void SetValue(int* intarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
|
---|
67 | void SetValue(int* pintarray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
|
---|
68 | void SetValue(Vector<IssmDouble>* vec){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
|
---|
69 | void SetValue(Matrix<IssmDouble>* mat){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
|
---|
70 | void SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
|
---|
71 | void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
|
---|
72 | /*}}}*/
|
---|
73 | };
|
---|
74 | #endif /* _BOOLPARAM_H */
|
---|