source: issm/trunk-jpl/src/c/classes/objects/Params/IntParam.cpp@ 14960

Last change on this file since 14960 was 14960, checked in by Mathieu Morlighem, 12 years ago

CHG: moved EnumDefinitions to src/c/shared/Enum

File size: 1.7 KB
Line 
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/Enum/Enum.h"
17#include "../../../shared/shared.h"
18#include "../../../Container/Container.h"
19/*}}}*/
20
21/*IntParam constructors and destructor*/
22/*FUNCTION IntParam::IntParam(){{{*/
23IntParam::IntParam(){
24 return;
25}
26/*}}}*/
27/*FUNCTION IntParam::IntParam(int enum_type,IssmInt value){{{*/
28IntParam::IntParam(int in_enum_type,IssmInt in_value){
29
30 enum_type=in_enum_type;
31 value=in_value;
32}
33/*}}}*/
34/*FUNCTION IntParam::~IntParam(){{{*/
35IntParam::~IntParam(){
36 return;
37}
38/*}}}*/
39
40/*Object virtual functions definitions:*/
41/*FUNCTION IntParam::Echo {{{*/
42void IntParam::Echo(void){
43 this->DeepEcho();
44}
45/*}}}*/
46/*FUNCTION IntParam::DeepEcho{{{*/
47void IntParam::DeepEcho(void){
48
49 _printLine_("IntParam:");
50 _printLine_(" enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
51 _printLine_(" value: " << this->value);
52}
53/*}}}*/
54/*FUNCTION IntParam::Id{{{*/
55int IntParam::Id(void){ return -1; }
56/*}}}*/
57/*FUNCTION IntParam::ObjectEnum{{{*/
58int IntParam::ObjectEnum(void){
59
60 return IntParamEnum;
61
62}
63/*}}}*/
64/*FUNCTION IntParam::copy{{{*/
65Object* IntParam::copy() {
66
67 return new IntParam(this->enum_type,this->value);
68
69}
70/*}}}*/
71
72/*IntParam virtual functions definitions: */
73/*FUNCTION IntParam::GetParameterName{{{*/
74void IntParam::GetParameterName(char**pname){
75 EnumToStringx(pname,this->enum_type);
76}
77/*}}}*/
78/*FUNCTION IntParam::UnitConversion{{{*/
79void IntParam::UnitConversion(int direction_enum){
80 /*do nothing, no unit conversion*/
81}
82/*}}}*/
Note: See TracBrowser for help on using the repository browser.