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

Last change on this file since 14996 was 14996, checked in by Eric.Larour, 12 years ago

CHG: integrated Container/ directory into src/c/classes/objects directory. No reason to have the containers
and the objects that they contain defined in different places.

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/shared.h"
17/*}}}*/
18
19/*IntParam constructors and destructor*/
20/*FUNCTION IntParam::IntParam(){{{*/
21IntParam::IntParam(){
22 return;
23}
24/*}}}*/
25/*FUNCTION IntParam::IntParam(int enum_type,IssmInt value){{{*/
26IntParam::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(){{{*/
33IntParam::~IntParam(){
34 return;
35}
36/*}}}*/
37
38/*Object virtual functions definitions:*/
39/*FUNCTION IntParam::Echo {{{*/
40void IntParam::Echo(void){
41 this->DeepEcho();
42}
43/*}}}*/
44/*FUNCTION IntParam::DeepEcho{{{*/
45void 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{{{*/
53int IntParam::Id(void){ return -1; }
54/*}}}*/
55/*FUNCTION IntParam::ObjectEnum{{{*/
56int IntParam::ObjectEnum(void){
57
58 return IntParamEnum;
59
60}
61/*}}}*/
62/*FUNCTION IntParam::copy{{{*/
63Object* 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{{{*/
72void IntParam::GetParameterName(char**pname){
73 EnumToStringx(pname,this->enum_type);
74}
75/*}}}*/
76/*FUNCTION IntParam::UnitConversion{{{*/
77void IntParam::UnitConversion(int direction_enum){
78 /*do nothing, no unit conversion*/
79}
80/*}}}*/
Note: See TracBrowser for help on using the repository browser.