Changeset 1569 for trunk/src/objects/RpNumber.cc
- Timestamp:
- Sep 16, 2009, 2:22:36 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/objects/RpNumber.cc
r1568 r1569 28 28 // FIXME: empty names should be autoname'd 29 29 this->name(""); 30 this->path(" ");30 this->path("run"); 31 31 this->label(""); 32 32 this->desc(""); … … 48 48 49 49 this->name(name); 50 this->path(" ");50 this->path("run"); 51 51 this->label(""); 52 52 this->desc(""); … … 74 74 75 75 this->name(name); 76 this->path(" ");76 this->path("run"); 77 77 this->label(label); 78 78 this->desc(desc); … … 301 301 302 302 /**********************************************************************/ 303 // METHOD: configure( Rp_ParserXml *p)303 // METHOD: configure(ClientData c) 304 304 /// construct a number object from the provided tree 305 305 /** … … 308 308 309 309 void 310 Number::configure(size_t as, void *p)310 Number::configure(size_t as, ClientData c) 311 311 { 312 312 if (as == RPCONFIG_XML) { 313 __configureFromXml( (const char *)p);313 __configureFromXml(c); 314 314 } else if (as == RPCONFIG_TREE) { 315 __configureFromTree( (Rp_ParserXml *)p);315 __configureFromTree(c); 316 316 } 317 317 } … … 325 325 326 326 void 327 Number::__configureFromXml(const char *xmltext) 328 { 327 Number::__configureFromXml(ClientData c) 328 { 329 const char *xmltext = (const char *)c; 329 330 if (xmltext == NULL) { 330 331 // FIXME: setup error … … 340 341 341 342 void 342 Number::__configureFromTree(Rp_ParserXml *p) 343 { 343 Number::__configureFromTree(ClientData c) 344 { 345 Rp_ParserXml *p = (Rp_ParserXml *)c; 344 346 if (p == NULL) { 345 347 // FIXME: setup error … … 353 355 path(pathObj.parent()); 354 356 name(Rp_ParserXmlNodeId(p,node)); 355 label(Rp_ParserXmlGet(p,"about.label")); 356 desc(Rp_ParserXmlGet(p,"about.description")); 357 358 pathObj.clear(); 359 pathObj.add("about"); 360 pathObj.add("label"); 361 label(Rp_ParserXmlGet(p,pathObj.path())); 362 pathObj.type("description"); 363 desc(Rp_ParserXmlGet(p,pathObj.path())); 357 364 units(Rp_ParserXmlGet(p,"units")); 358 365 minFromStr(Rp_ParserXmlGet(p,"min")); … … 418 425 } 419 426 427 ClientDataXml *d = (ClientDataXml *)c; 420 428 Rp_ParserXml *parser = Rp_ParserXmlCreate(); 421 429 __dumpToTree(parser); 422 const char *xmltext = Rp_ParserXmlXml(parser);423 _tmpBuf.appendf("%s",xmltext);430 _tmpBuf.appendf("%s",Rp_ParserXmlXml(parser)); 431 d->retStr = _tmpBuf.bytes(); 424 432 Rp_ParserXmlDestroy(&parser); 425 433 }
Note: See TracChangeset
for help on using the changeset viewer.