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

#include <IntParam.h>

Inheritance diagram for IntParam:
Param Object

Public Member Functions

 IntParam ()
 
 IntParam (int enum_type, IssmInt value)
 
 ~IntParam ()
 
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 (int *intarray, int M)
 
void SetValue (int *intarray, int M, int N)
 
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 (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
 
IssmInt value
 

Detailed Description

Definition at line 20 of file IntParam.h.

Constructor & Destructor Documentation

◆ IntParam() [1/2]

IntParam::IntParam ( )

Definition at line 18 of file IntParam.cpp.

18  {/*{{{*/
19  return;
20 }

◆ IntParam() [2/2]

IntParam::IntParam ( int  enum_type,
IssmInt  value 
)

Definition at line 22 of file IntParam.cpp.

22  {/*{{{*/
23 
24  enum_type=in_enum_type;
25  value=in_value;
26 }

◆ ~IntParam()

IntParam::~IntParam ( )

Definition at line 28 of file IntParam.cpp.

28  {/*{{{*/
29  return;
30 }

Member Function Documentation

◆ copy()

Param * IntParam::copy ( void  )
virtual

Implements Param.

Definition at line 34 of file IntParam.cpp.

34  {/*{{{*/
35 
36  return new IntParam(this->enum_type,this->value);
37 
38 }

◆ DeepEcho()

void IntParam::DeepEcho ( void  )
virtual

Implements Param.

Definition at line 40 of file IntParam.cpp.

40  {/*{{{*/
41 
42  _printf_(setw(22)<<" IntParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" "<<this->value<<"\n");
43 }

◆ Echo()

void IntParam::Echo ( void  )
virtual

Implements Param.

Definition at line 45 of file IntParam.cpp.

45  {/*{{{*/
46  this->DeepEcho();
47 }

◆ Id()

int IntParam::Id ( void  )
virtual

Implements Object.

Definition at line 49 of file IntParam.cpp.

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

◆ Marshall()

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

Implements Param.

Definition at line 51 of file IntParam.cpp.

51  { /*{{{*/
52 
54 
57 
58 }

◆ ObjectEnum()

int IntParam::ObjectEnum ( void  )
virtual

Implements Param.

Definition at line 60 of file IntParam.cpp.

60  {/*{{{*/
61 
62  return IntParamEnum;
63 
64 }

◆ GetParameterValue() [1/15]

void IntParam::GetParameterValue ( bool *  pbool)
inlinevirtual

Implements Param.

Definition at line 42 of file IntParam.h.

42 {_error_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}

◆ GetParameterValue() [2/15]

void IntParam::GetParameterValue ( int *  pinteger)
inlinevirtual

Implements Param.

Definition at line 43 of file IntParam.h.

43 {*pinteger=value;}

◆ GetParameterValue() [3/15]

void IntParam::GetParameterValue ( int **  pintarray,
int *  pM 
)
inlinevirtual

Implements Param.

Definition at line 44 of file IntParam.h.

44 {_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}

◆ GetParameterValue() [4/15]

void IntParam::GetParameterValue ( int **  pintarray,
int *  pM,
int *  pN 
)
inlinevirtual

Implements Param.

Definition at line 45 of file IntParam.h.

45 {_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}

◆ GetParameterValue() [5/15]

void IntParam::GetParameterValue ( IssmDouble pIssmDouble)
inlinevirtual

Implements Param.

Definition at line 46 of file IntParam.h.

46 {_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}

◆ GetParameterValue() [6/15]

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

Implements Param.

Definition at line 47 of file IntParam.h.

47 {_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}

◆ GetParameterValue() [7/15]

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

Implements Param.

Definition at line 48 of file IntParam.h.

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

◆ GetParameterValue() [8/15]

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

Implements Param.

Definition at line 49 of file IntParam.h.

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

◆ GetParameterValue() [9/15]

void IntParam::GetParameterValue ( IssmDouble **  pIssmDoublearray,
int *  pM 
)
inlinevirtual

Implements Param.

Definition at line 50 of file IntParam.h.

50 {_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}

◆ GetParameterValue() [10/15]

void IntParam::GetParameterValue ( IssmDouble **  pIssmDoublearray,
int *  pM,
int *  pN 
)
inlinevirtual

Implements Param.

Definition at line 51 of file IntParam.h.

51 {_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}

◆ GetParameterValue() [11/15]

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

Implements Param.

Definition at line 52 of file IntParam.h.

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

◆ GetParameterValue() [12/15]

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

Implements Param.

Definition at line 53 of file IntParam.h.

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

◆ GetParameterValue() [13/15]

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

Implements Param.

Definition at line 54 of file IntParam.h.

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

◆ GetParameterValue() [14/15]

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

Implements Param.

Definition at line 55 of file IntParam.h.

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

◆ GetParameterValue() [15/15]

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

Implements Param.

Definition at line 56 of file IntParam.h.

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

◆ InstanceEnum()

int IntParam::InstanceEnum ( )
inlinevirtual

Implements Param.

Definition at line 57 of file IntParam.h.

57 {return enum_type;}

◆ SetEnum()

void IntParam::SetEnum ( int  enum_in)
inlinevirtual

Implements Param.

Definition at line 59 of file IntParam.h.

59 {this->enum_type = enum_in;};

◆ SetValue() [1/13]

void IntParam::SetValue ( bool  boolean)
inlinevirtual

Implements Param.

Definition at line 60 of file IntParam.h.

60 {_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a bool");}

◆ SetValue() [2/13]

void IntParam::SetValue ( int  integer)
inlinevirtual

Implements Param.

Definition at line 61 of file IntParam.h.

61 {this->value=integer;}

◆ SetValue() [3/13]

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

Implements Param.

Definition at line 62 of file IntParam.h.

62 {_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an int array");}

◆ SetValue() [4/13]

void IntParam::SetValue ( int *  intarray,
int  M,
int  N 
)
inlinevirtual

Implements Param.

Definition at line 63 of file IntParam.h.

63 {_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an int array");}

◆ SetValue() [5/13]

void IntParam::SetValue ( IssmDouble  scalar)
inlinevirtual

Implements Param.

Definition at line 64 of file IntParam.h.

64 {_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an IssmDouble");}

◆ SetValue() [6/13]

void IntParam::SetValue ( char *  string)
inlinevirtual

Implements Param.

Definition at line 65 of file IntParam.h.

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

◆ SetValue() [7/13]

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

Implements Param.

Definition at line 66 of file IntParam.h.

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

◆ SetValue() [8/13]

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

Implements Param.

Definition at line 67 of file IntParam.h.

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

◆ SetValue() [9/13]

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

Implements Param.

Definition at line 68 of file IntParam.h.

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

◆ SetValue() [10/13]

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

Implements Param.

Definition at line 69 of file IntParam.h.

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

◆ SetValue() [11/13]

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

Implements Param.

Definition at line 70 of file IntParam.h.

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

◆ SetValue() [12/13]

void IntParam::SetValue ( FILE *  fid)
inlinevirtual

Implements Param.

Definition at line 71 of file IntParam.h.

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

◆ SetValue() [13/13]

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

Implements Param.

Definition at line 72 of file IntParam.h.

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

Field Documentation

◆ enum_type

int IntParam::enum_type
private

Definition at line 24 of file IntParam.h.

◆ value

IssmInt IntParam::value
private

Definition at line 25 of file IntParam.h.


The documentation for this class was generated from the following files:
_printf_
#define _printf_(StreamArgs)
Definition: Print.h:22
IntParam::value
IssmInt value
Definition: IntParam.h:25
MARSHALLING_ENUM
#define MARSHALLING_ENUM(EN)
Definition: Marshalling.h:14
IntParamEnum
@ IntParamEnum
Definition: EnumDefinitions.h:1128
IntParam::enum_type
int enum_type
Definition: IntParam.h:24
IntParam::IntParam
IntParam()
Definition: IntParam.cpp:18
EnumToStringx
const char * EnumToStringx(int enum_in)
Definition: EnumToStringx.cpp:15
MARSHALLING
#define MARSHALLING(FIELD)
Definition: Marshalling.h:29
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
IntParam::DeepEcho
void DeepEcho()
Definition: IntParam.cpp:40