Ignore:
Timestamp:
Sep 14, 2009 3:18:36 PM (15 years ago)
Author:
dkearney
Message:

updates to Rappture::Library and Rappture::Number objects to demo how the library should store objects and generate the xml for those objects upon request. opting for configure() and dump() functions for objects. the object should know how to configure it self from a string of xml, tree object or (in the future) blob of hdf5. added some rudimentary examples of using the library object.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/objects/RpChainHelper.c

    r1528 r1566  
    5656        Rp_ChainUnlinkLink(c2,l);
    5757        Rp_ChainAppendLink(c1,l);
     58        l = Rp_ChainFirstLink(c2);
     59    }
     60
     61    return c1;
     62}
     63
     64Rp_Chain *
     65Rp_ChainInsertChainAfter (
     66    Rp_Chain *c1,
     67    Rp_Chain *c2,
     68    Rp_ChainLink *at)
     69{
     70    Rp_ChainLink *l = NULL;
     71
     72    if (c1 == NULL) {
     73        return c2;
     74    }
     75
     76    if (c2 == NULL) {
     77        return c1;
     78    }
     79
     80    l = Rp_ChainLastLink(c2);
     81    while (l != NULL) {
     82        Rp_ChainUnlinkLink(c2,l);
     83        Rp_ChainLinkAfter(c1,l,at);
     84        l = Rp_ChainLastLink(c2);
     85    }
     86
     87    return c1;
     88}
     89
     90Rp_Chain *
     91Rp_ChainInsertChainBefore (
     92    Rp_Chain *c1,
     93    Rp_Chain *c2,
     94    Rp_ChainLink *at)
     95{
     96    Rp_ChainLink *l = NULL;
     97
     98    if (c1 == NULL) {
     99        return c2;
     100    }
     101
     102    if (c2 == NULL) {
     103        return c1;
     104    }
     105
     106    l = Rp_ChainFirstLink(c2);
     107    while (l != NULL) {
     108        Rp_ChainUnlinkLink(c2,l);
     109        Rp_ChainLinkBefore(c1,l,at);
    58110        l = Rp_ChainFirstLink(c2);
    59111    }
Note: See TracChangeset for help on using the changeset viewer.