source: issm/trunk/src/c/classes/Params/FileParam.cpp

Last change on this file was 25836, checked in by Mathieu Morlighem, 4 years ago

merged trunk-jpl and trunk for revision 25834

File size: 1.3 KB
RevLine 
[4874]1/*!\file FileParam.c
2 * \brief: implementation of the FileParam object
3 */
4
5/*header files: */
[12365]6/*{{{*/
[4874]7#ifdef HAVE_CONFIG_H
[9320]8 #include <config.h>
[4874]9#else
10#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
11#endif
12
[15012]13#include "../classes.h"
14#include "shared/shared.h"
[4874]15/*}}}*/
16
17/*FileParam constructors and destructor*/
[18301]18FileParam::FileParam(){/*{{{*/
[4874]19 return;
20}
21/*}}}*/
[18301]22FileParam::FileParam(int in_enum_type,FILE* in_value){/*{{{*/
[4874]23
24 enum_type=in_enum_type;
25 value=in_value;
26}
27/*}}}*/
[18301]28FileParam::~FileParam(){/*{{{*/
[4874]29 return;
30}
31/*}}}*/
32
33/*Object virtual functions definitions:*/
[21341]34Param* FileParam::copy() {/*{{{*/
35
36 return new FileParam(this->enum_type,this->value);
37
[4874]38}
39/*}}}*/
[18301]40void FileParam::DeepEcho(void){/*{{{*/
[4874]41
[17806]42 _printf_(setw(22)<<" FileParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" "<<this->value<<"\n");
[4874]43}
44/*}}}*/
[21341]45void FileParam::Echo(void){/*{{{*/
46 this->DeepEcho();
[4874]47}
48/*}}}*/
[21341]49int FileParam::Id(void){ return -1; }/*{{{*/
[4874]50/*}}}*/
[25836]51void FileParam::Marshall(MarshallHandle* marshallhandle){ /*{{{*/
[20500]52
[25836]53 int object_enum = FileParamEnum;
54 marshallhandle->call(object_enum);
[20500]55
[25836]56 marshallhandle->call(this->enum_type);
57 marshallhandle->call(this->value);
[20500]58
[25836]59 if(marshallhandle->OperationNumber()==MARSHALLING_LOAD){
60 this->value=NULL; //meaningless file pointer!
61 }
62
[20500]63}
64/*}}}*/
[21341]65int FileParam::ObjectEnum(void){/*{{{*/
66
67 return FileParamEnum;
68
69}
70/*}}}*/
Note: See TracBrowser for help on using the repository browser.