Changeset 1789


Ignore:
Timestamp:
08/24/09 08:26:14 (15 years ago)
Author:
Mathieu Morlighem
Message:

AnalysisTypeFromEnum generated by SynchronizeEnum script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/EnumDefinitions/SynchronizeMatlabEnum.sh

    r1726 r1789  
    77echo "Synchronizong with Matlab's Enums..."
    88cat EnumDefinitions.cpp | grep "return" | grep "int" | awk '{ printf "line%so %s\n", NR, $0 }' | sed -e "s/(void){//"  > temp
    9 cat <<END > AnalysisTypeAsEnum.m
    10 function string=AnalysisTypeAsEnum(enum)
     9cat <<END > AnalysisTypeFromEnum.m
     10function string=AnalysisTypeFromEnum(enum)
    1111%ANALYSISASENUM - get analysis type from Enum
    1212%
     
    1616%
    1717%   Usage:
    18 %      string=AnalysisTypeAsEnum(enum)
     18%      string=AnalysisTypeFromEnum(enum)
    1919
    2020%initialize output
     
    4747END
    4848
    49         #update AnalysisTypeAsEnum
     49        #update AnalysisTypeFromEnum
    5050        if [ $(echo $NAME | grep AnalysisEnum) ]
    5151        then
    52                 cat <<END >> AnalysisTypeAsEnum.m
     52                cat <<END >> AnalysisTypeFromEnum.m
    5353
    5454if enum==$NAME(),
     
    6363done
    6464
    65 #end of AnalysisTypeAsEnum
    66 cat <<END >> AnalysisTypeAsEnum.m
     65#end of AnalysisTypeFromEnum
     66cat <<END >> AnalysisTypeFromEnum.m
    6767
    6868%check that an analysis type has been found for enum
    6969if strcmp(string,'not found'),
    70         error(['AnalysisTypeAsEnum error message: enum ' num2str(enum) ' not supported!']);
     70        error(['AnalysisTypeFromEnum error message: enum ' num2str(enum) ' not supported!']);
    7171end
    7272END
    7373
    7474#clean up
    75 mv AnalysisTypeAsEnum.m $ISSM_DIR/src/m/enum/
     75mv AnalysisTypeFromEnum.m $ISSM_DIR/src/m/enum/
    7676rm temp
Note: See TracChangeset for help on using the changeset viewer.