|
Last change
on this file was 25836, checked in by Mathieu Morlighem, 5 years ago |
|
merged trunk-jpl and trunk for revision 25834
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 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 "../classes.h"
|
|---|
| 14 | #include "shared/shared.h"
|
|---|
| 15 | /*}}}*/
|
|---|
| 16 |
|
|---|
| 17 | /*FileParam constructors and destructor*/
|
|---|
| 18 | FileParam::FileParam(){/*{{{*/
|
|---|
| 19 | return;
|
|---|
| 20 | }
|
|---|
| 21 | /*}}}*/
|
|---|
| 22 | FileParam::FileParam(int in_enum_type,FILE* in_value){/*{{{*/
|
|---|
| 23 |
|
|---|
| 24 | enum_type=in_enum_type;
|
|---|
| 25 | value=in_value;
|
|---|
| 26 | }
|
|---|
| 27 | /*}}}*/
|
|---|
| 28 | FileParam::~FileParam(){/*{{{*/
|
|---|
| 29 | return;
|
|---|
| 30 | }
|
|---|
| 31 | /*}}}*/
|
|---|
| 32 |
|
|---|
| 33 | /*Object virtual functions definitions:*/
|
|---|
| 34 | Param* FileParam::copy() {/*{{{*/
|
|---|
| 35 |
|
|---|
| 36 | return new FileParam(this->enum_type,this->value);
|
|---|
| 37 |
|
|---|
| 38 | }
|
|---|
| 39 | /*}}}*/
|
|---|
| 40 | void FileParam::DeepEcho(void){/*{{{*/
|
|---|
| 41 |
|
|---|
| 42 | _printf_(setw(22)<<" FileParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" "<<this->value<<"\n");
|
|---|
| 43 | }
|
|---|
| 44 | /*}}}*/
|
|---|
| 45 | void FileParam::Echo(void){/*{{{*/
|
|---|
| 46 | this->DeepEcho();
|
|---|
| 47 | }
|
|---|
| 48 | /*}}}*/
|
|---|
| 49 | int FileParam::Id(void){ return -1; }/*{{{*/
|
|---|
| 50 | /*}}}*/
|
|---|
| 51 | void FileParam::Marshall(MarshallHandle* marshallhandle){ /*{{{*/
|
|---|
| 52 |
|
|---|
| 53 | int object_enum = FileParamEnum;
|
|---|
| 54 | marshallhandle->call(object_enum);
|
|---|
| 55 |
|
|---|
| 56 | marshallhandle->call(this->enum_type);
|
|---|
| 57 | marshallhandle->call(this->value);
|
|---|
| 58 |
|
|---|
| 59 | if(marshallhandle->OperationNumber()==MARSHALLING_LOAD){
|
|---|
| 60 | this->value=NULL; //meaningless file pointer!
|
|---|
| 61 | }
|
|---|
| 62 |
|
|---|
| 63 | }
|
|---|
| 64 | /*}}}*/
|
|---|
| 65 | int FileParam::ObjectEnum(void){/*{{{*/
|
|---|
| 66 |
|
|---|
| 67 | return FileParamEnum;
|
|---|
| 68 |
|
|---|
| 69 | }
|
|---|
| 70 | /*}}}*/
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.