Changeset 84 for trunk/include/fortran
- Timestamp:
- Oct 5, 2005 1:21:24 PM (17 years ago)
- Location:
- trunk/include/fortran
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/fortran/RpLibraryFInterface.h
r83 r84 15 15 #include <fstream> 16 16 #include "RpFortranCommon.h" 17 #include "RpLibraryFStubs.h" 17 18 18 /* 19 // rappture-fortran api 20 */ 21 22 #ifdef __cplusplus 19 #ifdef __cplusplus 23 20 extern "C" { 24 21 #endif 25 26 #ifdef COMPNAME_ADD1UNDERSCORE27 # define rp_init rp_init_28 # define rp_lib rp_lib_29 # define rp_lib_element_comp rp_lib_element_comp_30 # define rp_lib_element_id rp_lib_element_id_31 # define rp_lib_element_type rp_lib_element_type_32 # define rp_lib_element_obj rp_lib_element_obj_33 # define rp_lib_child_num rp_lib_child_num_34 # define rp_lib_child_comp rp_lib_child_comp_35 # define rp_lib_child_id rp_lib_child_id_36 # define rp_lib_child_type rp_lib_child_type_37 # define rp_lib_child_obj rp_lib_child_obj_38 # define rp_lib_get rp_lib_get_39 # define rp_lib_get_double rp_lib_get_double_40 # define rp_lib_put_str rp_lib_put_str_41 # define rp_lib_put_id_str rp_lib_put_id_str_42 # define rp_lib_put_obj rp_lib_put_obj_43 # define rp_lib_put_id_obj rp_lib_put_id_obj_44 # define rp_lib_remove rp_lib_remove_45 # define rp_lib_xml_len rp_lib_xml_len_46 # define rp_lib_write_xml rp_lib_write_xml_47 # define rp_lib_xml rp_lib_xml_48 # define rp_lib_node_comp rp_lib_node_comp_49 # define rp_lib_node_type rp_lib_node_type_50 # define rp_lib_node_id rp_lib_node_id_51 # define rp_result rp_result_52 # define rp_quit rp_quit_53 #elif defined(COMPNAME_ADD2UNDERSCORE)54 # define rp_init rp_init__55 # define rp_lib rp_lib__56 # define rp_lib_element_comp rp_lib_element_comp__57 # define rp_lib_element_id rp_lib_element_id__58 # define rp_lib_element_type rp_lib_element_type__59 # define rp_lib_element_obj rp_lib_element_obj__60 # define rp_lib_child_num rp_lib_child_num__61 # define rp_lib_child_comp rp_lib_child_comp__62 # define rp_lib_child_id rp_lib_child_id__63 # define rp_lib_child_type rp_lib_child_type__64 # define rp_lib_child_obj rp_lib_child_obj__65 # define rp_lib_get rp_lib_get__66 # define rp_lib_get_double rp_lib_get_double__67 # define rp_lib_put_str rp_lib_put_str__68 # define rp_lib_put_id_str rp_lib_put_id_str__69 # define rp_lib_put_obj rp_lib_put_obj__70 # define rp_lib_put_id_obj rp_lib_put_id_obj__71 # define rp_lib_remove rp_lib_remove__72 # define rp_lib_xml_len rp_lib_xml_len__73 # define rp_lib_write_xml rp_lib_write_xml__74 # define rp_lib_xml rp_lib_xml__75 # define rp_lib_node_comp rp_lib_node_comp__76 # define rp_lib_node_type rp_lib_node_type__77 # define rp_lib_node_id rp_lib_node_id__78 # define rp_result rp_result__79 # define rp_quit rp_quit__80 #elif defined(COMPNAME_NOCHANGE)81 # define rp_init rp_init82 # define rp_lib rp_lib83 # define rp_lib_element_comp rp_lib_element_comp84 # define rp_lib_element_id rp_lib_element_id85 # define rp_lib_element_type rp_lib_element_type86 # define rp_lib_element_obj rp_lib_element_obj87 # define rp_lib_child_num rp_lib_child_num88 # define rp_lib_child_comp rp_lib_child_comp89 # define rp_lib_child_id rp_lib_child_id90 # define rp_lib_child_type rp_lib_child_type91 # define rp_lib_child_obj rp_lib_child_obj92 # define rp_lib_get rp_lib_get93 # define rp_lib_get_double rp_lib_get_double94 # define rp_lib_put_str rp_lib_put_str95 # define rp_lib_put_id_str rp_lib_put_id_str96 # define rp_lib_put_obj rp_lib_put_obj97 # define rp_lib_put_id_obj rp_lib_put_id_obj98 # define rp_lib_remove rp_lib_remove99 # define rp_lib_xml_len rp_lib_xml_len100 # define rp_lib_write_xml rp_lib_write_xml101 # define rp_lib_xml rp_lib_xml102 # define rp_lib_node_comp rp_lib_node_comp103 # define rp_lib_node_type rp_lib_node_type104 # define rp_lib_node_id rp_lib_node_id105 # define rp_result rp_result106 # define rp_quit rp_quit107 #elif defined(COMPNAME_UPPERCASE)108 # define rp_init RP_INIT109 # define rp_lib RP_LIB110 # define rp_lib_element_comp RP_LIB_ELEMENT_COMP111 # define rp_lib_element_id RP_LIB_ELEMENT_ID112 # define rp_lib_element_type RP_LIB_ELEMENT_TYPE113 # define rp_lib_element_obj RP_LIB_ELEMENT_OBJ114 # define rp_lib_child_num RP_LIB_CHILD_NUM115 # define rp_lib_child_comp RP_LIB_CHILD_COMP116 # define rp_lib_child_id RP_LIB_CHILD_ID117 # define rp_lib_child_type RP_LIB_CHILD_TYPE118 # define rp_lib_child_obj RP_LIB_CHILD_OBJ119 # define rp_lib_get RP_LIB_GET120 # define rp_lib_get_double RP_LIB_GET_DOUBLE121 # define rp_lib_put_str RP_LIB_PUT_STR122 # define rp_lib_put_id_str RP_LIB_PUT_ID_STR123 # define rp_lib_put_obj RP_LIB_PUT_OBJ124 # define rp_lib_put_id_obj RP_LIB_PUT_ID_OBJ125 # define rp_lib_remove RP_LIB_REMOVE126 # define rp_lib_xml_len RP_LIB_XML_LEN127 # define rp_lib_write_xml RP_LIB_WRITE_XML128 # define rp_lib_xml RP_LIB_XML129 # define rp_lib_node_comp RP_LIB_NODE_COMP130 # define rp_lib_node_type RP_LIB_NODE_TYPE131 # define rp_lib_node_id RP_LIB_NODE_ID132 # define rp_result RP_RESULT133 # define rp_quit RP_QUIT134 #endif135 136 137 void rp_init();138 22 139 23 int rp_lib ( const char* filePath, int filePath_len ); … … 161 45 int path_len ); 162 46 47 /* 48 * rp_lib_child_num still needs to be written 49 * keep function declaration around 163 50 int rp_lib_child_num ( int* handle, 164 51 char* path, 165 52 int* childHandle, 166 53 int path_len); 54 */ 167 55 168 56 int rp_lib_children ( int* handle, /* integer handle of library */ … … 173 61 174 62 175 void rp_lib_get ( int* handle, 63 void rp_lib_get ( int* handle, 176 64 char* path, 177 65 char* retText, … … 179 67 int retText_len ); 180 68 181 double rp_lib_get_double ( int* handle, 69 double rp_lib_get_double ( int* handle, 182 70 char* path, 183 71 int path_len); 184 72 185 void rp_lib_put_str ( int* handle, 186 char* path, 187 char* value, 73 void rp_lib_put_str ( int* handle, 74 char* path, 75 char* value, 188 76 int* append, 189 77 int path_len, 190 int value_len ); 78 int value_len ); 191 79 192 void rp_lib_put_id_str ( int* handle, 193 char* path, 194 char* value, 195 char* id, 80 void rp_lib_put_id_str ( int* handle, 81 char* path, 82 char* value, 83 char* id, 196 84 int* append, 197 85 int path_len, 198 86 int value_len, 199 int id_len ); 87 int id_len ); 200 88 201 void rp_lib_put_obj ( int* handle, 202 char* path, 203 int* valHandle, 89 /* 90 * rp_lib_put_obj still needs to be written 91 * keep function declaration around 92 void rp_lib_put_obj ( int* handle, 93 char* path, 94 int* valHandle, 204 95 int* append, 205 int path_len ); 96 int path_len ); 97 */ 206 98 207 void rp_lib_put_id_obj ( int* handle, 208 char* path, 209 int* valHandle, 210 char* id, 99 /* 100 * rp_lib_put_id_obj still needs to be written 101 * keep function declaration around 102 void rp_lib_put_id_obj ( int* handle, 103 char* path, 104 int* valHandle, 105 char* id, 211 106 int* append, 212 107 int path_len, 213 int id_len ); 108 int id_len ); 109 */ 214 110 111 /* 112 * rp_lib_remove still needs to be written 113 * keep function declaration around 215 114 int rp_lib_remove ( int* handle, 216 115 char* path, 217 116 int path_len); 117 */ 218 118 119 /* 120 * rp_lib_xml_len still needs to be written 121 * keep function declaration around 219 122 int rp_lib_xml_len( int* handle); 123 */ 220 124 221 125 void rp_lib_xml( int* handle, … … 255 159 256 160 // global vars 257 // dictionary to hold the python objects that 161 // dictionary to hold the python objects that 258 162 // cannot be sent to fortran 259 163 … … 261 165 RpDict DICT_TEMPLATE fortObjDict_Lib; 262 166 263 #ifdef __cplusplus 167 #ifdef __cplusplus 264 168 } 265 169 #endif -
trunk/include/fortran/RpUnitsFInterface.h
r83 r84 10 10 */ 11 11 12 #include "RpFortranCommon.h"13 14 12 #ifndef _RpUNITS_F_H 15 13 #define _RpUNITS_F_H 16 14 17 #ifdef COMPNAME_ADD1UNDERSCORE 18 # define rp_define_unit rp_define_unit_ 19 # define rp_find rp_find_ 20 # define rp_make_metric rp_make_metric_ 21 # define rp_get_units rp_get_units_ 22 # define rp_get_units_name rp_get_units_name_ 23 # define rp_get_exponent rp_get_exponent_ 24 # define rp_get_basis rp_get_basis_ 25 # define rp_units_convert_dbl rp_units_convert_dbl_ 26 # define rp_units_convert_str rp_units_convert_str_ 27 # define rp_units_add_presets rp_units_add_presets_ 28 #elif defined(COMPNAME_ADD2UNDERSCORE) 29 # define rp_define_unit rp_define_unit__ 30 # define rp_find rp_find__ 31 # define rp_make_metric rp_make_metric__ 32 # define rp_get_units rp_get_units__ 33 # define rp_get_units_name rp_get_units_name__ 34 # define rp_get_exponent rp_get_exponent__ 35 # define rp_get_basis rp_get_basis__ 36 # define rp_units_convert_dbl rp_units_convert_dbl__ 37 # define rp_units_convert_str rp_units_convert_str__ 38 # define rp_units_add_presets rp_units_add_presets__ 39 #elif defined(COMPNAME_NOCHANGE) 40 # define rp_define_unit rp_define_unit 41 # define rp_find rp_find 42 # define rp_make_metric rp_make_metric 43 # define rp_get_units rp_get_units 44 # define rp_get_units_name rp_get_units_name 45 # define rp_get_exponent rp_get_exponent 46 # define rp_get_basis rp_get_basis 47 # define rp_units_convert_dbl rp_units_convert_dbl 48 # define rp_units_convert_str rp_units_convert_str 49 # define rp_units_add_presets rp_units_add_presets 50 #elif defined(COMPNAME_UPPERCASE) 51 # define rp_define_unit RP_DEFINE_UNIT 52 # define rp_find RP_FIND 53 # define rp_make_metric RP_MAKE_METRIC 54 # define rp_get_units RP_GET_UNITS 55 # define rp_get_units_name RP_GET_UNITS_NAME 56 # define rp_get_exponent RP_GET_EXPONENT 57 # define rp_get_basis RP_GET_BASIS 58 # define rp_units_convert_dbl RP_UNITS_CONVERT_DBL 59 # define rp_units_convert_str RP_UNITS_CONVERT_STR 60 # define rp_units_add_presets RP_UNITS_ADD_PRESETS 61 #endif 15 #include "RpFortranCommon.h" 16 #include "RpUnitsFStubs.h" 62 17 63 #ifdef __cplusplus 18 #ifdef __cplusplus 64 19 extern "C" { 65 20 #endif … … 75 30 int rp_get_units_name(int* unitRefVal, char* retText, int retText_len); 76 31 77 int rp_get_exponent(int* unitRefVal, double retExponent);32 int rp_get_exponent(int* unitRefVal, double* retExponent); 78 33 79 34 int rp_get_basis(int* unitRefVal); 80 35 81 int rp_units_convert_dbl ( char* fromVal, 82 char* toUnitsName, 83 double* convResult, 84 int fromVal_len, 36 int rp_units_convert_dbl ( char* fromVal, 37 char* toUnitsName, 38 double* convResult, 39 int fromVal_len, 85 40 int toUnitsName_len ); 86 41 87 int rp_units_convert_str ( char* fromVal, 88 char* toUnitsName, 89 char* retText, 90 int fromVal_len, 42 int rp_units_convert_str ( char* fromVal, 43 char* toUnitsName, 44 char* retText, 45 int fromVal_len, 91 46 int toUnitsName_len, 92 int retText_len ); 47 int retText_len ); 93 48 94 49 int rp_units_add_presets ( char* presetName, int presetName_len); 95 50 96 #ifdef __cplusplus 51 #ifdef __cplusplus 97 52 } 98 53 #endif 99 54 100 55 #endif
Note: See TracChangeset
for help on using the changeset viewer.