00001
00007 #include "cfortran.h"
00008 #include "cpointer.h"
00009
00010 #include <string>
00011 #include <vector>
00012
00013
00014 typedef std::vector<std::string> LCStrVec ;
00015 typedef std::vector<PTRTYPE> PointerVec ;
00016
00017
00018
00019 int lcsvcgetlength(PTRTYPE strvec) ;
00020 char* lcsvcgetstringat(PTRTYPE strvec, int index) ;
00021
00022 int lcivcgetlength(PTRTYPE intvec) ;
00023 int lcivcgetintat(PTRTYPE intvec, int index) ;
00024
00025 int lcfvcgetlength(PTRTYPE floatvec) ;
00026 float lcfvcgetfloatat(PTRTYPE floatvec, int index) ;
00027
00028
00029 int stringvectorgetlength(PTRTYPE strvec) ;
00030 char* stringvectorgetelement(PTRTYPE strvec, int index) ;
00031
00032 int intvectorgetlength(PTRTYPE intvec) ;
00033 int intvectorgetelement(PTRTYPE intvec, int index) ;
00034
00035 int pointervectorgetlength(PTRTYPE intvec) ;
00036 PTRTYPE pointervectorgetelement(PTRTYPE intvec, int index) ;
00037
00038 int floatvectorgetlength(PTRTYPE floatvec) ;
00039 float floatvectorgetelement(PTRTYPE floatvec, int index) ;
00040
00041
00042 extern "C"{
00043
00044 FCALLSCFUN1(INT, lcsvcgetlength, LCSVCGETLENGTH, lcsvcgetlength, CFORTRANPNTR )
00045 FCALLSCFUN2(STRING, lcsvcgetstringat, LCSVCGETSTRINGAT, lcsvcgetstringat, CFORTRANPNTR, INT )
00046
00047 FCALLSCFUN1(INT, lcivcgetlength, LCIVCGETLENGTH, lcivcgetlength, CFORTRANPNTR )
00048 FCALLSCFUN2(INT, lcivcgetintat, LCIVCGETINTAT, lcivcgetintat, CFORTRANPNTR, INT )
00049
00050 FCALLSCFUN1(INT, lcfvcgetlength, LCFVCGETLENGTH, lcfvcgetlength, CFORTRANPNTR )
00051 FCALLSCFUN2(FLOAT, lcfvcgetfloatat, LCFVCGETFLOATAT, lcfvcgetfloatat, CFORTRANPNTR, INT )
00052
00053
00054 FCALLSCFUN1(INT, stringvectorgetlength, STRINGVECTORGETLENGTH, stringvectorgetlength, CFORTRANPNTR )
00055 FCALLSCFUN2(STRING, stringvectorgetelement, STRINGVECTORGETELEMENT, stringvectorgetelement, CFORTRANPNTR, INT )
00056
00057 FCALLSCFUN1(INT, intvectorgetlength, INTVECTORGETLENGTH, intvectorgetlength, CFORTRANPNTR )
00058 FCALLSCFUN2(INT, intvectorgetelement, INTVECTORGETELEMENT, intvectorgetelement, CFORTRANPNTR, INT )
00059
00060 FCALLSCFUN1(INT, pointervectorgetlength, POINTERVECTORGETLENGTH, pointervectorgetlength, CFORTRANPNTR )
00061 FCALLSCFUN2(CFORTRANPNTR, pointervectorgetelement, POINTERVECTORGETELEMENT, pointervectorgetelement, CFORTRANPNTR, INT )
00062
00063 FCALLSCFUN1(INT, floatvectorgetlength, FLOATVECTORGETLENGTH, floatvectorgetlength, CFORTRANPNTR )
00064 FCALLSCFUN2(FLOAT, floatvectorgetelement, FLOATVECTORGETELEMENT, floatvectorgetelement, CFORTRANPNTR, INT )
00065
00066 }
00067