Ignore:
Timestamp:
Oct 6, 2005 3:33:41 PM (18 years ago)
Author:
dkearney
Message:
  1. corrected c interface language binding function names so they are

consistant with previous c interface function names

  1. separated object dictionaries from fortran code, placed them in

the RpBindings.[h,cc] files so matlab bindings can use them too.

  1. adjusted makefile to compile RpBindings code
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/src/RpLibraryC_test.c

    r83 r93  
    2828    printf("TESTING ELEMENT: path = %s\n", path);
    2929
    30     searchEle = element(lib,path);
    31     type = elementAsType(lib,path);
    32     comp = elementAsComp(lib,path);
    33     id = elementAsId(lib,path);
     30    searchEle = rpElement(lib,path);
     31    type = rpElementAsType(lib,path);
     32    comp = rpElementAsComp(lib,path);
     33    id = rpElementAsId(lib,path);
    3434
    3535    if (!searchEle) {
     
    4242        printf("searchEle type = :%s:\n", type);
    4343
    44         comp = nodeComp(searchEle);
    45         id   = nodeId(searchEle);
    46         type = nodeType(searchEle);
    47        
     44        comp = rpNodeComp(searchEle);
     45        id   = rpNodeId(searchEle);
     46        type = rpNodeType(searchEle);
     47
    4848        printf("searchEle comp = :%s:\n", comp);
    4949        printf("searchEle   id = :%s:\n", id);
     
    6363    printf("TESTING GET String: path = %s\n", path);
    6464
    65     searchVal = getString(lib,path);
     65    searchVal = rpGetString(lib,path);
    6666
    6767    if (!searchVal || *searchVal == '\0') {
     
    8484    printf("TESTING GET Double: path = %s\n", path);
    8585
    86     searchVal = getDouble(lib,path);
     86    searchVal = rpGetDouble(lib,path);
    8787
    8888    printf("searchVal = :%f:\n", searchVal);
     
    102102    printf("TESTING CHILDREN: path = %s\n", path);
    103103
    104     while ( (childEle = children(lib,path,childEle)) ) {
    105         comp = nodeComp(childEle);
    106         id   = nodeId(childEle);
    107         type = nodeType(childEle);
     104    while ( (childEle = rpChildren(lib,path,childEle)) ) {
     105        comp = rpNodeComp(childEle);
     106        id   = rpNodeId(childEle);
     107        type = rpNodeType(childEle);
    108108
    109109        printf("childEle comp = :%s:\n",comp);
     
    128128    printf("TESTING CHILDREN: path = %s\n", path);
    129129
    130     while ( (childEle = childrenByType(lib,path,childEle,searchType)) ) {
    131         comp = nodeComp(childEle);
    132         id   = nodeId(childEle);
    133         type = nodeType(childEle);
     130    while ( (childEle = rpChildrenByType(lib,path,childEle,searchType)) ) {
     131        comp = rpNodeComp(childEle);
     132        id   = rpNodeId(childEle);
     133        type = rpNodeType(childEle);
    134134
    135135        printf("childEle comp = :%s:\n",comp);
     
    151151    printf("TESTING PUT String: path = %s\n", path);
    152152
    153     putString(lib,path,value,append);
    154     searchVal = getString(lib, path);
     153    rpPutString(lib,path,value,append);
     154    searchVal = rpGetString(lib, path);
    155155
    156156    if (!searchVal || *searchVal == '\0') {
     
    173173    printf("TESTING PUT String: path = %s\n", path);
    174174
    175     putDouble(lib,path,value,append);
    176     searchVal = getDouble(lib, path);
     175    rpPutDouble(lib,path,value,append);
     176    searchVal = rpGetDouble(lib, path);
    177177    printf("searchVal = :%f:\n", searchVal);
    178178    retVal = 0;
     
    186186    RpLibrary* lib = NULL;
    187187
    188     if (argc < 3)
     188    if (argc < 2)
    189189    {
    190         printf("usage: RpLibrary_test infile.xml outfile.xml\n");
     190        printf("usage: %s driver.xml\n", argv[0]);
    191191        return -1;
    192192    }
    193193
    194     lib = library(argv[1]);
     194    lib = rpLibrary(argv[1]);
    195195
    196196    test_element(lib,"input.number(min)");
     
    217217    test_childrenByType(lib,"input.number(test)","preset");
    218218
    219     printf("XML = \n%s\n",xml(lib));
     219    printf("XML = \n%s\n",rpXml(lib));
    220220   
    221     freeLibrary(lib);
     221    rpFreeLibrary(lib);
    222222
    223223    return 0;
Note: See TracChangeset for help on using the changeset viewer.