Ignore:
Timestamp:
Aug 28, 2009 5:54:24 AM (15 years ago)
Author:
dkearney
Message:

updates to the object system, fixed up tree and xml parser objects, added some basic tests for them and adopted number object to accept xml text and configure itself from the parsed xml. added fermi3.cc example program which contains suggested interface from apps meeting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/objects/RpBoolean.cc

    r1528 r1560  
    6565
    6666const char *
    67 Boolean::xml()
     67Boolean::xml(size_t indent, size_t tabstop)
    6868{
     69    size_t l1width = indent + tabstop;
     70    size_t l2width = indent + (2*tabstop);
     71    const char *sp = "";
     72
    6973    Path p(path());
    7074    _tmpBuf.clear();
     
    7377
    7478    _tmpBuf.appendf(
    75 "<boolean id=\"%s\">\n\
    76     <about>\n\
    77         <label>%s</label>\n\
    78         <description>%s</description>\n\
    79     </about>\n\
    80     <default>%i</default>\n\
    81     <current>%i</current>\n\
    82 </boolean>",
    83        p.id(),label(),desc(),def(),cur());
     79"%9$*6$s<boolean id=\"%1$s\">\n\
     80%9$*7$s<about>\n\
     81%9$*8$s<label>%2$s</label>\n\
     82%9$*8$s<description>%3$s</description>\n\
     83%9$*7$s</about>\n\
     84%9$*7$s<default>%4$i</default>\n\
     85%9$*7$s<current>%5$i</current>\n\
     86%9$*6$s</boolean>",
     87       p.id(),label(),desc(),def(),cur(),indent,l1width,l2width,sp);
    8488
    8589    return _tmpBuf.bytes();
Note: See TracChangeset for help on using the changeset viewer.