Changeset 1560 for trunk/src/objects/RpHistogram.cc
- Timestamp:
- Aug 28, 2009, 5:54:24 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/objects/RpHistogram.cc
r1528 r1560 315 315 316 316 const char * 317 Histogram::xml() 318 { 317 Histogram::xml(size_t indent, size_t tabstop) 318 { 319 size_t l1width = indent + tabstop; 320 size_t l2width = indent + (2*tabstop); 321 const char *sp = ""; 322 319 323 Path p(path()); 320 324 … … 327 331 328 332 _tmpBuf.appendf( 329 "<histogram id=\"%s\">\n\ 330 <about>\n\ 331 <group>%s</group>\n\ 332 <label>%s</label>\n\ 333 <description>%s</description>\n\ 334 </about>\n", p.id(),group(),label(),desc()); 333 "%8$*5$s<histogram id=\"%1$s\">\n\ 334 %8$*6$s<about>\n\ 335 %8$*7$s<group>%2$s</group>\n\ 336 %8$*7$s<label>%3$s</label>\n\ 337 %8$*7$s<description>%4$s</description>\n\ 338 %8$*6$s</about>\n", 339 p.id(),group(),label(),desc(),indent,l1width,l2width,sp); 335 340 336 341 for (size_t dim=0; dim < dims(); dim++) { … … 342 347 } 343 348 _tmpBuf.appendf( 344 " <%s>\n\345 <label>%s</label>\n\346 <description>%s</description>\n\347 <units>%s</units>\n\348 <scale>%s</scale>\n",349 "%8$*6$s<%1$s>\n\ 350 %8$*7$s<label>%2$s</label>\n\ 351 %8$*7$s<description>%3$s</description>\n\ 352 %8$*7$s<units>%4$s</units>\n\ 353 %8$*7$s<scale>%5$s</scale>\n", 349 354 tmpAxis->name(), tmpAxis->label(), tmpAxis->desc(), 350 tmpAxis->units(), tmpAxis->scale() );355 tmpAxis->units(), tmpAxis->scale(),l1width,l2width,sp); 351 356 352 357 if (_markerList != NULL) { … … 355 360 AxisMarker *m = (AxisMarker *) Rp_ChainGetValue(l); 356 361 if (strcmp(tmpAxis->name(),m->axisName()) == 0) { 357 _tmpBuf.append(m->xml( ));362 _tmpBuf.append(m->xml(indent+tabstop,tabstop)); 358 363 } 359 364 l = Rp_ChainNextLink(l); 360 365 } 361 366 } 362 _tmpBuf.appendf(" </%s>\n",tmpAxis->name());363 } 364 365 _tmpBuf.append (" <component>\n <xhw>\n");367 _tmpBuf.appendf("%3$*2$s</%1$s>\n",tmpAxis->name(),l1width,sp); 368 } 369 370 _tmpBuf.appendf("%3$*1$s<component>\n%3$*2$s<xhw>\n",l1width,l2width,sp); 366 371 for (size_t idx=0; idx < nmemb; idx++) { 367 372 for (size_t dim=0; dim < dims(); dim++) { … … 370 375 _tmpBuf.append("\n",1); 371 376 } 372 _tmpBuf.append (" </xhw>\n </component>\n</curve>");373 _tmpBuf.append("\0",1);377 _tmpBuf.appendf("%4$*3$s</xhw>\n%4$*2$s</component>\n%4$*1$s</curve>", 378 indent,l1width,l2width,sp); 374 379 375 380 return _tmpBuf.bytes();
Note: See TracChangeset
for help on using the changeset viewer.