Ice Sheet System Model  4.18
Code documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Data Fields
IoConstant Class Reference

#include <IoModel.h>

Public Member Functions

 ~IoConstant ()
 
 IoConstant ()
 
 IoConstant (bool value, const char *name_in)
 
 IoConstant (int value, const char *name_in)
 
 IoConstant (IssmDouble value, const char *name_in)
 
 IoConstant (char *value, const char *name_in)
 
 IoConstant (char **value, int numstrings, const char *name_in)
 

Data Fields

Paramconstant
 
bool isindependent
 
char * name
 

Detailed Description

Definition at line 19 of file IoModel.h.

Constructor & Destructor Documentation

◆ ~IoConstant()

IoConstant::~IoConstant ( )

Definition at line 42 of file IoModel.cpp.

42  {/*{{{*/
43  xDelete<char>(this->name);
44  delete this->constant;
45 }

◆ IoConstant() [1/6]

IoConstant::IoConstant ( )

Definition at line 36 of file IoModel.cpp.

36  {/*{{{*/
37  this->isindependent = false;
38  this->name = NULL;
39  this->constant = NULL;
40 }

◆ IoConstant() [2/6]

IoConstant::IoConstant ( bool  value,
const char *  name_in 
)

Definition at line 47 of file IoModel.cpp.

47  {/*{{{*/
48  this->isindependent = false;
49  this->constant = new BoolParam(0,value);
50 
51  _assert_(name_in);
52  int len=strlen(name_in);
53  this->name=xNew<char>(len+1);
54  memcpy(this->name,name_in,(len+1)*sizeof(char));
55 }

◆ IoConstant() [3/6]

IoConstant::IoConstant ( int  value,
const char *  name_in 
)

Definition at line 57 of file IoModel.cpp.

57  {/*{{{*/
58  this->isindependent = false;
59  this->constant = new IntParam(0,value);
60 
61  _assert_(name_in);
62  int len=strlen(name_in);
63  this->name=xNew<char>(len+1);
64  memcpy(this->name,name_in,(len+1)*sizeof(char));
65 }

◆ IoConstant() [4/6]

IoConstant::IoConstant ( IssmDouble  value,
const char *  name_in 
)

Definition at line 67 of file IoModel.cpp.

67  {/*{{{*/
68  this->isindependent = false;
69  this->constant = new DoubleParam(0,value);
70 
71  _assert_(name_in);
72  int len=strlen(name_in);
73  this->name=xNew<char>(len+1);
74  memcpy(this->name,name_in,(len+1)*sizeof(char));
75 }

◆ IoConstant() [5/6]

IoConstant::IoConstant ( char *  value,
const char *  name_in 
)

Definition at line 77 of file IoModel.cpp.

77  {/*{{{*/
78  this->isindependent = false;
79  this->constant = new StringParam(0,value);
80 
81  _assert_(name_in);
82  int len=strlen(name_in);
83  this->name=xNew<char>(len+1);
84  memcpy(this->name,name_in,(len+1)*sizeof(char));
85 }

◆ IoConstant() [6/6]

IoConstant::IoConstant ( char **  value,
int  numstrings,
const char *  name_in 
)

Definition at line 87 of file IoModel.cpp.

87  {/*{{{*/
88  this->isindependent = false;
89  this->constant = new StringArrayParam(0,value,numstrings);
90 
91  _assert_(name_in);
92  int len=strlen(name_in);
93  this->name=xNew<char>(len+1);
94  memcpy(this->name,name_in,(len+1)*sizeof(char));
95 }

Field Documentation

◆ constant

Param* IoConstant::constant

Definition at line 21 of file IoModel.h.

◆ isindependent

bool IoConstant::isindependent

Definition at line 22 of file IoModel.h.

◆ name

char* IoConstant::name

Definition at line 23 of file IoModel.h.


The documentation for this class was generated from the following files:
_assert_
#define _assert_(ignore)
Definition: exceptions.h:37
IoConstant::constant
Param * constant
Definition: IoModel.h:21
DoubleParam
Definition: DoubleParam.h:20
StringArrayParam
Definition: StringArrayParam.h:20
IntParam
Definition: IntParam.h:20
StringParam
Definition: StringParam.h:20
BoolParam
Definition: BoolParam.h:20
IoConstant::name
char * name
Definition: IoModel.h:23
IoConstant::isindependent
bool isindependent
Definition: IoModel.h:22