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
|
Rev | Line | |
---|
[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] | 18 | FileParam::FileParam(){/*{{{*/
|
---|
[4874] | 19 | return;
|
---|
| 20 | }
|
---|
| 21 | /*}}}*/
|
---|
[18301] | 22 | FileParam::FileParam(int in_enum_type,FILE* in_value){/*{{{*/
|
---|
[4874] | 23 |
|
---|
| 24 | enum_type=in_enum_type;
|
---|
| 25 | value=in_value;
|
---|
| 26 | }
|
---|
| 27 | /*}}}*/
|
---|
[18301] | 28 | FileParam::~FileParam(){/*{{{*/
|
---|
[4874] | 29 | return;
|
---|
| 30 | }
|
---|
| 31 | /*}}}*/
|
---|
| 32 |
|
---|
| 33 | /*Object virtual functions definitions:*/
|
---|
[21341] | 34 | Param* FileParam::copy() {/*{{{*/
|
---|
| 35 |
|
---|
| 36 | return new FileParam(this->enum_type,this->value);
|
---|
| 37 |
|
---|
[4874] | 38 | }
|
---|
| 39 | /*}}}*/
|
---|
[18301] | 40 | void 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] | 45 | void FileParam::Echo(void){/*{{{*/
|
---|
| 46 | this->DeepEcho();
|
---|
[4874] | 47 | }
|
---|
| 48 | /*}}}*/
|
---|
[21341] | 49 | int FileParam::Id(void){ return -1; }/*{{{*/
|
---|
[4874] | 50 | /*}}}*/
|
---|
[25836] | 51 | void 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] | 65 | int FileParam::ObjectEnum(void){/*{{{*/
|
---|
| 66 |
|
---|
| 67 | return FileParamEnum;
|
---|
| 68 |
|
---|
| 69 | }
|
---|
| 70 | /*}}}*/
|
---|
Note:
See
TracBrowser
for help on using the repository browser.