[3683] | 1 | /*! \file StringParam.h
|
---|
| 2 | * \brief: header file for triavertexinput object
|
---|
| 3 | */
|
---|
| 4 |
|
---|
| 5 |
|
---|
| 6 | #ifndef _STRINGPARAM_H_
|
---|
| 7 | #define _STRINGPARAM_H_
|
---|
| 8 |
|
---|
| 9 | /*Headers:*/
|
---|
[12365] | 10 | /*{{{*/
|
---|
[3715] | 11 | #ifdef HAVE_CONFIG_H
|
---|
[9320] | 12 | #include <config.h>
|
---|
[3715] | 13 | #else
|
---|
| 14 | #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
|
---|
| 15 | #endif
|
---|
| 16 |
|
---|
[3683] | 17 | #include "./Param.h"
|
---|
[3775] | 18 | #include "../../include/include.h"
|
---|
[3683] | 19 | #include "../../shared/shared.h"
|
---|
| 20 | /*}}}*/
|
---|
| 21 |
|
---|
| 22 | class StringParam: public Param{
|
---|
| 23 |
|
---|
| 24 | private:
|
---|
| 25 | /*just hold 3 values for 3 vertices: */
|
---|
| 26 | int enum_type;
|
---|
| 27 | char* value;
|
---|
| 28 |
|
---|
| 29 | public:
|
---|
[12365] | 30 | /*StringParam constructors, destructors: {{{*/
|
---|
[3683] | 31 | StringParam();
|
---|
| 32 | StringParam(int enum_type,char* value);
|
---|
| 33 | ~StringParam();
|
---|
| 34 | /*}}}*/
|
---|
[12365] | 35 | /*Object virtual functions definitions:{{{ */
|
---|
[4248] | 36 | void Echo();
|
---|
[3683] | 37 | void DeepEcho();
|
---|
[4248] | 38 | int Id();
|
---|
| 39 | int MyRank();
|
---|
[9883] | 40 | int ObjectEnum();
|
---|
[4248] | 41 | Object* copy();
|
---|
[3683] | 42 | /*}}}*/
|
---|
[12365] | 43 | /*Param vritual function definitions: {{{*/
|
---|
[9883] | 44 | int InstanceEnum(){return enum_type;}
|
---|
[12494] | 45 | void GetParameterValue(bool* pbool){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a bool");}
|
---|
| 46 | void GetParameterValue(int* pinteger){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");}
|
---|
| 47 | void GetParameterValue(int** pintarray,int* pM){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
|
---|
| 48 | void GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
|
---|
| 49 | void GetParameterValue(IssmDouble* pIssmDouble){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
|
---|
[3683] | 50 | void GetParameterValue(char** pstring);
|
---|
[12494] | 51 | void GetParameterValue(char*** pstringarray,int* pM){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string array");}
|
---|
| 52 | void GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
|
---|
| 53 | void GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
|
---|
| 54 | void GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
|
---|
| 55 | void GetParameterValue(Vector** pvec){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Vec");}
|
---|
| 56 | void GetParameterValue(Matrix** pmat){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Mat");}
|
---|
| 57 | void GetParameterValue(FILE** pfid){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
|
---|
[4059] | 58 |
|
---|
[12494] | 59 | void SetValue(bool boolean){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a boolean");}
|
---|
| 60 | void SetValue(int integer){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an integer");}
|
---|
| 61 | void SetValue(IssmDouble scalar){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a scalar");}
|
---|
[4059] | 62 | void SetValue(char* string);
|
---|
[12494] | 63 | void SetValue(char** stringarray,int M){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
|
---|
| 64 | void SetValue(IssmDouble* IssmDoublearray,int M){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
|
---|
| 65 | void SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
|
---|
| 66 | void SetValue(int* intarray,int M){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
|
---|
| 67 | void SetValue(int* pintarray,int M,int N){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
|
---|
| 68 | void SetValue(Vector* vec){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Vec");}
|
---|
| 69 | void SetValue(Matrix* mat){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
|
---|
| 70 | void SetValue(FILE* fid){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
|
---|
| 71 | void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
|
---|
[9356] | 72 | void UnitConversion(int direction_enum);
|
---|
[4059] | 73 |
|
---|
[11202] | 74 | void GetParameterName(char**pname);
|
---|
[3715] | 75 |
|
---|
[3683] | 76 | /*}}}*/
|
---|
| 77 | };
|
---|
| 78 | #endif /* _STRINGPARAM_H */
|
---|