|
Last change
on this file since 20500 was 20500, checked in by Mathieu Morlighem, 10 years ago |
|
merged trunk-jpl and trunk for revision 20497
|
|
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 | void FileParam::Echo(void){/*{{{*/
|
|---|
| 35 | this->DeepEcho();
|
|---|
| 36 | }
|
|---|
| 37 | /*}}}*/
|
|---|
| 38 | void FileParam::DeepEcho(void){/*{{{*/
|
|---|
| 39 |
|
|---|
| 40 | _printf_(setw(22)<<" FileParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" "<<this->value<<"\n");
|
|---|
| 41 | }
|
|---|
| 42 | /*}}}*/
|
|---|
| 43 | int FileParam::Id(void){ return -1; }/*{{{*/
|
|---|
| 44 | /*}}}*/
|
|---|
| 45 | int FileParam::ObjectEnum(void){/*{{{*/
|
|---|
| 46 |
|
|---|
| 47 | return FileParamEnum;
|
|---|
| 48 |
|
|---|
| 49 | }
|
|---|
| 50 | /*}}}*/
|
|---|
| 51 | Object* FileParam::copy() {/*{{{*/
|
|---|
| 52 |
|
|---|
| 53 | return new FileParam(this->enum_type,this->value);
|
|---|
| 54 |
|
|---|
| 55 | }
|
|---|
| 56 | /*}}}*/
|
|---|
| 57 | void FileParam::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/
|
|---|
| 58 |
|
|---|
| 59 | MARSHALLING_ENUM(FileParamEnum);
|
|---|
| 60 | MARSHALLING(enum_type);
|
|---|
| 61 | MARSHALLING(value);
|
|---|
| 62 |
|
|---|
| 63 | if(marshall_direction==MARSHALLING_BACKWARD) value=NULL; //meaningless file pointer!
|
|---|
| 64 |
|
|---|
| 65 | }
|
|---|
| 66 | /*}}}*/
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.