1 | /*!\file FileParam.c
|
---|
2 | * \brief: implementation of the FileParam 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 "../../EnumDefinitions/EnumDefinitions.h"
|
---|
17 | #include "../../shared/shared.h"
|
---|
18 | #include "../../Container/Container.h"
|
---|
19 | #include "../../include/include.h"
|
---|
20 | /*}}}*/
|
---|
21 |
|
---|
22 | /*FileParam constructors and destructor*/
|
---|
23 | /*FUNCTION FileParam::FileParam(){{{*/
|
---|
24 | FileParam::FileParam(){
|
---|
25 | return;
|
---|
26 | }
|
---|
27 | /*}}}*/
|
---|
28 | /*FUNCTION FileParam::FileParam(int enum_type,FILE *value){{{*/
|
---|
29 | FileParam::FileParam(int in_enum_type,FILE* in_value){
|
---|
30 |
|
---|
31 | enum_type=in_enum_type;
|
---|
32 | value=in_value;
|
---|
33 | }
|
---|
34 | /*}}}*/
|
---|
35 | /*FUNCTION FileParam::~FileParam(){{{*/
|
---|
36 | FileParam::~FileParam(){
|
---|
37 | return;
|
---|
38 | }
|
---|
39 | /*}}}*/
|
---|
40 |
|
---|
41 | /*Object virtual functions definitions:*/
|
---|
42 | /*FUNCTION FileParam::Echo {{{*/
|
---|
43 | void FileParam::Echo(void){
|
---|
44 | this->DeepEcho();
|
---|
45 | }
|
---|
46 | /*}}}*/
|
---|
47 | /*FUNCTION FileParam::DeepEcho{{{*/
|
---|
48 | void FileParam::DeepEcho(void){
|
---|
49 |
|
---|
50 | _printLine_("FileParam:");
|
---|
51 | _printLine_(" enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
|
---|
52 | _printLine_(" value: " << this->value);
|
---|
53 | }
|
---|
54 | /*}}}*/
|
---|
55 | /*FUNCTION FileParam::Id{{{*/
|
---|
56 | int FileParam::Id(void){ return -1; }
|
---|
57 | /*}}}*/
|
---|
58 | /*FUNCTION FileParam::MyRank{{{*/
|
---|
59 | int FileParam::MyRank(void){
|
---|
60 | extern int my_rank;
|
---|
61 | return my_rank;
|
---|
62 | }
|
---|
63 | /*}}}*/
|
---|
64 | /*FUNCTION FileParam::ObjectEnum{{{*/
|
---|
65 | int FileParam::ObjectEnum(void){
|
---|
66 |
|
---|
67 | return FileParamEnum;
|
---|
68 |
|
---|
69 | }
|
---|
70 | /*}}}*/
|
---|
71 | /*FUNCTION FileParam::copy{{{*/
|
---|
72 | Object* FileParam::copy() {
|
---|
73 |
|
---|
74 | return new FileParam(this->enum_type,this->value);
|
---|
75 |
|
---|
76 | }
|
---|
77 | /*}}}*/
|
---|
78 |
|
---|
79 | /*FileParam virtual functions definitions: */
|
---|
80 | /*FUNCTION FileParam::GetParameterName{{{*/
|
---|
81 | void FileParam::GetParameterName(char**pname){
|
---|
82 | EnumToStringx(pname,this->enum_type);
|
---|
83 | }
|
---|
84 | /*}}}*/
|
---|
85 | /*FUNCTION FileParam::UnitConversion{{{*/
|
---|
86 | void FileParam::UnitConversion(int direction_enum){
|
---|
87 | /*do nothing, no unit conversion*/
|
---|
88 | }
|
---|
89 | /*}}}*/
|
---|