14 #include "msdevstudio/MSconfig.h"
53 using namespace hippodraw;
56 :
BaseXML (
"PlotterBase", controller ),
59 m_x_label (
"xlabel" ),
60 m_y_label (
"ylabel" ),
61 m_z_label (
"zlabel" ),
110 = dynamic_cast <
const XyPlotter & > ( plotter );
118 if ( transform != 0 ) {
125 for (
int i = 0; i < number; i++ ) {
138 = dynamic_cast <
const CutPlotter & > ( plotter );
147 if ( plotter.
name() ==
"TextPlotter" ) {
150 = dynamic_cast <
const TextPlotter & > ( plotter );
163 const vector < TupleCut > & cuts = plotter.
getCuts ();
164 for (
unsigned int i = 0; i < cuts.size (); i++ ) {
170 const list < DataRep * > & targets = plotter.
getCutTargets ();
171 #ifdef ITERATOR_MEMBER_DEFECT
174 list < DataRep * >::const_iterator first = targets.begin();
176 for ( ; first != targets.end(); ++first ) {
178 const void * addr = reinterpret_cast <
const void * > ( rep );
195 const void * addr = reinterpret_cast <
const void * > ( rep );
213 const string t (
"t" );
214 element -> setAttribute (
m_axis, t );
215 m_font -> setAttributes ( *element, *font );
220 for (
unsigned int i = 0; i < 3; i++ ) {
251 element -> setAttribute (
m_axis, s );
252 m_font -> setAttributes ( *element, *font );
266 if ( model == 0 )
return;
279 element -> setAttribute (
m_axis, tmp );
288 const void * addr = reinterpret_cast <
const void * > ( & plotter );
299 tag -> setAttribute (
m_title, title );
300 tag -> setAttribute (
m_x_label, x_label );
301 tag -> setAttribute (
m_y_label, y_label );
302 tag -> setAttribute (
m_z_label, z_label );
306 const void * addr = reinterpret_cast <
const void * > ( parent );
308 tag -> setAttribute (
"ref", ref );
310 tag -> setAttribute (
m_pindex, index );
322 if ( plotter == 0 )
return 0;
325 if ( element != 0 ) {
333 list < XmlElement * > nodelist;
339 #ifdef ITERATOR_MEMBER_DEFECT
342 list < XmlElement * > ::const_iterator first = nodelist.begin ();
343 for ( ; first != nodelist.end(); ++first ) {
345 int id = element->
getID ();
348 string what (
"Unable to find data representation" );
358 if ( cutplotter != 0 ) {
359 cutplotter -> addTupleCut ( rep );
364 if ( textplotter != 0 ) {
377 list < XmlElement * > nodelist;
379 if ( nodelist.empty () == false ) {
383 list < XmlElement * > ::const_iterator first = nodelist.begin ();
385 while ( first != nodelist.end () ) {
388 m_font -> setAttributes ( element, font );
391 xypl -> setTitleFont ( font );
394 xypl -> setLabelFont ( font, axis );
404 list < XmlElement * > nodelist;
406 if ( nodelist.empty () == false ) {
408 #ifdef ITERATOR_MEMBER_DEFECT
411 list < XmlElement * > :: const_iterator first = nodelist.begin();
412 for ( ; first != nodelist.end (); ++first ) {
415 if ( axis ==
Axes::Z ) plotter -> setEnableZ (
true );
422 std::swap ( tmp, model );
438 bool has_Z = type ==
"XYColorPlotter";
439 if ( type ==
"XYPlotter" ||
440 type ==
"XYColorPlotter" ) {
446 plotter = factory->
create ( type );
448 int id = element -> getID ();
454 ok = element -> attribute (
m_title, value );
455 plotter -> setTitle ( value );
459 ok = element -> attribute (
m_x_label, value );
460 plotter -> setLabel (
Axes::X, value );
464 ok = element -> attribute (
m_y_label, value );
465 plotter -> setLabel (
Axes::Y, value );
469 ok = element -> attribute (
m_z_label, value );
470 plotter -> setLabel (
Axes::Z, value );
475 ok = element -> attribute (
m_pindex, index );
477 plotter -> setParentDataRepIndex ( index );
491 list < XmlElement * > nodelist;
493 if ( nodelist.empty() )
return;
495 #ifdef ITERATOR_MEMBER_DEFECT
498 list < XmlElement * > :: const_iterator first = nodelist.begin();
499 for ( ; first != nodelist.end(); ++first ) {
501 int ref = element->
getID ();
508 const vector < TupleCut > & cuts = plotter -> getCuts ();
509 for (
unsigned int i = 0; i < cuts.size(); i++ ) {
510 projector -> addCut ( &cuts[i] );
512 target -> setDirty (
true );
524 if ( frep == 0 )
return;
527 int id = element->
getID ();
540 vector < const TupleCut * > cuts;
543 list < XmlElement * > node_list;
545 list < XmlElement * >::const_iterator first = node_list.begin();
547 while ( first != node_list.end() ) {
551 element -> attribute (
"axis", a );
553 const string & label = plotter -> getLabel ( axis );
555 int id = element->
getID ();
558 tc -> setLabel ( label );
559 cuts.push_back ( tuplecut );
561 if ( tuplecut != 0 ) {
562 cuts.push_back ( tuplecut );
576 int id = element->
getID ();