Ice Sheet System Model  4.18
Code documentation
Public Member Functions | Private Attributes
DoubleParam Class Reference

#include <DoubleParam.h>

Inheritance diagram for DoubleParam:
Param Object

Public Member Functions

 DoubleParam ()
 
 DoubleParam (int enum_type, IssmDouble value)
 
 ~DoubleParam ()
 
Paramcopy ()
 
void DeepEcho ()
 
void Echo ()
 
int Id ()
 
void Marshall (char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
 
int ObjectEnum ()
 
void GetParameterValue (bool *pbool)
 
void GetParameterValue (int *pinteger)
 
void GetParameterValue (int **pintarray, int *pM)
 
void GetParameterValue (int **pintarray, int *pM, int *pN)
 
void GetParameterValue (IssmDouble *pIssmDouble)
 
void GetParameterValue (IssmDouble *pdouble, IssmDouble time)
 
void GetParameterValue (char **pstring)
 
void GetParameterValue (char ***pstringarray, int *pM)
 
void GetParameterValue (IssmDouble **pIssmDoublearray, int *pM)
 
void GetParameterValue (IssmDouble **pIssmDoublearray, int *pM, int *pN)
 
void GetParameterValue (IssmDouble ***parray, int *pM, int **pmdims, int **pndims)
 
void GetParameterValue (Vector< IssmDouble > **pvec)
 
void GetParameterValue (Matrix< IssmDouble > **pmat)
 
void GetParameterValue (FILE **pfid)
 
void GetParameterValue (DataSet **pdataset)
 
int InstanceEnum ()
 
void SetEnum (int enum_in)
 
void SetValue (bool boolean)
 
void SetValue (int integer)
 
void SetValue (IssmDouble scalar)
 
void SetValue (char *string)
 
void SetValue (char **stringarray, int M)
 
void SetValue (IssmDouble *IssmDoublearray, int M)
 
void SetValue (IssmDouble *pIssmDoublearray, int M, int N)
 
void SetValue (int *intarray, int M)
 
void SetValue (int *pintarray, int M, int N)
 
void SetValue (Vector< IssmDouble > *vec)
 
void SetValue (Matrix< IssmDouble > *mat)
 
void SetValue (FILE *fid)
 
void SetValue (IssmDouble **array, int M, int *mdim_array, int *ndim_array)
 
- Public Member Functions inherited from Param
virtual ~Param ()
 
virtual void GetParameterValue (IssmDouble *pdouble, int row, IssmDouble time)
 
virtual void SetValue (DataSet *dataset)
 
- Public Member Functions inherited from Object
virtual ~Object ()
 

Private Attributes

int enum_type
 
IssmDouble value
 

Detailed Description

Definition at line 20 of file DoubleParam.h.

Constructor & Destructor Documentation

◆ DoubleParam() [1/2]

DoubleParam::DoubleParam ( )

Definition at line 15 of file DoubleParam.cpp.

15  {/*{{{*/
16  return;
17 }

◆ DoubleParam() [2/2]

DoubleParam::DoubleParam ( int  enum_type,
IssmDouble  value 
)

Definition at line 19 of file DoubleParam.cpp.

19  {/*{{{*/
20 
21  enum_type=in_enum_type;
22  value=in_value;
23 }

◆ ~DoubleParam()

DoubleParam::~DoubleParam ( )

Definition at line 25 of file DoubleParam.cpp.

25  {/*{{{*/
26  return;
27 }

Member Function Documentation

◆ copy()

Param * DoubleParam::copy ( void  )
virtual

Implements Param.

Definition at line 31 of file DoubleParam.cpp.

31  {/*{{{*/
32 
33  return new DoubleParam(this->enum_type,this->value);
34 
35 }

◆ DeepEcho()

void DoubleParam::DeepEcho ( void  )
virtual

Implements Param.

Definition at line 37 of file DoubleParam.cpp.

37  {/*{{{*/
38 
39  _printf_(setw(22)<<" DoubleParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" "<<this->value<<"\n");
40 }

◆ Echo()

void DoubleParam::Echo ( void  )
virtual

Implements Param.

Definition at line 42 of file DoubleParam.cpp.

42  {/*{{{*/
43  this->DeepEcho();
44 }

◆ Id()

int DoubleParam::Id ( void  )
virtual

Implements Object.

Definition at line 46 of file DoubleParam.cpp.

46 { return -1; }/*{{{*/

◆ Marshall()

void DoubleParam::Marshall ( char **  pmarshalled_data,
int *  pmarshalled_data_size,
int  marshall_direction 
)
virtual

Implements Param.

Definition at line 48 of file DoubleParam.cpp.

48  { /*{{{*/
49 
51 
54 
55 }

◆ ObjectEnum()

int DoubleParam::ObjectEnum ( void  )
virtual

Implements Param.

Definition at line 57 of file DoubleParam.cpp.

57  {/*{{{*/
58 
59  return DoubleParamEnum;
60 
61 }

◆ GetParameterValue() [1/15]

void DoubleParam::GetParameterValue ( bool *  pbool)
virtual

Implements Param.

Definition at line 69 of file DoubleParam.cpp.

69  {/*{{{*/
70  _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an bool");
71 }

◆ GetParameterValue() [2/15]

void DoubleParam::GetParameterValue ( int *  pinteger)
virtual

Implements Param.

Definition at line 65 of file DoubleParam.cpp.

65  {/*{{{*/
66  _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");
67 }

◆ GetParameterValue() [3/15]

void DoubleParam::GetParameterValue ( int **  pintarray,
int *  pM 
)
virtual

Implements Param.

Definition at line 73 of file DoubleParam.cpp.

73  {/*{{{*/
74  _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");
75 }

◆ GetParameterValue() [4/15]

void DoubleParam::GetParameterValue ( int **  pintarray,
int *  pM,
int *  pN 
)
virtual

Implements Param.

Definition at line 77 of file DoubleParam.cpp.

77  {/*{{{*/
78  _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");
79 }

◆ GetParameterValue() [5/15]

void DoubleParam::GetParameterValue ( IssmDouble pIssmDouble)
inlinevirtual

Implements Param.

Definition at line 46 of file DoubleParam.h.

46 {*pIssmDouble=value;};

◆ GetParameterValue() [6/15]

void DoubleParam::GetParameterValue ( IssmDouble pdouble,
IssmDouble  time 
)
inlinevirtual

Implements Param.

Definition at line 47 of file DoubleParam.h.

47 {*pdouble=value;};

◆ GetParameterValue() [7/15]

void DoubleParam::GetParameterValue ( char **  pstring)
inlinevirtual

Implements Param.

Definition at line 48 of file DoubleParam.h.

48 {_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}

◆ GetParameterValue() [8/15]

void DoubleParam::GetParameterValue ( char ***  pstringarray,
int *  pM 
)
inlinevirtual

Implements Param.

Definition at line 49 of file DoubleParam.h.

49 {_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}

◆ GetParameterValue() [9/15]

void DoubleParam::GetParameterValue ( IssmDouble **  pIssmDoublearray,
int *  pM 
)
virtual

Implements Param.

Definition at line 81 of file DoubleParam.cpp.

81  {/*{{{*/
82  _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of IssmDouble");
83 }

◆ GetParameterValue() [10/15]

void DoubleParam::GetParameterValue ( IssmDouble **  pIssmDoublearray,
int *  pM,
int *  pN 
)
virtual

Implements Param.

Definition at line 85 of file DoubleParam.cpp.

85  {/*{{{*/
86  _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of IssmDouble");
87 }

◆ GetParameterValue() [11/15]

void DoubleParam::GetParameterValue ( IssmDouble ***  parray,
int *  pM,
int **  pmdims,
int **  pndims 
)
inlinevirtual

Implements Param.

Definition at line 52 of file DoubleParam.h.

52 {_error_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}

◆ GetParameterValue() [12/15]

void DoubleParam::GetParameterValue ( Vector< IssmDouble > **  pvec)
inlinevirtual

Implements Param.

Definition at line 53 of file DoubleParam.h.

53 {_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}

◆ GetParameterValue() [13/15]

void DoubleParam::GetParameterValue ( Matrix< IssmDouble > **  pmat)
inlinevirtual

Implements Param.

Definition at line 54 of file DoubleParam.h.

54 {_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}

◆ GetParameterValue() [14/15]

void DoubleParam::GetParameterValue ( FILE **  pfid)
inlinevirtual

Implements Param.

Definition at line 55 of file DoubleParam.h.

55 {_error_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}

◆ GetParameterValue() [15/15]

void DoubleParam::GetParameterValue ( DataSet **  pdataset)
inlinevirtual

Implements Param.

Definition at line 56 of file DoubleParam.h.

56 {_error_("Param "<< EnumToStringx(enum_type) << " cannot return a DataSet");}

◆ InstanceEnum()

int DoubleParam::InstanceEnum ( )
inlinevirtual

Implements Param.

Definition at line 57 of file DoubleParam.h.

57 {return enum_type;}

◆ SetEnum()

void DoubleParam::SetEnum ( int  enum_in)
inlinevirtual

Implements Param.

Definition at line 59 of file DoubleParam.h.

59 {this->enum_type = enum_in;};

◆ SetValue() [1/13]

void DoubleParam::SetValue ( bool  boolean)
inlinevirtual

Implements Param.

Definition at line 60 of file DoubleParam.h.

60 {this->value=(IssmDouble)boolean;}

◆ SetValue() [2/13]

void DoubleParam::SetValue ( int  integer)
inlinevirtual

Implements Param.

Definition at line 61 of file DoubleParam.h.

61 {this->value=(IssmDouble)integer;}

◆ SetValue() [3/13]

void DoubleParam::SetValue ( IssmDouble  scalar)
inlinevirtual

Implements Param.

Definition at line 62 of file DoubleParam.h.

62 {this->value=(IssmDouble)scalar;}

◆ SetValue() [4/13]

void DoubleParam::SetValue ( char *  string)
inlinevirtual

Implements Param.

Definition at line 63 of file DoubleParam.h.

63 {_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}

◆ SetValue() [5/13]

void DoubleParam::SetValue ( char **  stringarray,
int  M 
)
inlinevirtual

Implements Param.

Definition at line 64 of file DoubleParam.h.

64 {_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}

◆ SetValue() [6/13]

void DoubleParam::SetValue ( IssmDouble IssmDoublearray,
int  M 
)
inlinevirtual

Implements Param.

Definition at line 65 of file DoubleParam.h.

65 {_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}

◆ SetValue() [7/13]

void DoubleParam::SetValue ( IssmDouble pIssmDoublearray,
int  M,
int  N 
)
inlinevirtual

Implements Param.

Definition at line 66 of file DoubleParam.h.

66 {_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}

◆ SetValue() [8/13]

void DoubleParam::SetValue ( int *  intarray,
int  M 
)
inlinevirtual

Implements Param.

Definition at line 67 of file DoubleParam.h.

67 {_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}

◆ SetValue() [9/13]

void DoubleParam::SetValue ( int *  pintarray,
int  M,
int  N 
)
inlinevirtual

Implements Param.

Definition at line 68 of file DoubleParam.h.

68 {_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}

◆ SetValue() [10/13]

void DoubleParam::SetValue ( Vector< IssmDouble > *  vec)
inlinevirtual

Implements Param.

Definition at line 69 of file DoubleParam.h.

69 {_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}

◆ SetValue() [11/13]

void DoubleParam::SetValue ( Matrix< IssmDouble > *  mat)
inlinevirtual

Implements Param.

Definition at line 70 of file DoubleParam.h.

70 {_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}

◆ SetValue() [12/13]

void DoubleParam::SetValue ( FILE *  fid)
inlinevirtual

Implements Param.

Definition at line 71 of file DoubleParam.h.

71 {_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}

◆ SetValue() [13/13]

void DoubleParam::SetValue ( IssmDouble **  array,
int  M,
int *  mdim_array,
int *  ndim_array 
)
inlinevirtual

Implements Param.

Definition at line 72 of file DoubleParam.h.

72 {_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}

Field Documentation

◆ enum_type

int DoubleParam::enum_type
private

Definition at line 24 of file DoubleParam.h.

◆ value

IssmDouble DoubleParam::value
private

Definition at line 25 of file DoubleParam.h.


The documentation for this class was generated from the following files:
IssmDouble
double IssmDouble
Definition: types.h:37
_printf_
#define _printf_(StreamArgs)
Definition: Print.h:22
MARSHALLING_ENUM
#define MARSHALLING_ENUM(EN)
Definition: Marshalling.h:14
DoubleParam::DoubleParam
DoubleParam()
Definition: DoubleParam.cpp:15
EnumToStringx
const char * EnumToStringx(int enum_in)
Definition: EnumToStringx.cpp:15
MARSHALLING
#define MARSHALLING(FIELD)
Definition: Marshalling.h:29
DoubleParamEnum
@ DoubleParamEnum
Definition: EnumDefinitions.h:1047
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
DoubleParam::enum_type
int enum_type
Definition: DoubleParam.h:24
DoubleParam::value
IssmDouble value
Definition: DoubleParam.h:25
DoubleParam::DeepEcho
void DeepEcho()
Definition: DoubleParam.cpp:37