Ignore:
Timestamp:
06/01/12 17:26:03 (13 years ago)
Author:
Mathieu Morlighem
Message:

merged trunk-jpl and trunk for revision 12326M

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Inputs/DoubleInput.cpp

    r11995 r12330  
    5959}
    6060/*}}}*/
    61 #ifdef _SERIAL_
    62 /*FUNCTION DoubleInput::Marshall{{{1*/
    63 void  DoubleInput::Marshall(char** pmarshalled_dataset){
    64 
    65         char* marshalled_dataset=NULL;
    66         int   enum_value=0;
    67 
    68         /*recover marshalled_dataset: */
    69         marshalled_dataset=*pmarshalled_dataset;
    70 
    71         /*get enum value of DoubleInput: */
    72         enum_value=DoubleInputEnum;
    73        
    74         /*marshall enum: */
    75         memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
    76        
    77         /*marshall DoubleInput data: */
    78         memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
    79         memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
    80 
    81         *pmarshalled_dataset=marshalled_dataset;
    82 }
    83 /*}}}*/
    84 /*FUNCTION DoubleInput::MarshallSize{{{1*/
    85 int   DoubleInput::MarshallSize(){
    86        
    87         return sizeof(value)+
    88                 +sizeof(enum_type)+
    89                 +sizeof(int); //sizeof(int) for enum value
    90 }
    91 /*}}}*/
    92 /*FUNCTION DoubleInput::Demarshall{{{1*/
    93 void  DoubleInput::Demarshall(char** pmarshalled_dataset){
    94 
    95         char* marshalled_dataset=NULL;
    96         int   i;
    97 
    98         /*recover marshalled_dataset: */
    99         marshalled_dataset=*pmarshalled_dataset;
    100 
    101         /*this time, no need to get enum type, the pointer directly points to the beginning of the
    102          *object data (thanks to DataSet::Demarshall):*/
    103         memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
    104         memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
    105 
    106         /*return: */
    107         *pmarshalled_dataset=marshalled_dataset;
    108         return;
    109 }
    110 /*}}}*/
    111 #endif
    11261/*FUNCTION DoubleInput::ObjectEnum{{{1*/
    11362int DoubleInput::ObjectEnum(void){
     
    159108/*FUNCTION DoubleInput::GetInputValue(bool* pvalue) {{{1*/
    160109void DoubleInput::GetInputValue(bool* pvalue){
    161 #ifdef _SERIAL_
    162         *pvalue=(bool)value;
    163 #else
    164110        _error_("Double input of enum %s cannot return a boolean",EnumToStringx(enum_type));
    165 #endif
    166111
    167112}
     
    169114/*FUNCTION DoubleInput::GetInputValue(int* pvalue){{{1*/
    170115void DoubleInput::GetInputValue(int* pvalue){
    171 #ifdef _SERIAL_
    172         *pvalue=(int)value;
    173 #else
    174116        _error_("Double input of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));
    175 #endif
    176117
    177118}
Note: See TracChangeset for help on using the changeset viewer.