Ice Sheet System Model  4.18
Code documentation
Public Member Functions | Data Fields | Private Attributes
DataSetParam Class Reference

#include <DataSetParam.h>

Inheritance diagram for DataSetParam:
Param Object

Public Member Functions

 DataSetParam ()
 
 DataSetParam (int enum_type, DataSet *dataset)
 
 ~DataSetParam ()
 
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 (FILE **pfile)
 
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 (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 (FILE *fid)
 
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 (DataSet *dataset)
 
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)
 
- Public Member Functions inherited from Object
virtual ~Object ()
 

Data Fields

DataSetvalue
 

Private Attributes

int enum_type
 

Detailed Description

Definition at line 20 of file DataSetParam.h.

Constructor & Destructor Documentation

◆ DataSetParam() [1/2]

DataSetParam::DataSetParam ( )

Definition at line 18 of file DataSetParam.cpp.

18  {/*{{{*/
19  value=NULL;
20  return;
21 }

◆ DataSetParam() [2/2]

DataSetParam::DataSetParam ( int  enum_type,
DataSet dataset 
)

Definition at line 23 of file DataSetParam.cpp.

23  {/*{{{*/
24 
25  enum_type=in_enum_type;
26  value=in_value->Copy();
27 }

◆ ~DataSetParam()

DataSetParam::~DataSetParam ( )

Definition at line 29 of file DataSetParam.cpp.

29  {/*{{{*/
30  delete value;
31 }

Member Function Documentation

◆ copy()

Param * DataSetParam::copy ( void  )
virtual

Implements Param.

Definition at line 35 of file DataSetParam.cpp.

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

◆ DeepEcho()

void DataSetParam::DeepEcho ( void  )
virtual

Implements Param.

Definition at line 41 of file DataSetParam.cpp.

41  {/*{{{*/
42 
43  _printf_(setw(22)<<" DataSetParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" ----- begin\n");
44  this->value->Echo();
45  _printf_(setw(22)<<" DataSetParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" ----- end\n");
46 }

◆ Echo()

void DataSetParam::Echo ( void  )
virtual

Implements Param.

Definition at line 48 of file DataSetParam.cpp.

48  {/*{{{*/
49  this->DeepEcho();
50 }

◆ Id()

int DataSetParam::Id ( void  )
virtual

Implements Object.

Definition at line 52 of file DataSetParam.cpp.

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

◆ Marshall()

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

Implements Param.

Definition at line 54 of file DataSetParam.cpp.

54  { /*{{{*/
55 
56  if(marshall_direction==MARSHALLING_BACKWARD)value=new DataSet();
57 
60  value->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
61 
62 }

◆ ObjectEnum()

int DataSetParam::ObjectEnum ( void  )
virtual

Implements Param.

Definition at line 64 of file DataSetParam.cpp.

64  {/*{{{*/
65 
66  return DataSetParamEnum;
67 
68 }

◆ GetParameterValue() [1/15]

void DataSetParam::GetParameterValue ( bool *  pbool)
inlinevirtual

Implements Param.

Definition at line 42 of file DataSetParam.h.

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

◆ GetParameterValue() [2/15]

void DataSetParam::GetParameterValue ( int *  pinteger)
inlinevirtual

Implements Param.

Definition at line 43 of file DataSetParam.h.

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

◆ GetParameterValue() [3/15]

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

Implements Param.

Definition at line 44 of file DataSetParam.h.

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

◆ GetParameterValue() [4/15]

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

Implements Param.

Definition at line 45 of file DataSetParam.h.

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

◆ GetParameterValue() [5/15]

void DataSetParam::GetParameterValue ( IssmDouble pIssmDouble)
inlinevirtual

Implements Param.

Definition at line 46 of file DataSetParam.h.

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

◆ GetParameterValue() [6/15]

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

Implements Param.

Definition at line 47 of file DataSetParam.h.

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

◆ GetParameterValue() [7/15]

void DataSetParam::GetParameterValue ( FILE **  pfile)
inlinevirtual

Implements Param.

Definition at line 48 of file DataSetParam.h.

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

◆ GetParameterValue() [8/15]

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

Implements Param.

Definition at line 49 of file DataSetParam.h.

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

◆ GetParameterValue() [9/15]

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

Implements Param.

Definition at line 50 of file DataSetParam.h.

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

◆ GetParameterValue() [10/15]

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

Implements Param.

Definition at line 51 of file DataSetParam.h.

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

◆ GetParameterValue() [11/15]

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

Implements Param.

Definition at line 52 of file DataSetParam.h.

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

◆ GetParameterValue() [12/15]

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

Implements Param.

Definition at line 53 of file DataSetParam.h.

53 {_error_("DataSet param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}

◆ GetParameterValue() [13/15]

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

Implements Param.

Definition at line 54 of file DataSetParam.h.

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

◆ GetParameterValue() [14/15]

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

Implements Param.

Definition at line 55 of file DataSetParam.h.

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

◆ GetParameterValue() [15/15]

void DataSetParam::GetParameterValue ( DataSet **  pdataset)
virtual

Implements Param.

Definition at line 72 of file DataSetParam.cpp.

72  {/*{{{*/
73  *pdataset=value->Copy();
74 }

◆ InstanceEnum()

int DataSetParam::InstanceEnum ( )
inlinevirtual

Implements Param.

Definition at line 57 of file DataSetParam.h.

57 {return enum_type;}

◆ SetEnum()

void DataSetParam::SetEnum ( int  enum_in)
inlinevirtual

Implements Param.

Definition at line 59 of file DataSetParam.h.

59 {this->enum_type = enum_in;};

◆ SetValue() [1/14]

void DataSetParam::SetValue ( bool  boolean)
inlinevirtual

Implements Param.

Definition at line 60 of file DataSetParam.h.

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

◆ SetValue() [2/14]

void DataSetParam::SetValue ( int  integer)
inlinevirtual

Implements Param.

Definition at line 61 of file DataSetParam.h.

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

◆ SetValue() [3/14]

void DataSetParam::SetValue ( IssmDouble  scalar)
inlinevirtual

Implements Param.

Definition at line 62 of file DataSetParam.h.

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

◆ SetValue() [4/14]

void DataSetParam::SetValue ( char *  string)
inlinevirtual

Implements Param.

Definition at line 63 of file DataSetParam.h.

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

◆ SetValue() [5/14]

void DataSetParam::SetValue ( FILE *  fid)
inlinevirtual

Implements Param.

Definition at line 64 of file DataSetParam.h.

64 {_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a file pointer");}

◆ SetValue() [6/14]

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

Implements Param.

Definition at line 65 of file DataSetParam.h.

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

◆ SetValue() [7/14]

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

Implements Param.

Definition at line 66 of file DataSetParam.h.

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

◆ SetValue() [8/14]

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

Implements Param.

Definition at line 67 of file DataSetParam.h.

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

◆ SetValue() [9/14]

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

Implements Param.

Definition at line 68 of file DataSetParam.h.

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

◆ SetValue() [10/14]

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

Implements Param.

Definition at line 69 of file DataSetParam.h.

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

◆ SetValue() [11/14]

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

Implements Param.

Definition at line 70 of file DataSetParam.h.

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

◆ SetValue() [12/14]

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

Implements Param.

Definition at line 71 of file DataSetParam.h.

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

◆ SetValue() [13/14]

void DataSetParam::SetValue ( DataSet dataset)
virtual

Reimplemented from Param.

Definition at line 76 of file DataSetParam.cpp.

76  {/*{{{*/
77  this->value=dataset;
78 }

◆ SetValue() [14/14]

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

Implements Param.

Definition at line 73 of file DataSetParam.h.

73 {_error_("DataSet param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}

Field Documentation

◆ enum_type

int DataSetParam::enum_type
private

Definition at line 23 of file DataSetParam.h.

◆ value

DataSet* DataSetParam::value

Definition at line 26 of file DataSetParam.h.


The documentation for this class was generated from the following files:
_printf_
#define _printf_(StreamArgs)
Definition: Print.h:22
MARSHALLING_ENUM
#define MARSHALLING_ENUM(EN)
Definition: Marshalling.h:14
DataSetParam::DataSetParam
DataSetParam()
Definition: DataSetParam.cpp:18
DataSetParam::enum_type
int enum_type
Definition: DataSetParam.h:23
EnumToStringx
const char * EnumToStringx(int enum_in)
Definition: EnumToStringx.cpp:15
DataSetParam::DeepEcho
void DeepEcho()
Definition: DataSetParam.cpp:41
DataSet::Echo
void Echo()
Definition: DataSet.cpp:307
MARSHALLING
#define MARSHALLING(FIELD)
Definition: Marshalling.h:29
DataSetParam::value
DataSet * value
Definition: DataSetParam.h:26
MARSHALLING_BACKWARD
@ MARSHALLING_BACKWARD
Definition: Marshalling.h:10
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
DataSetParamEnum
@ DataSetParamEnum
Definition: EnumDefinitions.h:1029
DataSet::Copy
DataSet * Copy(void)
Definition: DataSet.cpp:49
DataSet
Declaration of DataSet class.
Definition: DataSet.h:14
DataSet::Marshall
void Marshall(char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
Definition: DataSet.cpp:93