Changeset 125 for trunk/src/fortran


Ignore:
Timestamp:
Nov 4, 2005 3:19:11 PM (18 years ago)
Author:
dkearney
Message:

1) removed "as" string from c++'s element() function because
the function does not have the capacity to return anything
other than RpLibrary? Instances
2) changed get() functions in library module to return strings.
this change was propagated to matlab, octave, c, fortran, c++
bindings.
3) fixed rpFreeLibrary inside of c interface, now function accepts
a pointer to a pointer to RpLibrary? (lib) and sets *lib equal to
null
4) added doxygen target to makefile. (make docs), to get graphics
you need the program named dot (debian: apt-get install graphviz)
otherwise you will get errors for the portion of the proceedure
where it is trying to create the graphics.

Location:
trunk/src/fortran
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/fortran/RpLibraryFInterface.cc

    r122 r125  
    462462
    463463        if (lib) {
     464            xmlText = lib->get(inPath);
     465            if (!xmlText.empty()) {
     466                fortranify(xmlText.c_str(),retText,retText_len);
     467            }
     468
     469        }
     470    }
     471}
     472
     473/**********************************************************************/
     474// FUNCTION: rp_lib_get_str()
     475/// Get data located at 'path' and return it as a string value.
     476/**
     477 */
     478void rp_lib_get_str( int* handle, /* integer handle of library */
     479                   char* path,      /* null terminated path */
     480                   char* retText,   /* return text buffer for fortran*/
     481                   int path_len,
     482                   int retText_len /* length of return text buffer */
     483                 )
     484{
     485    std::string xmlText = "";
     486
     487    RpLibrary* lib = NULL;
     488
     489    std::string inPath = "";
     490
     491    inPath = null_terminate_str(path,path_len);
     492
     493    if ((handle) && (*handle != 0)) {
     494        lib = getObject_Lib(*handle);
     495
     496        if (lib) {
    464497            xmlText = lib->getString(inPath);
    465498            if (!xmlText.empty()) {
     
    470503    }
    471504}
     505
    472506
    473507/**********************************************************************/
  • trunk/src/fortran/RpLibraryFStubs.c

    r119 r125  
    238238}
    239239
     240void
     241rp_lib_get_str_ (       int* handle,
     242                        char* path,
     243                        char* retText,
     244                        int path_len,
     245                        int retText_len ) {
     246
     247    return rp_lib_get_str(handle,path,retText,path_len,retText_len);
     248}
     249
     250void
     251rp_lib_get_str__ (      int* handle,
     252                        char* path,
     253                        char* retText,
     254                        int path_len,
     255                        int retText_len ) {
     256
     257    return rp_lib_get_str(handle,path,retText,path_len,retText_len);
     258}
     259
     260void
     261RP_LIB_GET_STR  (       int* handle,
     262                        char* path,
     263                        char* retText,
     264                        int path_len,
     265                        int retText_len ) {
     266
     267    return rp_lib_get_str(handle,path,retText,path_len,retText_len);
     268}
     269
    240270double
    241271rp_lib_get_double_ (    int* handle,
Note: See TracChangeset for help on using the changeset viewer.