1 | /*!\file IntParam.c
|
---|
2 | * \brief: implementation of the IntParam object
|
---|
3 | */
|
---|
4 |
|
---|
5 | /*header files: */
|
---|
6 | /*{{{*/
|
---|
7 | #ifdef HAVE_CONFIG_H
|
---|
8 | #include <config.h>
|
---|
9 | #else
|
---|
10 | #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
|
---|
11 | #endif
|
---|
12 |
|
---|
13 | #include <stdio.h>
|
---|
14 | #include <string.h>
|
---|
15 | #include "../objects.h"
|
---|
16 | #include "../../../shared/shared.h"
|
---|
17 | /*}}}*/
|
---|
18 |
|
---|
19 | /*IntParam constructors and destructor*/
|
---|
20 | /*FUNCTION IntParam::IntParam(){{{*/
|
---|
21 | IntParam::IntParam(){
|
---|
22 | return;
|
---|
23 | }
|
---|
24 | /*}}}*/
|
---|
25 | /*FUNCTION IntParam::IntParam(int enum_type,IssmInt value){{{*/
|
---|
26 | IntParam::IntParam(int in_enum_type,IssmInt in_value){
|
---|
27 |
|
---|
28 | enum_type=in_enum_type;
|
---|
29 | value=in_value;
|
---|
30 | }
|
---|
31 | /*}}}*/
|
---|
32 | /*FUNCTION IntParam::~IntParam(){{{*/
|
---|
33 | IntParam::~IntParam(){
|
---|
34 | return;
|
---|
35 | }
|
---|
36 | /*}}}*/
|
---|
37 |
|
---|
38 | /*Object virtual functions definitions:*/
|
---|
39 | /*FUNCTION IntParam::Echo {{{*/
|
---|
40 | void IntParam::Echo(void){
|
---|
41 | this->DeepEcho();
|
---|
42 | }
|
---|
43 | /*}}}*/
|
---|
44 | /*FUNCTION IntParam::DeepEcho{{{*/
|
---|
45 | void IntParam::DeepEcho(void){
|
---|
46 |
|
---|
47 | _printLine_("IntParam:");
|
---|
48 | _printLine_(" enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
|
---|
49 | _printLine_(" value: " << this->value);
|
---|
50 | }
|
---|
51 | /*}}}*/
|
---|
52 | /*FUNCTION IntParam::Id{{{*/
|
---|
53 | int IntParam::Id(void){ return -1; }
|
---|
54 | /*}}}*/
|
---|
55 | /*FUNCTION IntParam::ObjectEnum{{{*/
|
---|
56 | int IntParam::ObjectEnum(void){
|
---|
57 |
|
---|
58 | return IntParamEnum;
|
---|
59 |
|
---|
60 | }
|
---|
61 | /*}}}*/
|
---|
62 | /*FUNCTION IntParam::copy{{{*/
|
---|
63 | Object* IntParam::copy() {
|
---|
64 |
|
---|
65 | return new IntParam(this->enum_type,this->value);
|
---|
66 |
|
---|
67 | }
|
---|
68 | /*}}}*/
|
---|
69 |
|
---|
70 | /*IntParam virtual functions definitions: */
|
---|
71 | /*FUNCTION IntParam::GetParameterName{{{*/
|
---|
72 | void IntParam::GetParameterName(char**pname){
|
---|
73 | EnumToStringx(pname,this->enum_type);
|
---|
74 | }
|
---|
75 | /*}}}*/
|
---|
76 | /*FUNCTION IntParam::UnitConversion{{{*/
|
---|
77 | void IntParam::UnitConversion(int direction_enum){
|
---|
78 | /*do nothing, no unit conversion*/
|
---|
79 | }
|
---|
80 | /*}}}*/
|
---|