<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>HippoDraw Class Library</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> <link rel="shortcut icon" href="hippoApp.ico"> </head><body> <!-- Generated by Doxygen 1.6.2 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="dir_d71d549033b3d00bbeb107001643b90a.html">xml</a> </div> </div> <div class="contents"> <h1>PlotterBaseXML.cxx</h1><a href="PlotterBaseXML_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <a name="l00012"></a>00012 <span class="comment">// for iterator member defect</span> <a name="l00013"></a>00013 <span class="preprocessor">#ifdef _MSC_VER</span> <a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#include "msdevstudio/MSconfig.h"</span> <a name="l00015"></a>00015 <span class="preprocessor">#endif</span> <a name="l00016"></a>00016 <span class="preprocessor"></span> <a name="l00017"></a>00017 <span class="preprocessor">#include "<a class="code" href="PlotterBaseXML_8h.html" title="PlotterBaseXML class interface.">PlotterBaseXML.h</a>"</span> <a name="l00018"></a>00018 <a name="l00019"></a>00019 <span class="preprocessor">#include "<a class="code" href="AxisModelXML_8h.html" title="AxisModelXML class interface.">AxisModelXML.h</a>"</span> <a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="DataRepXML_8h.html" title="hippodraw::DataRepXML class interface">DataRepXML.h</a>"</span> <a name="l00021"></a>00021 <span class="preprocessor">#include "<a class="code" href="FontXML_8h.html" title="FontXML class interface.">FontXML.h</a>"</span> <a name="l00022"></a>00022 <span class="preprocessor">#include "<a class="code" href="PointRepXML_8h.html" title="PointRepXML class interface.">PointRepXML.h</a>"</span> <a name="l00023"></a>00023 <span class="preprocessor">#include "<a class="code" href="TransformXML_8h.html" title="TransformXML class interface.">TransformXML.h</a>"</span> <a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="TupleCutXML_8h.html" title="TupleCutXML class interface.">TupleCutXML.h</a>"</span> <a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="XmlController_8h.html" title="XmlController class interface.">XmlController.h</a>"</span> <a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="XmlDocument_8h.html" title="XmlDocument class interface.">XmlDocument.h</a>"</span> <a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="XmlElement_8h.html" title="XmlElement class interface.">XmlElement.h</a>"</span> <a name="l00028"></a>00028 <a name="l00029"></a>00029 <span class="preprocessor">#include "<a class="code" href="AxisModelLog_8h.html" title="AxisModelLog class interface.">axes/AxisModelLog.h</a>"</span> <a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="DisplayController_8h.html" title="DisplayController class interface declaration.">controllers/DisplayController.h</a>"</span> <a name="l00031"></a>00031 <span class="preprocessor">#include "<a class="code" href="FunctionController_8h.html" title="hippodraw::FunctionController class interface">controllers/FunctionController.h</a>"</span> <a name="l00032"></a>00032 <span class="preprocessor">#include "<a class="code" href="DataRepException_8h.html">datareps/DataRepException.h</a>"</span> <a name="l00033"></a>00033 <span class="preprocessor">#include "<a class="code" href="FunctionRep_8h.html" title="hippodraw::FunctionRep class interface">datareps/FunctionRep.h</a>"</span> <a name="l00034"></a>00034 <span class="preprocessor">#include "<a class="code" href="TupleCut_8h.html" title="hippodraw::TupleCut class interface">datasrcs/TupleCut.h</a>"</span> <a name="l00035"></a>00035 <a name="l00036"></a>00036 <span class="preprocessor">#include "<a class="code" href="Cut1DPlotter_8h.html" title="Cut1DPlotter class interface.">plotters/Cut1DPlotter.h</a>"</span> <a name="l00037"></a>00037 <span class="preprocessor">#include "<a class="code" href="Cut2DPlotter_8h.html" title="hippodraw::Cut2DPlotter class interface">plotters/Cut2DPlotter.h</a>"</span> <a name="l00038"></a>00038 <span class="preprocessor">#include "<a class="code" href="PlotterFactory_8h.html">plotters/PlotterFactory.h</a>"</span> <a name="l00039"></a>00039 <span class="preprocessor">#include "<a class="code" href="TextPlotter_8h.html" title="TextPlotter class interface.">plotters/TextPlotter.h</a>"</span> <a name="l00040"></a>00040 <span class="preprocessor">#include "<a class="code" href="XyPlotter_8h.html" title="hippodraw::XyPlotter class interface">plotters/XyPlotter.h</a>"</span> <a name="l00041"></a>00041 <a name="l00042"></a>00042 <span class="preprocessor">#include "<a class="code" href="NTupleProjector_8h.html" title="hippodraw::NTupleProjector class interface">projectors/NTupleProjector.h</a>"</span> <a name="l00043"></a>00043 <a name="l00044"></a>00044 <span class="preprocessor">#include "<a class="code" href="string__convert_8h.html" title="The namespace for conversion to string.">pattern/string_convert.h</a>"</span> <a name="l00045"></a>00045 <a name="l00046"></a>00046 <span class="preprocessor">#include <typeinfo></span> <a name="l00047"></a>00047 <a name="l00048"></a>00048 <span class="preprocessor">#include <cassert></span> <a name="l00049"></a>00049 <a name="l00050"></a>00050 <span class="keyword">using</span> std::list; <a name="l00051"></a>00051 <span class="keyword">using</span> std::string; <a name="l00052"></a>00052 <a name="l00053"></a>00053 <span class="keyword">using namespace </span>hippodraw; <a name="l00054"></a>00054 <a name="l00055"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#abcc4edd52efc2b7f0ef156528f891e1c">00055</a> PlotterBaseXML::PlotterBaseXML ( <a class="code" href="classhippodraw_1_1XmlController.html" title="A base class that is the interface between GUI and the XML serialization and deserialization...">XmlController</a> * controller ) <a name="l00056"></a>00056 : <a class="code" href="classhippodraw_1_1BaseXML.html" title="A base class of XML element controllers.">BaseXML</a> ( <span class="stringliteral">"PlotterBase"</span>, controller ), <a name="l00057"></a>00057 m_axis ( <span class="stringliteral">"axis"</span> ), <a name="l00058"></a>00058 m_title ( <span class="stringliteral">"title"</span> ), <a name="l00059"></a>00059 m_x_label ( <span class="stringliteral">"xlabel"</span> ), <a name="l00060"></a>00060 m_y_label ( <span class="stringliteral">"ylabel"</span> ), <a name="l00061"></a>00061 m_z_label ( <span class="stringliteral">"zlabel"</span> ), <a name="l00062"></a>00062 m_pindex ( <span class="stringliteral">"pindex"</span> ) <a name="l00063"></a>00063 { <a name="l00064"></a>00064 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a40ecba72a8edee861efef52c27f63ae9" title="The AxisModelXML instance used by this object.">m_axismodel</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1AxisModelXML.html" title="A class that is does XML serialization and de-serialization of derived classes of...">AxisModelXML</a> ( controller ); <a name="l00065"></a>00065 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a996831bea679c1ee76a66b2406eb31cf" title="The DataRepXML instance used by this object.">m_datarep</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1DataRepXML.html" title="A class that is does XML serialization and de-serialization of derived classes of...">DataRepXML</a> ( controller ); <a name="l00066"></a>00066 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a34d536c5043350cab51c77c4f4a5e398" title="The FontXML instance used by this object.">m_font</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1FontXML.html" title="A class that is does XML serialization and deserialization of derived classes of...">FontXML</a> ( controller ); <a name="l00067"></a>00067 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a2689353c24658818d3f360270ac7f5dc" title="The PointRepXML instance used by this object.">m_pointrep</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1PointRepXML.html" title="A singleton class that is does XML serialization and de-serialization of derived...">PointRepXML</a> ( controller ); <a name="l00068"></a>00068 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ac0972f4ef35918b178bae0b601fa51fa" title="The TransfromXML instance used by this object.">m_transform_xml</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1TransformXML.html" title="A class XML creation and parsing of XmlElement for Transform class.">TransformXML</a> ( controller ); <a name="l00069"></a>00069 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a74a455fe6f9d79262375f28d147ca7e4" title="The TupleCutXML instance used by this object.">m_tuple_cut_xml</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1TupleCutXML.html" title="A class that is does XML serialization and de-serialization of derived classes of...">TupleCutXML</a> ( controller ); <a name="l00070"></a>00070 } <a name="l00071"></a>00071 <a name="l00072"></a>00072 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a612f8cbe3950c69c74f13ce6ceff9d2f" title="A private copy constructor in order to avoid copying.">PlotterBaseXML::</a> <a name="l00073"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ad3ac7e27c97884b9e9c44b259b276b4c">00073</a> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a612f8cbe3950c69c74f13ce6ceff9d2f" title="A private copy constructor in order to avoid copying.">PlotterBaseXML</a> ( <span class="keyword">const</span> std::string & name, <a name="l00074"></a>00074 <a class="code" href="classhippodraw_1_1XmlController.html" title="A base class that is the interface between GUI and the XML serialization and deserialization...">XmlController</a> * controller ) <a name="l00075"></a>00075 : <a class="code" href="classhippodraw_1_1BaseXML.html" title="A base class of XML element controllers.">BaseXML</a> ( name, controller ), <a name="l00076"></a>00076 m_axis ( <span class="stringliteral">"axis"</span> ) <a name="l00077"></a>00077 { <a name="l00078"></a>00078 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a40ecba72a8edee861efef52c27f63ae9" title="The AxisModelXML instance used by this object.">m_axismodel</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1AxisModelXML.html" title="A class that is does XML serialization and de-serialization of derived classes of...">AxisModelXML</a> ( controller ); <a name="l00079"></a>00079 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a996831bea679c1ee76a66b2406eb31cf" title="The DataRepXML instance used by this object.">m_datarep</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1DataRepXML.html" title="A class that is does XML serialization and de-serialization of derived classes of...">DataRepXML</a> ( controller ); <a name="l00080"></a>00080 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a34d536c5043350cab51c77c4f4a5e398" title="The FontXML instance used by this object.">m_font</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1FontXML.html" title="A class that is does XML serialization and deserialization of derived classes of...">FontXML</a> ( controller ); <a name="l00081"></a>00081 } <a name="l00082"></a>00082 <a name="l00083"></a>00083 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a039cf3629517828140caa1c07523ec39" title="The destructor.">PlotterBaseXML::</a> <a name="l00084"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a039cf3629517828140caa1c07523ec39">00084</a> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a039cf3629517828140caa1c07523ec39" title="The destructor.">~PlotterBaseXML</a> () <a name="l00085"></a>00085 { <a name="l00086"></a>00086 <span class="keyword">delete</span> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a40ecba72a8edee861efef52c27f63ae9" title="The AxisModelXML instance used by this object.">m_axismodel</a>; <a name="l00087"></a>00087 <span class="keyword">delete</span> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a996831bea679c1ee76a66b2406eb31cf" title="The DataRepXML instance used by this object.">m_datarep</a>; <a name="l00088"></a>00088 <span class="keyword">delete</span> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a34d536c5043350cab51c77c4f4a5e398" title="The FontXML instance used by this object.">m_font</a>; <a name="l00089"></a>00089 <span class="keyword">delete</span> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a2689353c24658818d3f360270ac7f5dc" title="The PointRepXML instance used by this object.">m_pointrep</a>; <a name="l00090"></a>00090 <span class="keyword">delete</span> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ac0972f4ef35918b178bae0b601fa51fa" title="The TransfromXML instance used by this object.">m_transform_xml</a>; <a name="l00091"></a>00091 <span class="keyword">delete</span> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a74a455fe6f9d79262375f28d147ca7e4" title="The TupleCutXML instance used by this object.">m_tuple_cut_xml</a>; <a name="l00092"></a>00092 } <a name="l00093"></a>00093 <a name="l00094"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a6eb68a6f37633bd77ac1eb8f29266432">00094</a> <span class="keywordtype">bool</span> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a6eb68a6f37633bd77ac1eb8f29266432" title="Returns true if all the NTuple objects used by the plotter are save to or read from...">PlotterBaseXML::areDataSourcesSaved</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> & plotter ) <a name="l00095"></a>00095 { <a name="l00096"></a>00096 <a class="code" href="classhippodraw_1_1DisplayController.html" title="A singleton class that is the interface between GUI and the displays.">DisplayController</a> * controller = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">DisplayController::instance</a> (); <a name="l00097"></a>00097 <a name="l00098"></a>00098 <span class="keywordflow">return</span> controller-><a class="code" href="classhippodraw_1_1DisplayController.html#a5521f3f70ccdf2c243ecb769702197b2" title="Returns true if all the NTuple Objects used by the plotter are save to or read from...">areDataSourcesSaved</a> ( & plotter ); <a name="l00099"></a>00099 } <a name="l00100"></a>00100 <a name="l00101"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#aea594f8f9c145938a76fc668d1c1d74e">00101</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#aea594f8f9c145938a76fc668d1c1d74e" title="Creates the children elements.">PlotterBaseXML::createChildren</a> ( <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> &tag, <a name="l00102"></a>00102 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> & plotter ) <a name="l00103"></a>00103 { <a name="l00104"></a>00104 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ae8c9fd89e6d92838af5c606eeafc0992" title="Creates an axis model child element for the specified axis.">createAxisModel</a> ( tag, plotter, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> ); <a name="l00105"></a>00105 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ae8c9fd89e6d92838af5c606eeafc0992" title="Creates an axis model child element for the specified axis.">createAxisModel</a> ( tag, plotter, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> ); <a name="l00106"></a>00106 <span class="keywordflow">if</span> ( plotter.<a class="code" href="classhippodraw_1_1PlotterBase.html#a0d9e4bd8bdbab8f6b817cb804da4db7a" title="Returns true if the plotter has an axis of specified type.">hasAxis</a> ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> ) ) <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ae8c9fd89e6d92838af5c606eeafc0992" title="Creates an axis model child element for the specified axis.">createAxisModel</a> ( tag, plotter, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> ); <a name="l00107"></a>00107 <a name="l00108"></a>00108 <span class="keywordflow">try</span> { <a name="l00109"></a>00109 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1XyPlotter.html" title="A Plotter class that plots points in 2 dimensions and option a third dimension in...">XyPlotter</a> & xyplotter <a name="l00110"></a>00110 = dynamic_cast < <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1XyPlotter.html" title="A Plotter class that plots points in 2 dimensions and option a third dimension in...">XyPlotter</a> & > ( plotter ); <a name="l00111"></a>00111 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ac22b4964aaa9909860deb0cbe8c728a9" title="Creates all the font elements, if needed.">createFontElements</a> ( tag, xyplotter ); <a name="l00112"></a>00112 } <a name="l00113"></a>00113 <span class="keywordflow">catch</span> ( ... ) { <a name="l00114"></a>00114 <span class="comment">// do nothing</span> <a name="l00115"></a>00115 } <a name="l00116"></a>00116 <a name="l00117"></a>00117 <a class="code" href="classhippodraw_1_1TransformBase.html" title="A transform that transforms coordinates from one coordinate system to another.">TransformBase</a> * transform = plotter.<a class="code" href="classhippodraw_1_1PlotterBase.html#a6f6cfd143891cd8d5b814b11e350011a" title="Returns the transform object used by the plotter.">getTransform</a> (); <a name="l00118"></a>00118 <span class="keywordflow">if</span> ( transform != 0 ) { <a name="l00119"></a>00119 <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ac0972f4ef35918b178bae0b601fa51fa" title="The TransfromXML instance used by this object.">m_transform_xml</a>-><a class="code" href="classhippodraw_1_1TransformXML.html#a811acf70250aed3fa5f233e85209d3a0" title="Returns a newly created XmlElement with attributes set for view.">createElement</a> ( *transform ); <a name="l00120"></a>00120 tag.<a class="code" href="classhippodraw_1_1XmlNode.html#ae8f46895ca8b33a11cbff29b56ba48e4" title="Appends a child element to the element.">appendChild</a> ( *element ); <a name="l00121"></a>00121 <span class="keyword">delete</span> element; <a name="l00122"></a>00122 } <a name="l00123"></a>00123 <a name="l00124"></a>00124 <span class="keywordtype">int</span> number = plotter.<a class="code" href="classhippodraw_1_1PlotterBase.html#a791198b102f1b7a0bd82481ff808ccf2" title="Returns the number of DataRep objects contained in the plot.">getNumDataReps</a> (); <a name="l00125"></a>00125 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = 0; i < number; i++ ) { <a name="l00126"></a>00126 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep = plotter.<a class="code" href="classhippodraw_1_1PlotterBase.html#a4b915f5fbccdb544a5de6b3e72dbec84" title="Returns the specified DataRep or null pointer if it doesn&#39;t exits.">getDataRep</a> ( i ); <a name="l00127"></a>00127 <a name="l00128"></a>00128 <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a996831bea679c1ee76a66b2406eb31cf" title="The DataRepXML instance used by this object.">m_datarep</a>-><a class="code" href="classhippodraw_1_1DataRepXML.html#add51e87d4e2f5dd7aa52769af2671554" title="Returns a newly created XML element with its attributes set.">createElement</a> ( *rep ); <a name="l00129"></a>00129 <a name="l00130"></a>00130 tag.<a class="code" href="classhippodraw_1_1XmlNode.html#ae8f46895ca8b33a11cbff29b56ba48e4" title="Appends a child element to the element.">appendChild</a> ( *element ); <a name="l00131"></a>00131 <span class="keyword">delete</span> element; <a name="l00132"></a>00132 } <a name="l00133"></a>00133 <a name="l00134"></a>00134 <span class="keywordflow">if</span> ( <span class="keyword">typeid</span> ( plotter ) == <span class="keyword">typeid</span> ( <a class="code" href="classhippodraw_1_1Cut1DPlotter.html" title="A Plotter class that plots one-dimensional TupleCut values.">Cut1DPlotter</a> ) || <a name="l00135"></a>00135 <span class="keyword">typeid</span> ( plotter ) == <span class="keyword">typeid</span> ( <a class="code" href="classhippodraw_1_1Cut2DPlotter.html" title="A Plotter class that plots one-dimensional TupleCut values.">Cut2DPlotter</a> ) ) { <a name="l00136"></a>00136 <span class="keywordflow">try</span> { <a name="l00137"></a>00137 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1CutPlotter.html" title="A PlotterBase derived class that serves a base class for cut plotters.">CutPlotter</a> & cut_plotter <a name="l00138"></a>00138 = dynamic_cast < <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1CutPlotter.html" title="A PlotterBase derived class that serves a base class for cut plotters.">CutPlotter</a> & > ( plotter ); <a name="l00139"></a>00139 <a name="l00140"></a>00140 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ad8238c88b43ff526df9dbc821722a8cc" title="Creates the child elements for the special case when the plotter is a derived class...">createCutChildren</a> ( tag, cut_plotter ); <a name="l00141"></a>00141 } <a name="l00142"></a>00142 <span class="keywordflow">catch</span> ( ... ) { <a name="l00143"></a>00143 <span class="comment">// not a cut, so do nothing</span> <a name="l00144"></a>00144 } <a name="l00145"></a>00145 } <a name="l00146"></a>00146 <a name="l00147"></a>00147 <span class="keywordflow">if</span> ( plotter.<a class="code" href="classhippodraw_1_1PlotterBase.html#a11c23a386abb9eb8a42f0c2c2835d640" title="Returns the name of the plotter.">name</a>() == <span class="stringliteral">"TextPlotter"</span> ) { <a name="l00148"></a>00148 <span class="keywordflow">try</span> { <a name="l00149"></a>00149 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1TextPlotter.html" title="A Plotter class that draws text.">TextPlotter</a> & text_plotter <a name="l00150"></a>00150 = dynamic_cast < <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1TextPlotter.html" title="A Plotter class that draws text.">TextPlotter</a> & > ( plotter ); <a name="l00151"></a>00151 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a4412df487d86028090a11fbccaa8b89d" title="Creates the child elements for the special case when the plotter is a TextPlotter...">createTextChildren</a> ( tag, text_plotter ); <a name="l00152"></a>00152 } <a name="l00153"></a>00153 <span class="keywordflow">catch</span> ( ... ) { <a name="l00154"></a>00154 <span class="comment">// not a text plotter, so do nothing</span> <a name="l00155"></a>00155 } <a name="l00156"></a>00156 } <a name="l00157"></a>00157 <span class="keywordflow">return</span>; <a name="l00158"></a>00158 } <a name="l00159"></a>00159 <a name="l00160"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ad8238c88b43ff526df9dbc821722a8cc">00160</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ad8238c88b43ff526df9dbc821722a8cc" title="Creates the child elements for the special case when the plotter is a derived class...">PlotterBaseXML::createCutChildren</a> ( <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> & tag, <a name="l00161"></a>00161 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1CutPlotter.html" title="A PlotterBase derived class that serves a base class for cut plotters.">CutPlotter</a> & plotter ) <a name="l00162"></a>00162 { <a name="l00163"></a>00163 <span class="keyword">const</span> vector < TupleCut > & cuts = plotter.<a class="code" href="classhippodraw_1_1CutPlotter.html#a8f2d85a629a080468a5a0d744efc6bd4" title="Returns the list of TupleCut objects used by this plotter.">getCuts</a> (); <a name="l00164"></a>00164 <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < cuts.size (); i++ ) { <a name="l00165"></a>00165 <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a74a455fe6f9d79262375f28d147ca7e4" title="The TupleCutXML instance used by this object.">m_tuple_cut_xml</a> -> <a class="code" href="classhippodraw_1_1BaseXML.html#afa1d42a894a8739e0d120ed9c4383d38" title="Creates a new element node.">createElement</a> ( i, cuts[i] ); <a name="l00166"></a>00166 tag.<a class="code" href="classhippodraw_1_1XmlNode.html#ae8f46895ca8b33a11cbff29b56ba48e4" title="Appends a child element to the element.">appendChild</a> ( *element ); <span class="comment">// cut properties</span> <a name="l00167"></a>00167 <span class="keyword">delete</span> element; <a name="l00168"></a>00168 } <a name="l00169"></a>00169 <a name="l00170"></a>00170 <span class="keyword">const</span> list < DataRep * > & targets = plotter.<a class="code" href="classhippodraw_1_1CutPlotter.html#ab31939c77451784ff701e176da569d39" title="Get the list of targets.">getCutTargets</a> (); <a name="l00171"></a>00171 <span class="preprocessor">#ifdef ITERATOR_MEMBER_DEFECT</span> <a name="l00172"></a>00172 <span class="preprocessor"></span> std:: <a name="l00173"></a>00173 <span class="preprocessor">#endif</span> <a name="l00174"></a>00174 <span class="preprocessor"></span> list < DataRep * >::const_iterator first = targets.begin(); <a name="l00175"></a>00175 <a name="l00176"></a>00176 <span class="keywordflow">for</span> ( ; first != targets.end(); ++first ) { <a name="l00177"></a>00177 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep = *first; <a name="l00178"></a>00178 <span class="keyword">const</span> <span class="keywordtype">void</span> * addr = reinterpret_cast < <span class="keyword">const</span> <span class="keywordtype">void</span> * > ( rep ); <a name="l00179"></a>00179 <span class="keywordtype">int</span> <span class="keywordtype">id</span> = <a class="code" href="classhippodraw_1_1BaseXML.html#ae50d78be58d5938b4434515f4f037ece" title="The singleton XML controller object.">m_controller</a> -> getId ( addr ); <a name="l00180"></a>00180 <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element <a name="l00181"></a>00181 = <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">XmlController::m_xml_doc</a>-><a class="code" href="classhippodraw_1_1XmlDocument.html#a04ac45c092a130deb2b20ba2aedfa0c8" title="Creates a new DOM element wrapper object and returns a pointer to it.">createElement</a> ( <span class="stringliteral">"CutTarget"</span> ); <a name="l00182"></a>00182 element-><a class="code" href="classhippodraw_1_1XmlElement.html#abf6f7e218f61b094107a9e93ab267fd8" title="Sets attribute named name to the int value value.">setAttribute</a> ( <span class="stringliteral">"id"</span>, <span class="keywordtype">id</span> ); <a name="l00183"></a>00183 tag.<a class="code" href="classhippodraw_1_1XmlNode.html#ae8f46895ca8b33a11cbff29b56ba48e4" title="Appends a child element to the element.">appendChild</a> ( *element ); <a name="l00184"></a>00184 <span class="keyword">delete</span> element; <a name="l00185"></a>00185 } <a name="l00186"></a>00186 } <a name="l00187"></a>00187 <a name="l00188"></a>00188 <span class="keywordtype">void</span> <a name="l00189"></a>00189 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a4412df487d86028090a11fbccaa8b89d" title="Creates the child elements for the special case when the plotter is a TextPlotter...">PlotterBaseXML::</a> <a name="l00190"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a4412df487d86028090a11fbccaa8b89d">00190</a> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a4412df487d86028090a11fbccaa8b89d" title="Creates the child elements for the special case when the plotter is a TextPlotter...">createTextChildren</a> ( <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> & tag, <a name="l00191"></a>00191 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1TextPlotter.html" title="A Plotter class that draws text.">TextPlotter</a> & plotter ) <a name="l00192"></a>00192 { <a name="l00193"></a>00193 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep = plotter.<a class="code" href="classhippodraw_1_1TextPlotter.html#ac7b3bc5a3e719a7f022f55e0b056e9de" title="Returns the target DataRep of its own TextDataRep object.">getParentDataRep</a> (); <a name="l00194"></a>00194 <a name="l00195"></a>00195 <span class="keyword">const</span> <span class="keywordtype">void</span> * addr = reinterpret_cast < <span class="keyword">const</span> <span class="keywordtype">void</span> * > ( rep ); <a name="l00196"></a>00196 <span class="keywordtype">int</span> <span class="keywordtype">id</span> = <a class="code" href="classhippodraw_1_1BaseXML.html#ae50d78be58d5938b4434515f4f037ece" title="The singleton XML controller object.">m_controller</a> -> getId ( addr ); <a name="l00197"></a>00197 <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element <a name="l00198"></a>00198 = <a class="code" href="classhippodraw_1_1XmlController.html#a88c79c54a5590febd08ff65135a4a17d" title="The current document being generated or read.">XmlController::m_xml_doc</a>-><a class="code" href="classhippodraw_1_1XmlDocument.html#a04ac45c092a130deb2b20ba2aedfa0c8" title="Creates a new DOM element wrapper object and returns a pointer to it.">createElement</a> ( <span class="stringliteral">"TextTarget"</span> ); <a name="l00199"></a>00199 element-><a class="code" href="classhippodraw_1_1XmlElement.html#abf6f7e218f61b094107a9e93ab267fd8" title="Sets attribute named name to the int value value.">setAttribute</a> ( <span class="stringliteral">"id"</span>, <span class="keywordtype">id</span> ); <a name="l00200"></a>00200 <a name="l00201"></a>00201 tag.<a class="code" href="classhippodraw_1_1XmlNode.html#ae8f46895ca8b33a11cbff29b56ba48e4" title="Appends a child element to the element.">appendChild</a> ( *element ); <a name="l00202"></a>00202 <span class="keyword">delete</span> element; <a name="l00203"></a>00203 } <a name="l00204"></a>00204 <a name="l00205"></a>00205 <span class="keywordtype">void</span> <a name="l00206"></a>00206 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ac22b4964aaa9909860deb0cbe8c728a9" title="Creates all the font elements, if needed.">PlotterBaseXML::</a> <a name="l00207"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ac22b4964aaa9909860deb0cbe8c728a9">00207</a> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ac22b4964aaa9909860deb0cbe8c728a9" title="Creates all the font elements, if needed.">createFontElements</a> ( <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> & tag, <a name="l00208"></a>00208 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1XyPlotter.html" title="A Plotter class that plots points in 2 dimensions and option a third dimension in...">XyPlotter</a> & plotter ) <a name="l00209"></a>00209 { <a name="l00210"></a>00210 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1FontBase.html" title="A abstract base class for font handling.">FontBase</a> * font = plotter.<a class="code" href="classhippodraw_1_1XyPlotter.html#a26fff3ef0bc60d9b870b8bdd49bfaeb9" title="What font is being used to override the default while drawing title of plot.">titleFont</a> (); <a name="l00211"></a>00211 <span class="keywordflow">if</span> ( font != 0 ) { <a name="l00212"></a>00212 <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a34d536c5043350cab51c77c4f4a5e398" title="The FontXML instance used by this object.">m_font</a> -> <a class="code" href="classhippodraw_1_1BaseXML.html#afa1d42a894a8739e0d120ed9c4383d38" title="Creates a new element node.">createElement</a> (); <a name="l00213"></a>00213 <span class="keyword">const</span> <span class="keywordtype">string</span> t ( <span class="stringliteral">"t"</span> ); <a name="l00214"></a>00214 element -> setAttribute ( <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a3d53f427a722775ec41ae83421fe5fa2" title="The attribute name of labeling an axis for the AxisModelBase elements.">m_axis</a>, t ); <a name="l00215"></a>00215 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a34d536c5043350cab51c77c4f4a5e398" title="The FontXML instance used by this object.">m_font</a> -> setAttributes ( *element, *font ); <a name="l00216"></a>00216 tag.<a class="code" href="classhippodraw_1_1XmlNode.html#ae8f46895ca8b33a11cbff29b56ba48e4" title="Appends a child element to the element.">appendChild</a> ( *element ); <a name="l00217"></a>00217 <span class="keyword">delete</span> element; <a name="l00218"></a>00218 } <a name="l00219"></a>00219 <a name="l00220"></a>00220 <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < 3; i++ ) { <a name="l00221"></a>00221 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">Axes::Type</a> <a class="code" href="namespacenum__util.html#af7e893a8c6a5f6a426480fc85cda4fa1">type</a> = <a class="code" href="namespacehippodraw_1_1Axes.html#ae2337bddf33bc8b17dd5c08e665422cd" title="Converts from string representation ot Axes::Type representation.">Axes::convert</a> ( i ); <a name="l00222"></a>00222 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a1080cebb5bb6ba9a218a6fb5aa031c8d" title="Creates an element for label font.">createFontElement</a> ( tag, plotter, type ); <a name="l00223"></a>00223 } <a name="l00224"></a>00224 } <a name="l00225"></a>00225 <a name="l00226"></a>00226 <span class="keywordtype">void</span> <a name="l00227"></a>00227 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a1080cebb5bb6ba9a218a6fb5aa031c8d" title="Creates an element for label font.">PlotterBaseXML::</a> <a name="l00228"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a1080cebb5bb6ba9a218a6fb5aa031c8d">00228</a> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a1080cebb5bb6ba9a218a6fb5aa031c8d" title="Creates an element for label font.">createFontElement</a> ( <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> & tag, <a name="l00229"></a>00229 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1XyPlotter.html" title="A Plotter class that plots points in 2 dimensions and option a third dimension in...">XyPlotter</a> & plotter, <a name="l00230"></a>00230 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis ) <a name="l00231"></a>00231 { <a name="l00232"></a>00232 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1FontBase.html" title="A abstract base class for font handling.">FontBase</a> * font = plotter.<a class="code" href="classhippodraw_1_1XyPlotter.html#afc1ccf4fead69ae3ef56a0228871ab65" title="What font is being used to override the default while drawing axis label.">labelFont</a> ( axis ); <a name="l00233"></a>00233 <span class="keywordflow">if</span> ( font != 0 ) { <a name="l00234"></a>00234 <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a34d536c5043350cab51c77c4f4a5e398" title="The FontXML instance used by this object.">m_font</a> -> <a class="code" href="classhippodraw_1_1BaseXML.html#afa1d42a894a8739e0d120ed9c4383d38" title="Creates a new element node.">createElement</a> (); <a name="l00235"></a>00235 <span class="keywordtype">string</span> s; <a name="l00236"></a>00236 <span class="keywordflow">switch</span> ( axis ) <a name="l00237"></a>00237 { <a name="l00238"></a>00238 <span class="keywordflow">case</span> <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> : <a name="l00239"></a>00239 s = <span class="stringliteral">"x"</span>; <a name="l00240"></a>00240 <span class="keywordflow">break</span>; <a name="l00241"></a>00241 <span class="keywordflow">case</span> <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> : <a name="l00242"></a>00242 s = <span class="stringliteral">"y"</span>; <a name="l00243"></a>00243 <span class="keywordflow">break</span>; <a name="l00244"></a>00244 <span class="keywordflow">case</span> <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> : <a name="l00245"></a>00245 s = <span class="stringliteral">"z"</span>; <a name="l00246"></a>00246 <span class="keywordflow">break</span>; <a name="l00247"></a>00247 <span class="keywordflow">default</span>: <a name="l00248"></a>00248 assert ( <span class="keyword">false</span> ); <a name="l00249"></a>00249 <span class="keywordflow">break</span>; <a name="l00250"></a>00250 } <a name="l00251"></a>00251 element -> setAttribute ( <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a3d53f427a722775ec41ae83421fe5fa2" title="The attribute name of labeling an axis for the AxisModelBase elements.">m_axis</a>, s ); <a name="l00252"></a>00252 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a34d536c5043350cab51c77c4f4a5e398" title="The FontXML instance used by this object.">m_font</a> -> setAttributes ( *element, *font ); <a name="l00253"></a>00253 <a name="l00254"></a>00254 tag.<a class="code" href="classhippodraw_1_1XmlNode.html#ae8f46895ca8b33a11cbff29b56ba48e4" title="Appends a child element to the element.">appendChild</a> ( *element ); <a name="l00255"></a>00255 <span class="keyword">delete</span> element; <a name="l00256"></a>00256 } <a name="l00257"></a>00257 } <a name="l00258"></a>00258 <a name="l00259"></a>00259 <span class="keywordtype">void</span> <a name="l00260"></a>00260 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ae8c9fd89e6d92838af5c606eeafc0992" title="Creates an axis model child element for the specified axis.">PlotterBaseXML::</a> <a name="l00261"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ae8c9fd89e6d92838af5c606eeafc0992">00261</a> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ae8c9fd89e6d92838af5c606eeafc0992" title="Creates an axis model child element for the specified axis.">createAxisModel</a> ( <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> & tag, <a name="l00262"></a>00262 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> & plotter, <a name="l00263"></a>00263 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis ) <a name="l00264"></a>00264 { <a name="l00265"></a>00265 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1AxisModelBase.html" title="The AxisModelBase class maintains the Range and scaling of an axis.">AxisModelBase</a> * model = plotter.<a class="code" href="classhippodraw_1_1PlotterBase.html#a4380b8cb65adc1511aec737d5a0366c7" title="Returns the AxisModelBase derived class for the specified axis.">getAxisModel</a> ( axis ); <a name="l00266"></a>00266 <span class="keywordflow">if</span> ( model == 0 ) <span class="keywordflow">return</span>; <a name="l00267"></a>00267 <a name="l00268"></a>00268 <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a40ecba72a8edee861efef52c27f63ae9" title="The AxisModelXML instance used by this object.">m_axismodel</a>-><a class="code" href="classhippodraw_1_1BaseXML.html#afa1d42a894a8739e0d120ed9c4383d38" title="Creates a new element node.">createElement</a> (); <a name="l00269"></a>00269 <span class="keywordtype">string</span> tmp; <a name="l00270"></a>00270 <span class="keywordflow">if</span> ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> ) { <a name="l00271"></a>00271 tmp = <span class="stringliteral">"x"</span>; <a name="l00272"></a>00272 } <a name="l00273"></a>00273 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> ) { <a name="l00274"></a>00274 tmp = <span class="stringliteral">"y"</span>; <a name="l00275"></a>00275 } <a name="l00276"></a>00276 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> ) { <a name="l00277"></a>00277 tmp = <span class="stringliteral">"z"</span>; <a name="l00278"></a>00278 } <a name="l00279"></a>00279 element -> setAttribute ( <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a3d53f427a722775ec41ae83421fe5fa2" title="The attribute name of labeling an axis for the AxisModelBase elements.">m_axis</a>, tmp ); <a name="l00280"></a>00280 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a40ecba72a8edee861efef52c27f63ae9" title="The AxisModelXML instance used by this object.">m_axismodel</a>-><a class="code" href="classhippodraw_1_1AxisModelXML.html#a237712bde39429018a8bb51ff591e09a" title="Sets the attributes of the XmlElement tag from information in the AxisModel object...">setAttributes</a> ( *element, *model ); <a name="l00281"></a>00281 tag.<a class="code" href="classhippodraw_1_1XmlNode.html#ae8f46895ca8b33a11cbff29b56ba48e4" title="Appends a child element to the element.">appendChild</a> ( *element ); <a name="l00282"></a>00282 <span class="keyword">delete</span> element; <a name="l00283"></a>00283 } <a name="l00284"></a>00284 <a name="l00285"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#aa1bfc596f3b3bb9744ac2b5b4e0c2bf8">00285</a> <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * <a class="code" href="classhippodraw_1_1BaseXML.html#afa1d42a894a8739e0d120ed9c4383d38" title="Creates a new element node.">PlotterBaseXML::createElement</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> & plotter ) <a name="l00286"></a>00286 { <a name="l00287"></a>00287 <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * tag = <a class="code" href="classhippodraw_1_1BaseXML.html#afa1d42a894a8739e0d120ed9c4383d38" title="Creates a new element node.">BaseXML::createElement</a> (); <a name="l00288"></a>00288 <span class="keyword">const</span> <span class="keywordtype">void</span> * addr = reinterpret_cast < <span class="keyword">const</span> <span class="keywordtype">void</span> * > ( & plotter ); <a name="l00289"></a>00289 <span class="keywordtype">int</span> <span class="keywordtype">id</span> = <a class="code" href="classhippodraw_1_1BaseXML.html#ae50d78be58d5938b4434515f4f037ece" title="The singleton XML controller object.">m_controller</a> -> getId ( addr ); <a name="l00290"></a>00290 <a class="code" href="classhippodraw_1_1BaseXML.html#aba09fa4e77f2c85cc12df1116cb5f31e" title="Sets the unique identification of the object.">setId</a> ( *tag, <span class="keywordtype">id</span> ); <a name="l00291"></a>00291 <a name="l00292"></a>00292 tag-><a class="code" href="classhippodraw_1_1XmlElement.html#abf6f7e218f61b094107a9e93ab267fd8" title="Sets attribute named name to the int value value.">setAttribute</a> ( <a class="code" href="classhippodraw_1_1BaseXML.html#af21e457cccd7226d53593e24988c6734" title="The attribute name for the type of object.">m_type</a>, plotter.<a class="code" href="classhippodraw_1_1PlotterBase.html#a11c23a386abb9eb8a42f0c2c2835d640" title="Returns the name of the plotter.">name</a> () ); <a name="l00293"></a>00293 <a name="l00294"></a>00294 <span class="keyword">const</span> <span class="keywordtype">string</span> & title = plotter.<a class="code" href="classhippodraw_1_1PlotterBase.html#a495bef5a7e9196ee34c81ad9784cf5d4" title="Returns the internal title.">getInternalTitle</a> (); <a name="l00295"></a>00295 <span class="keyword">const</span> <span class="keywordtype">string</span> & x_label = plotter.<a class="code" href="classhippodraw_1_1PlotterBase.html#a57fef2f1bd9f6694f624780e76edc3d3" title="Returns the internal label.">getInternalLabel</a> ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> ); <a name="l00296"></a>00296 <span class="keyword">const</span> <span class="keywordtype">string</span> & y_label = plotter.<a class="code" href="classhippodraw_1_1PlotterBase.html#a57fef2f1bd9f6694f624780e76edc3d3" title="Returns the internal label.">getInternalLabel</a> ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> ); <a name="l00297"></a>00297 <span class="keyword">const</span> <span class="keywordtype">string</span> & z_label = plotter.<a class="code" href="classhippodraw_1_1PlotterBase.html#a57fef2f1bd9f6694f624780e76edc3d3" title="Returns the internal label.">getInternalLabel</a> ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> ); <a name="l00298"></a>00298 <a name="l00299"></a>00299 tag -> setAttribute ( <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a85b5b28ec973f933b9ed1328f2756def" title="The attribute name for the plot title.">m_title</a>, title ); <a name="l00300"></a>00300 tag -> setAttribute ( <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a8c25c8f1ef3b8bac6d46729b8798c8fe" title="The attribute name for X axis label.">m_x_label</a>, x_label ); <a name="l00301"></a>00301 tag -> setAttribute ( <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a304593454a19f765f43bc00701182c50" title="The attribute name for Y axis label.">m_y_label</a>, y_label ); <a name="l00302"></a>00302 tag -> setAttribute ( <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a1803857d16b082f0bb754fc9216b6f6a" title="The attribute name for Z axis label.">m_z_label</a>, z_label ); <a name="l00303"></a>00303 <a name="l00304"></a>00304 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * parent = plotter.<a class="code" href="classhippodraw_1_1PlotterBase.html#adc403d91ab32ba157322a5e8344b064e" title="Returns the parent plotter.">getParentPlotter</a> (); <a name="l00305"></a>00305 <span class="keywordflow">if</span> ( parent != 0 ) { <a name="l00306"></a>00306 <span class="keyword">const</span> <span class="keywordtype">void</span> * addr = reinterpret_cast < <span class="keyword">const</span> <span class="keywordtype">void</span> * > ( parent ); <a name="l00307"></a>00307 <span class="keywordtype">int</span> ref = <a class="code" href="classhippodraw_1_1BaseXML.html#ae50d78be58d5938b4434515f4f037ece" title="The singleton XML controller object.">m_controller</a> -> getId ( addr ); <a name="l00308"></a>00308 tag -> setAttribute ( <span class="stringliteral">"ref"</span>, ref ); <a name="l00309"></a>00309 <span class="keywordtype">int</span> index = plotter.<a class="code" href="classhippodraw_1_1PlotterBase.html#a18a59841e25d455c5079bc818fc0a5f3" title="Returns the index of the parent DataRep.">getParentDataRepIndex</a> ( ); <a name="l00310"></a>00310 tag -> setAttribute ( <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#af74a4e049c3356ed86055c7447d569e7" title="The attribute name used to save and restore index of parent DataRep.">m_pindex</a>, index ); <a name="l00311"></a>00311 } <a name="l00312"></a>00312 <a name="l00313"></a>00313 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#aea594f8f9c145938a76fc668d1c1d74e" title="Creates the children elements.">createChildren</a> ( *tag, plotter ); <a name="l00314"></a>00314 <a name="l00315"></a>00315 <span class="keywordflow">return</span> tag; <a name="l00316"></a>00316 } <a name="l00317"></a>00317 <a name="l00318"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a940ba78ed732e884dbe0e85ac9393f55">00318</a> <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a940ba78ed732e884dbe0e85ac9393f55" title="Returns the PlotterBase object represented by the element.">PlotterBaseXML::getObject</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * plot_element ) <a name="l00319"></a>00319 { <a name="l00320"></a>00320 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter = <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#aa4740938e5a017925c09bb0d23c4b189" title="Creates the plotter object from the XML element.">createPlotter</a> ( plot_element ); <a name="l00321"></a>00321 <a name="l00322"></a>00322 <span class="keywordflow">if</span> ( plotter == 0 ) <span class="keywordflow">return</span> 0; <a name="l00323"></a>00323 <a name="l00324"></a>00324 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ac0972f4ef35918b178bae0b601fa51fa" title="The TransfromXML instance used by this object.">m_transform_xml</a>-><a class="code" href="classhippodraw_1_1BaseXML.html#af145db70f519c8883e84023299d30356" title="Returns the single child node of element of the type that can be handled by this...">getNode</a> ( plot_element ); <a name="l00325"></a>00325 <span class="keywordflow">if</span> ( element != 0 ) { <a name="l00326"></a>00326 <a class="code" href="classhippodraw_1_1TransformBase.html" title="A transform that transforms coordinates from one coordinate system to another.">TransformBase</a> * transform = <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#ac0972f4ef35918b178bae0b601fa51fa" title="The TransfromXML instance used by this object.">m_transform_xml</a>-><a class="code" href="classhippodraw_1_1TransformXML.html#a99d6ddefa950b7ee004e6826e0e9a0f0" title="Creates an object derived from TransformBase.">createObject</a> ( element ); <a name="l00327"></a>00327 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a78b74f631dc0bb20ca4cc13a38530046" title="Sets the transform object.">setTransform</a> ( transform ); <a name="l00328"></a>00328 } <a name="l00329"></a>00329 <a name="l00330"></a>00330 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a43e8550b141b7d3242e9f4428e81d123" title="Re-creates AxisModelBase objects from the XML element.">createAxisModels</a> ( plot_element, plotter ); <a name="l00331"></a>00331 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a27dc408cbf152e492a7ab29187f82b0f" title="Creates the FontBase objects, if any.">createFontObjects</a> ( plot_element, plotter ); <a name="l00332"></a>00332 <a name="l00333"></a>00333 list < XmlElement * > nodelist; <a name="l00334"></a>00334 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a996831bea679c1ee76a66b2406eb31cf" title="The DataRepXML instance used by this object.">m_datarep</a>-><a class="code" href="classhippodraw_1_1BaseXML.html#a5341ca7744d304c2746a8f5564ce237b" title="Fills the nodelist with immediate child nodes of element with nodes that can be handled...">fillNodeList</a> ( plot_element, nodelist ); <a name="l00335"></a>00335 <a name="l00336"></a>00336 <a class="code" href="classhippodraw_1_1FunctionController.html" title="A singleton class is the interface between an application and the list of FunctionRep...">FunctionController</a> * controller = <a class="code" href="classhippodraw_1_1FunctionController.html#add005d3cdf4fc316aa46841a275f046d" title="Returns the pointer to the singleton instance.">FunctionController::instance</a>(); <a name="l00337"></a>00337 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep = 0; <a name="l00338"></a>00338 <a name="l00339"></a>00339 <span class="preprocessor">#ifdef ITERATOR_MEMBER_DEFECT</span> <a name="l00340"></a>00340 <span class="preprocessor"></span> std:: <a name="l00341"></a>00341 <span class="preprocessor">#endif</span> <a name="l00342"></a>00342 <span class="preprocessor"></span> list < XmlElement * > ::const_iterator first = nodelist.begin (); <a name="l00343"></a>00343 <span class="keywordflow">for</span> ( ; first != nodelist.end(); ++first ) { <a name="l00344"></a>00344 <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = *first; <a name="l00345"></a>00345 <span class="keywordtype">int</span> <span class="keywordtype">id</span> = element-><a class="code" href="classhippodraw_1_1XmlElement.html#a6204675a4fca73c67cd422e7e76c1beb" title="Returns the ID of the element, if it has one.">getID</a> (); <a name="l00346"></a>00346 rep = <a class="code" href="classhippodraw_1_1BaseXML.html#ae50d78be58d5938b4434515f4f037ece" title="The singleton XML controller object.">m_controller</a>-><a class="code" href="classhippodraw_1_1XmlController.html#adeda718878d52ea3402baa955862dad9" title="Returns a pointer to the DataRep from the xml reference Id.">getDataRep</a> ( <span class="keywordtype">id</span> ); <a name="l00347"></a>00347 <span class="keywordflow">if</span> ( rep == 0 ) { <a name="l00348"></a>00348 <span class="keywordtype">string</span> what ( <span class="stringliteral">"Unable to find data representation"</span> ); <a name="l00349"></a>00349 <span class="keywordflow">throw</span> <a class="code" href="classhippodraw_1_1DataRepException.html" title="An xception class that is thrown when attempting to bind a DataRep to a NTuple with...">DataRepException</a> ( what ); <a name="l00350"></a>00350 } <a name="l00351"></a>00351 <a name="l00352"></a>00352 assert ( rep ); <a name="l00353"></a>00353 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a7ab671b4b67f24457907017e0bfba536" title="Handles the DataRep object if it is FunctionRep.">handleFunction</a> ( element, rep ); <a name="l00354"></a>00354 controller-><a class="code" href="classhippodraw_1_1FunctionController.html#acb330ec9050a11a7cb17bb0736841fbe" title="Adds DataRep rep to the PlotterBase plotter.">addDataRep</a> ( plotter, rep ); <a name="l00355"></a>00355 } <a name="l00356"></a>00356 <a name="l00357"></a>00357 <a class="code" href="classhippodraw_1_1CutPlotter.html" title="A PlotterBase derived class that serves a base class for cut plotters.">CutPlotter</a> * cutplotter = dynamic_cast < <a class="code" href="classhippodraw_1_1CutPlotter.html" title="A PlotterBase derived class that serves a base class for cut plotters.">CutPlotter</a> * > ( plotter ); <a name="l00358"></a>00358 <span class="keywordflow">if</span> ( cutplotter != 0 ) { <a name="l00359"></a>00359 cutplotter -> addTupleCut ( rep ); <a name="l00360"></a>00360 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a1e80da95f8f175827479dbb7667a8d83" title="Handles the Cut attributes from the XML element.">handleCutPlotter</a> ( plot_element, cutplotter ); <a name="l00361"></a>00361 } <a name="l00362"></a>00362 <a name="l00363"></a>00363 <a class="code" href="classhippodraw_1_1TextPlotter.html" title="A Plotter class that draws text.">TextPlotter</a> * textplotter = dynamic_cast < <a class="code" href="classhippodraw_1_1TextPlotter.html" title="A Plotter class that draws text.">TextPlotter</a> * > ( plotter ); <a name="l00364"></a>00364 <span class="keywordflow">if</span> ( textplotter != 0 ) { <a name="l00365"></a>00365 <span class="keywordflow">if</span> ( ! ( <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a65ad13e0ca4447e975365bb1e5ffadf4" title="Handles the TextPlotter special attributes from the XML element.">handleTextPlotter</a> ( plot_element, textplotter ) ) ){ <a name="l00366"></a>00366 <span class="keywordflow">return</span> 0; <a name="l00367"></a>00367 } <a name="l00368"></a>00368 } <a name="l00369"></a>00369 <a name="l00370"></a>00370 <span class="keywordflow">return</span> plotter; <a name="l00371"></a>00371 } <a name="l00372"></a>00372 <a name="l00373"></a>00373 <span class="keywordtype">void</span> <a name="l00374"></a>00374 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a27dc408cbf152e492a7ab29187f82b0f" title="Creates the FontBase objects, if any.">PlotterBaseXML::</a> <a name="l00375"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a27dc408cbf152e492a7ab29187f82b0f">00375</a> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a27dc408cbf152e492a7ab29187f82b0f" title="Creates the FontBase objects, if any.">createFontObjects</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * plot_element, <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter ) <a name="l00376"></a>00376 { <a name="l00377"></a>00377 list < XmlElement * > nodelist; <a name="l00378"></a>00378 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a34d536c5043350cab51c77c4f4a5e398" title="The FontXML instance used by this object.">m_font</a> -> <a class="code" href="classhippodraw_1_1BaseXML.html#a5341ca7744d304c2746a8f5564ce237b" title="Fills the nodelist with immediate child nodes of element with nodes that can be handled...">fillNodeList</a> ( plot_element, nodelist ); <a name="l00379"></a>00379 <span class="keywordflow">if</span> ( nodelist.empty () == false ) { <a name="l00380"></a>00380 <a class="code" href="classhippodraw_1_1XyPlotter.html" title="A Plotter class that plots points in 2 dimensions and option a third dimension in...">XyPlotter</a> * xypl = dynamic_cast < <a class="code" href="classhippodraw_1_1XyPlotter.html" title="A Plotter class that plots points in 2 dimensions and option a third dimension in...">XyPlotter</a> * > ( plotter ); <a name="l00381"></a>00381 assert ( xypl ); <a name="l00382"></a>00382 <a name="l00383"></a>00383 list < XmlElement * > ::const_iterator first = nodelist.begin (); <a name="l00384"></a>00384 <a name="l00385"></a>00385 <span class="keywordflow">while</span> ( first != nodelist.end () ) { <a name="l00386"></a>00386 <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = *first++; <a name="l00387"></a>00387 <a class="code" href="classhippodraw_1_1FontBase.html" title="A abstract base class for font handling.">FontBase</a> * font = <a class="code" href="classhippodraw_1_1BaseXML.html#ae50d78be58d5938b4434515f4f037ece" title="The singleton XML controller object.">m_controller</a> -> createFont (); <a name="l00388"></a>00388 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a34d536c5043350cab51c77c4f4a5e398" title="The FontXML instance used by this object.">m_font</a> -> setAttributes ( element, font ); <a name="l00389"></a>00389 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">Axes::Type</a> axis = <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a34d536c5043350cab51c77c4f4a5e398" title="The FontXML instance used by this object.">m_font</a> -> getAxis ( element, <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a3d53f427a722775ec41ae83421fe5fa2" title="The attribute name of labeling an axis for the AxisModelBase elements.">m_axis</a> ); <a name="l00390"></a>00390 <span class="keywordflow">if</span> ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a21f40778b7db9343a6ca75ec2c41ccce" title="title">Axes::T</a> ) { <a name="l00391"></a>00391 xypl -> setTitleFont ( font ); <a name="l00392"></a>00392 } <a name="l00393"></a>00393 <span class="keywordflow">else</span> { <a name="l00394"></a>00394 xypl -> setLabelFont ( font, axis ); <a name="l00395"></a>00395 } <a name="l00396"></a>00396 } <a name="l00397"></a>00397 } <a name="l00398"></a>00398 } <a name="l00399"></a>00399 <a name="l00400"></a>00400 <span class="keywordtype">void</span> <a name="l00401"></a>00401 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a43e8550b141b7d3242e9f4428e81d123" title="Re-creates AxisModelBase objects from the XML element.">PlotterBaseXML::</a> <a name="l00402"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a43e8550b141b7d3242e9f4428e81d123">00402</a> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a43e8550b141b7d3242e9f4428e81d123" title="Re-creates AxisModelBase objects from the XML element.">createAxisModels</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * pl_element, <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter ) <a name="l00403"></a>00403 { <a name="l00404"></a>00404 list < XmlElement * > nodelist; <a name="l00405"></a>00405 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a40ecba72a8edee861efef52c27f63ae9" title="The AxisModelXML instance used by this object.">m_axismodel</a>-><a class="code" href="classhippodraw_1_1BaseXML.html#a5341ca7744d304c2746a8f5564ce237b" title="Fills the nodelist with immediate child nodes of element with nodes that can be handled...">fillNodeList</a> ( pl_element, nodelist ); <a name="l00406"></a>00406 <span class="keywordflow">if</span> ( nodelist.empty () == false ) { <a name="l00407"></a>00407 <a name="l00408"></a>00408 <span class="preprocessor">#ifdef ITERATOR_MEMBER_DEFECT</span> <a name="l00409"></a>00409 <span class="preprocessor"></span> std:: <a name="l00410"></a>00410 <span class="preprocessor">#endif</span> <a name="l00411"></a>00411 <span class="preprocessor"></span> list < XmlElement * > :: const_iterator first = nodelist.begin(); <a name="l00412"></a>00412 <span class="keywordflow">for</span> ( ; first != nodelist.end (); ++first ) { <a name="l00413"></a>00413 <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = *first; <a name="l00414"></a>00414 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">Axes::Type</a> axis = <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a40ecba72a8edee861efef52c27f63ae9" title="The AxisModelXML instance used by this object.">m_axismodel</a>-><a class="code" href="classhippodraw_1_1AxisModelXML.html#a544f2b3f7aea7602290c79a3cef3474e" title="Returns the Axis attribute value.">getAxis</a> ( element, <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a3d53f427a722775ec41ae83421fe5fa2" title="The attribute name of labeling an axis for the AxisModelBase elements.">m_axis</a> ); <a name="l00415"></a>00415 <span class="keywordflow">if</span> ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> ) plotter -> setEnableZ ( <span class="keyword">true</span> ); <a name="l00416"></a>00416 <a class="code" href="classhippodraw_1_1AxisModelBase.html" title="The AxisModelBase class maintains the Range and scaling of an axis.">AxisModelBase</a> * model = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a4380b8cb65adc1511aec737d5a0366c7" title="Returns the AxisModelBase derived class for the specified axis.">getAxisModel</a> ( axis ); <a name="l00417"></a>00417 <a name="l00418"></a>00418 <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a40ecba72a8edee861efef52c27f63ae9" title="The AxisModelXML instance used by this object.">m_axismodel</a>-><a class="code" href="classhippodraw_1_1AxisModelXML.html#a0149549a0dabcccabdc9248451dda462" title="Returns true if the element represents an axis model that is on a logarithmic scale...">isLog</a> ( element ) == true ) { <a name="l00419"></a>00419 <a class="code" href="AxisLoc_8h.html#a9b53735ee323795d625bf1a39a5c3407" title="The base class for the binner hierarchy.">AxisLoc</a> label = model-><a class="code" href="classhippodraw_1_1AxisModelBase.html#aa5cfb1d5e022633d10836bab146bbe98">getLabelLocation</a>(); <a name="l00420"></a>00420 <a class="code" href="AxisLoc_8h.html#a9b53735ee323795d625bf1a39a5c3407" title="The base class for the binner hierarchy.">AxisLoc</a> scale = model-><a class="code" href="classhippodraw_1_1AxisModelBase.html#aa7867c0d2da11f0cae02456590e0de48">getScaleLocation</a> (); <a name="l00421"></a>00421 <a class="code" href="classhippodraw_1_1AxisModelBase.html" title="The AxisModelBase class maintains the Range and scaling of an axis.">AxisModelBase</a> * tmp = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1AxisModelLog.html" title="Given a range, calculates a model for an axis with a log scale.">AxisModelLog</a> ( label, scale ); <a name="l00422"></a>00422 std::swap ( tmp, model ); <a name="l00423"></a>00423 <span class="keyword">delete</span> tmp; <a name="l00424"></a>00424 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a9f2854a2e173ad7296f233845dbce099" title="Sets the AxisModel on the specified axis.">setAxisModel</a> ( model, axis ); <a name="l00425"></a>00425 } <span class="comment">// log case</span> <a name="l00426"></a>00426 <a name="l00427"></a>00427 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a40ecba72a8edee861efef52c27f63ae9" title="The AxisModelXML instance used by this object.">m_axismodel</a>-><a class="code" href="classhippodraw_1_1AxisModelXML.html#a237712bde39429018a8bb51ff591e09a" title="Sets the attributes of the XmlElement tag from information in the AxisModel object...">setAttributes</a> ( model, element ); <a name="l00428"></a>00428 } <a name="l00429"></a>00429 } <a name="l00430"></a>00430 } <a name="l00431"></a>00431 <a name="l00432"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#aa4740938e5a017925c09bb0d23c4b189">00432</a> <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#aa4740938e5a017925c09bb0d23c4b189" title="Creates the plotter object from the XML element.">PlotterBaseXML::createPlotter</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element ) <a name="l00433"></a>00433 { <a name="l00434"></a>00434 <span class="keywordtype">string</span> <a class="code" href="namespacenum__util.html#af7e893a8c6a5f6a426480fc85cda4fa1">type</a>; <a name="l00435"></a>00435 <span class="keywordtype">bool</span> ok = element-><a class="code" href="classhippodraw_1_1XmlElement.html#afa83a3518bac3d6ae2bc519084071fad" title="Sets value to the attribute name&#39;s value.">attribute</a> ( <a class="code" href="classhippodraw_1_1BaseXML.html#af21e457cccd7226d53593e24988c6734" title="The attribute name for the type of object.">m_type</a>, type ); <a name="l00436"></a>00436 assert ( ok ); <a name="l00437"></a>00437 <a name="l00438"></a>00438 <span class="keywordtype">bool</span> has_Z = type == <span class="stringliteral">"XYColorPlotter"</span>; <a name="l00439"></a>00439 <span class="keywordflow">if</span> ( type == <span class="stringliteral">"XYPlotter"</span> || <a name="l00440"></a>00440 type == <span class="stringliteral">"XYColorPlotter"</span> ) { <span class="comment">// old names of current class</span> <a name="l00441"></a>00441 type = <span class="stringliteral">"XyPlotter"</span>; <a name="l00442"></a>00442 } <a name="l00443"></a>00443 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter = 0; <a name="l00444"></a>00444 <a class="code" href="classhippodraw_1_1PlotterFactory.html" title="This Singleton class maintains a list of plotters.">PlotterFactory</a> * factory = <a class="code" href="classhippodraw_1_1PlotterFactory.html#a3bda77c8923e86a3551b8aa8472e244f" title="Returns the pointer to the singleton instance.">PlotterFactory::instance</a> (); <a name="l00445"></a>00445 <span class="keywordflow">try</span> { <a name="l00446"></a>00446 plotter = factory-><a class="code" href="classhippodraw_1_1Factory.html#a1c53a3eab4f96ad0638fab10da2d6e03" title="Creates a new object from a prototype named name.">create</a> ( type ); <a name="l00447"></a>00447 <span class="keywordflow">if</span> ( has_Z ) plotter -><a class="code" href="classhippodraw_1_1PlotterBase.html#a04cd59885508cb37663b54c844bd97ae" title="Enables the Z axis, if plotter has one.">setEnableZ</a> (); <a name="l00448"></a>00448 <span class="keywordtype">int</span> <span class="keywordtype">id</span> = element -> getID (); <a name="l00449"></a>00449 <a class="code" href="classhippodraw_1_1BaseXML.html#ae50d78be58d5938b4434515f4f037ece" title="The singleton XML controller object.">m_controller</a> -> registerPlotter ( <span class="keywordtype">id</span>, plotter ); <a name="l00450"></a>00450 <a name="l00451"></a>00451 <span class="keywordtype">string</span> value; <a name="l00452"></a>00452 <span class="keywordtype">bool</span> needMargin; <a name="l00453"></a>00453 <a name="l00454"></a>00454 ok = element -> attribute ( <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a85b5b28ec973f933b9ed1328f2756def" title="The attribute name for the plot title.">m_title</a>, value ); <a name="l00455"></a>00455 plotter -> setTitle ( value ); <a name="l00456"></a>00456 needMargin = <a class="code" href="namespacehippodraw_1_1String.html#a75ef7a56cccf4985ff6924ec6cf8ff33" title="Case insensitive find.">String::ci_find</a>(value, <span class="stringliteral">"tex:"</span>)==0; <a name="l00457"></a>00457 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a3b145aec3e753917fd90b28d7e1eb6eb" title="Set and get additional margin on top,bottom,left of the plotter.">setTopMargin</a>(needMargin?10.0:0.0); <a name="l00458"></a>00458 <a name="l00459"></a>00459 ok = element -> attribute ( <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a8c25c8f1ef3b8bac6d46729b8798c8fe" title="The attribute name for X axis label.">m_x_label</a>, value ); <a name="l00460"></a>00460 plotter -> setLabel ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a>, value ); <a name="l00461"></a>00461 needMargin = <a class="code" href="namespacehippodraw_1_1String.html#a75ef7a56cccf4985ff6924ec6cf8ff33" title="Case insensitive find.">String::ci_find</a>(value, <span class="stringliteral">"tex:"</span>)==0; <a name="l00462"></a>00462 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a46209517fc616ffba582b3f350229ea9">setBottomMargin</a>(needMargin?8.0:0.0); <a name="l00463"></a>00463 <a name="l00464"></a>00464 ok = element -> attribute ( <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a304593454a19f765f43bc00701182c50" title="The attribute name for Y axis label.">m_y_label</a>, value ); <a name="l00465"></a>00465 plotter -> setLabel ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a>, value ); <a name="l00466"></a>00466 needMargin = <a class="code" href="namespacehippodraw_1_1String.html#a75ef7a56cccf4985ff6924ec6cf8ff33" title="Case insensitive find.">String::ci_find</a>(value, <span class="stringliteral">"tex:"</span>)==0; <a name="l00467"></a>00467 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a07314cbc95294b0f3e2131f00285283b">setLeftMargin</a>(needMargin?0.0:0.0); <a name="l00468"></a>00468 <a name="l00469"></a>00469 ok = element -> attribute ( <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a1803857d16b082f0bb754fc9216b6f6a" title="The attribute name for Z axis label.">m_z_label</a>, value ); <a name="l00470"></a>00470 plotter -> setLabel ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a>, value ); <a name="l00471"></a>00471 needMargin = <a class="code" href="namespacehippodraw_1_1String.html#a75ef7a56cccf4985ff6924ec6cf8ff33" title="Case insensitive find.">String::ci_find</a>(value, <span class="stringliteral">"tex:"</span>)==0; <a name="l00472"></a>00472 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a289f3fc86c87ce8d1f13f60f7d67aeb3">setZMargin</a>(needMargin?7.0:0.0); <a name="l00473"></a>00473 <a name="l00474"></a>00474 <span class="keywordtype">int</span> index; <a name="l00475"></a>00475 ok = element -> attribute ( <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#af74a4e049c3356ed86055c7447d569e7" title="The attribute name used to save and restore index of parent DataRep.">m_pindex</a>, index ); <a name="l00476"></a>00476 <span class="keywordflow">if</span> ( ok ) { <a name="l00477"></a>00477 plotter -> setParentDataRepIndex ( index ); <a name="l00478"></a>00478 } <a name="l00479"></a>00479 } <a name="l00480"></a>00480 <span class="keywordflow">catch</span> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1FactoryException.html" title="An exception class that is thrown when the factory fails to find the request class...">FactoryException</a> & ) { <a name="l00481"></a>00481 assert ( <span class="keyword">false</span> ); <a name="l00482"></a>00482 } <a name="l00483"></a>00483 <a name="l00484"></a>00484 <span class="keywordflow">return</span> plotter; <a name="l00485"></a>00485 } <a name="l00486"></a>00486 <a name="l00487"></a>00487 <span class="keywordtype">void</span> <a name="l00488"></a>00488 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#af12a65ce06f314a1811c719fd7dd132b" title="Searches for and connects up the target DataRep objects of the plotter.">PlotterBaseXML::</a> <a name="l00489"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#af12a65ce06f314a1811c719fd7dd132b">00489</a> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#af12a65ce06f314a1811c719fd7dd132b" title="Searches for and connects up the target DataRep objects of the plotter.">getCutTargets</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * plot_element, <a class="code" href="classhippodraw_1_1CutPlotter.html" title="A PlotterBase derived class that serves a base class for cut plotters.">CutPlotter</a> * plotter ) <a name="l00490"></a>00490 { <a name="l00491"></a>00491 list < XmlElement * > nodelist; <a name="l00492"></a>00492 plot_element-><a class="code" href="classhippodraw_1_1XmlElement.html#a8833ffd83f5ea03c985fcf9e18b30135" title="Fills the nodeList with elements with tag name tagName.">fillNodeList</a> ( <span class="stringliteral">"CutTarget"</span>, nodelist ); <a name="l00493"></a>00493 <span class="keywordflow">if</span> ( nodelist.empty() ) <span class="keywordflow">return</span>; <a name="l00494"></a>00494 <a name="l00495"></a>00495 <span class="preprocessor">#ifdef ITERATOR_MEMBER_DEFECT</span> <a name="l00496"></a>00496 <span class="preprocessor"></span> std:: <a name="l00497"></a>00497 <span class="preprocessor">#endif</span> <a name="l00498"></a>00498 <span class="preprocessor"></span> list < XmlElement * > :: const_iterator first = nodelist.begin(); <a name="l00499"></a>00499 <span class="keywordflow">for</span> ( ; first != nodelist.end(); ++first ) { <a name="l00500"></a>00500 <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = *first; <a name="l00501"></a>00501 <span class="keywordtype">int</span> ref = element-><a class="code" href="classhippodraw_1_1XmlElement.html#a6204675a4fca73c67cd422e7e76c1beb" title="Returns the ID of the element, if it has one.">getID</a> (); <a name="l00502"></a>00502 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * target = <a class="code" href="classhippodraw_1_1BaseXML.html#ae50d78be58d5938b4434515f4f037ece" title="The singleton XML controller object.">m_controller</a>-><a class="code" href="classhippodraw_1_1XmlController.html#adeda718878d52ea3402baa955862dad9" title="Returns a pointer to the DataRep from the xml reference Id.">getDataRep</a> ( ref ); <a name="l00503"></a>00503 <span class="keywordflow">if</span> ( target != 0 ) { <span class="comment">// may not be part of copy/paste</span> <a name="l00504"></a>00504 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * pb = target -> getProjector (); <a name="l00505"></a>00505 <a class="code" href="classhippodraw_1_1NTupleProjector.html" title="An NTupleProjector is a projector that projects data from an DataSource object.">NTupleProjector</a> * projector <a name="l00506"></a>00506 = dynamic_cast < <a class="code" href="classhippodraw_1_1NTupleProjector.html" title="An NTupleProjector is a projector that projects data from an DataSource object.">NTupleProjector</a> * > ( pb ); <a name="l00507"></a>00507 <a name="l00508"></a>00508 <span class="keyword">const</span> vector < TupleCut > & cuts = plotter -> getCuts (); <a name="l00509"></a>00509 <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < cuts.size(); i++ ) { <a name="l00510"></a>00510 projector -> addCut ( &cuts[i] ); <a name="l00511"></a>00511 } <a name="l00512"></a>00512 target -> setDirty ( <span class="keyword">true</span> ); <a name="l00513"></a>00513 plotter-><a class="code" href="classhippodraw_1_1CutPlotter.html#a13e6333e6edc7bd6d5244fa21494f6a9" title="Adds a DataRep to the list of targets.">addCutTarget</a> ( target ); <a name="l00514"></a>00514 } <a name="l00515"></a>00515 } <a name="l00516"></a>00516 } <a name="l00517"></a>00517 <a name="l00520"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a7ab671b4b67f24457907017e0bfba536">00520</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a7ab671b4b67f24457907017e0bfba536" title="Handles the DataRep object if it is FunctionRep.">PlotterBaseXML::handleFunction</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * dr_element, <a name="l00521"></a>00521 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep ) <a name="l00522"></a>00522 { <a name="l00523"></a>00523 <a class="code" href="classhippodraw_1_1FunctionRep.html" title="A derived class of DataRep which is a base class for displaying a function.">FunctionRep</a> * frep = dynamic_cast < <a class="code" href="classhippodraw_1_1FunctionRep.html" title="A derived class of DataRep which is a base class for displaying a function.">FunctionRep</a> * > ( rep ); <a name="l00524"></a>00524 <span class="keywordflow">if</span> ( frep == 0 ) <span class="keywordflow">return</span>; <a name="l00525"></a>00525 <a name="l00526"></a>00526 <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = dr_element-><a class="code" href="classhippodraw_1_1XmlElement.html#a7147817d0afff9c4283e6a4d6e03ab08" title="Returns the single direct child element node with name tagName.">getNode</a> ( <span class="stringliteral">"FunctionTarget"</span> ); <a name="l00527"></a>00527 <span class="keywordtype">int</span> <span class="keywordtype">id</span> = element-><a class="code" href="classhippodraw_1_1XmlElement.html#a6204675a4fca73c67cd422e7e76c1beb" title="Returns the ID of the element, if it has one.">getID</a> (); <a name="l00528"></a>00528 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * target = <a class="code" href="classhippodraw_1_1BaseXML.html#ae50d78be58d5938b4434515f4f037ece" title="The singleton XML controller object.">m_controller</a>-><a class="code" href="classhippodraw_1_1XmlController.html#adeda718878d52ea3402baa955862dad9" title="Returns a pointer to the DataRep from the xml reference Id.">getDataRep</a> ( <span class="keywordtype">id</span> ); <a name="l00529"></a>00529 assert ( target ); <a name="l00530"></a>00530 frep-><a class="code" href="classhippodraw_1_1FunctionRep.html#acbe02ca7d2427e4119c0267527fe5150" title="Sets the target for the FunctionRep.">setTarget</a> ( target ); <a name="l00531"></a>00531 } <a name="l00532"></a>00532 <a name="l00536"></a>00536 <span class="keywordtype">void</span> <a name="l00537"></a>00537 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a1e80da95f8f175827479dbb7667a8d83" title="Handles the Cut attributes from the XML element.">PlotterBaseXML::</a> <a name="l00538"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a1e80da95f8f175827479dbb7667a8d83">00538</a> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a1e80da95f8f175827479dbb7667a8d83" title="Handles the Cut attributes from the XML element.">handleCutPlotter</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * plot_element, <a class="code" href="classhippodraw_1_1CutPlotter.html" title="A PlotterBase derived class that serves a base class for cut plotters.">CutPlotter</a> * plotter ) <a name="l00539"></a>00539 { <a name="l00540"></a>00540 vector < const TupleCut * > cuts; <a name="l00541"></a>00541 <span class="comment">// const XmlElement * element = m_tuple_cut_xml->getNode ( plot_element );</span> <a name="l00542"></a>00542 <a name="l00543"></a>00543 list < XmlElement * > node_list; <a name="l00544"></a>00544 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a74a455fe6f9d79262375f28d147ca7e4" title="The TupleCutXML instance used by this object.">m_tuple_cut_xml</a> -> <a class="code" href="classhippodraw_1_1BaseXML.html#a5341ca7744d304c2746a8f5564ce237b" title="Fills the nodelist with immediate child nodes of element with nodes that can be handled...">fillNodeList</a> ( plot_element, node_list ); <a name="l00545"></a>00545 list < XmlElement * >::const_iterator first = node_list.begin(); <a name="l00546"></a>00546 <a name="l00547"></a>00547 <span class="keywordflow">while</span> ( first != node_list.end() ) { <a name="l00548"></a>00548 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = *first++; <a name="l00549"></a>00549 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> a = 0; <a name="l00550"></a>00550 <span class="comment">// bool ok = </span> <a name="l00551"></a>00551 element -> attribute ( <span class="stringliteral">"axis"</span>, a ); <a name="l00552"></a>00552 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">Axes::Type</a> axis = <a class="code" href="namespacehippodraw_1_1Axes.html#ae2337bddf33bc8b17dd5c08e665422cd" title="Converts from string representation ot Axes::Type representation.">Axes::convert</a> ( a ); <a name="l00553"></a>00553 <span class="keyword">const</span> <span class="keywordtype">string</span> & label = plotter -> getLabel ( axis ); <a name="l00554"></a>00554 <a name="l00555"></a>00555 <span class="keywordtype">int</span> <span class="keywordtype">id</span> = element-><a class="code" href="classhippodraw_1_1XmlElement.html#a6204675a4fca73c67cd422e7e76c1beb" title="Returns the ID of the element, if it has one.">getID</a> (); <a name="l00556"></a>00556 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1TupleCut.html" title="The class expresses a cut on a DataSource, i.e.">TupleCut</a> * tuplecut = <a class="code" href="classhippodraw_1_1BaseXML.html#ae50d78be58d5938b4434515f4f037ece" title="The singleton XML controller object.">m_controller</a>-><a class="code" href="classhippodraw_1_1XmlController.html#aae07b9e4e44e5753159043fd53e32099" title="Returns pointer to the TupleCut from the xml reference Id.">getTupleCut</a> ( <span class="keywordtype">id</span> ); <a name="l00557"></a>00557 <a class="code" href="classhippodraw_1_1TupleCut.html" title="The class expresses a cut on a DataSource, i.e.">TupleCut</a> * tc = const_cast < <a class="code" href="classhippodraw_1_1TupleCut.html" title="The class expresses a cut on a DataSource, i.e.">TupleCut</a> * > ( tuplecut ); <a name="l00558"></a>00558 tc -> setLabel ( label ); <a name="l00559"></a>00559 cuts.push_back ( tuplecut ); <a name="l00560"></a>00560 tuplecut = <a class="code" href="classhippodraw_1_1BaseXML.html#ae50d78be58d5938b4434515f4f037ece" title="The singleton XML controller object.">m_controller</a> -> getTupleCut ( -<span class="keywordtype">id</span> ); <span class="comment">// old multiDim</span> <a name="l00561"></a>00561 <span class="keywordflow">if</span> ( tuplecut != 0 ) { <a name="l00562"></a>00562 cuts.push_back ( tuplecut ); <a name="l00563"></a>00563 } <a name="l00564"></a>00564 } <a name="l00565"></a>00565 plotter-><a class="code" href="classhippodraw_1_1CutPlotter.html#a929925a8bce859886b9bad3a7cb266c6" title="Sets the TupleCut objects to be used by this plotter.">setCuts</a> ( cuts ); <a name="l00566"></a>00566 <a name="l00567"></a>00567 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#af12a65ce06f314a1811c719fd7dd132b" title="Searches for and connects up the target DataRep objects of the plotter.">getCutTargets</a> ( plot_element, plotter ); <a name="l00568"></a>00568 } <a name="l00569"></a>00569 <a name="l00570"></a>00570 <span class="keywordtype">int</span> <a name="l00571"></a>00571 <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a65ad13e0ca4447e975365bb1e5ffadf4" title="Handles the TextPlotter special attributes from the XML element.">PlotterBaseXML::</a> <a name="l00572"></a><a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a65ad13e0ca4447e975365bb1e5ffadf4">00572</a> <a class="code" href="classhippodraw_1_1PlotterBaseXML.html#a65ad13e0ca4447e975365bb1e5ffadf4" title="Handles the TextPlotter special attributes from the XML element.">handleTextPlotter</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * plot_element, <a class="code" href="classhippodraw_1_1TextPlotter.html" title="A Plotter class that draws text.">TextPlotter</a> * plotter ) <a name="l00573"></a>00573 { <a name="l00574"></a>00574 <a name="l00575"></a>00575 <a class="code" href="classhippodraw_1_1XmlElement.html" title="A pure virtual base class of XML element wrapper.">XmlElement</a> * element = plot_element-><a class="code" href="classhippodraw_1_1XmlElement.html#a7147817d0afff9c4283e6a4d6e03ab08" title="Returns the single direct child element node with name tagName.">getNode</a> ( <span class="stringliteral">"TextTarget"</span> ); <a name="l00576"></a>00576 <span class="keywordtype">int</span> <span class="keywordtype">id</span> = element-><a class="code" href="classhippodraw_1_1XmlElement.html#a6204675a4fca73c67cd422e7e76c1beb" title="Returns the ID of the element, if it has one.">getID</a> (); <a name="l00577"></a>00577 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * target = <a class="code" href="classhippodraw_1_1BaseXML.html#ae50d78be58d5938b4434515f4f037ece" title="The singleton XML controller object.">m_controller</a>-><a class="code" href="classhippodraw_1_1XmlController.html#adeda718878d52ea3402baa955862dad9" title="Returns a pointer to the DataRep from the xml reference Id.">getDataRep</a> ( <span class="keywordtype">id</span> ); <a name="l00578"></a>00578 <a name="l00579"></a>00579 <span class="keywordflow">if</span> ( !target ){ <a name="l00580"></a>00580 <span class="keywordflow">return</span> 0; <a name="l00581"></a>00581 } <a name="l00582"></a>00582 <a name="l00583"></a>00583 assert ( target ); <a name="l00584"></a>00584 plotter-><a class="code" href="classhippodraw_1_1TextPlotter.html#a575fb04b654ddc672e474ed73fc1935a" title="Sets the target DataRep of its own TextDataRep object.">setParentDataRep</a> ( target ); <a name="l00585"></a>00585 <a name="l00586"></a>00586 <span class="keywordflow">return</span> 1; <a name="l00587"></a>00587 } </pre></div></div> <hr size="1"><address style="align: right;"><small> Generated for HippoDraw Class Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0> </a> </small></address> </body> </html>