Changeset 3888


Ignore:
Timestamp:
05/21/10 14:56:52 (15 years ago)
Author:
seroussi
Message:

added GetParameterValue for a Bool

Location:
issm/trunk/src/c/objects/Params
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Params/DoubleParam.cpp

    r3842 r3888  
    137137}
    138138/*}}}*/
     139/*FUNCTION DoubleParam::GetParameterValue(bool* pbool) {{{1*/
     140void DoubleParam::GetParameterValue(bool* pbool){
     141#ifdef _SERIAL_
     142
     143        /*If debugging mode, cheeck that the double is 0 or 1*/
     144        ISSMASSERT(value==0 || value==1);
     145        *pbool=(bool)value;
     146
     147#else
     148        ISSMERROR("Double param of enum %i (%s) cannot return an bool",enum_type,EnumAsString(enum_type));
     149#endif
     150}
     151/*}}}*/
    139152
    140153/*FUNCTION DoubleParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
  • issm/trunk/src/c/objects/Params/DoubleParam.h

    r3842 r3888  
    6363                /*Param methods: {{{1*/
    6464                int   EnumType(){return enum_type;}
    65                 void  GetParameterValue(bool* pbool){ISSMERROR("Double param of enum %i (%s) cannot return a bool",enum_type,EnumAsString(enum_type));}
     65                void  GetParameterValue(bool* pbool);
    6666                void  GetParameterValue(int* pinteger);
    6767                void  GetParameterValue(double* pdouble){*pdouble=value;}
Note: See TracChangeset for help on using the changeset viewer.