<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_546918f92081d0a3941b8fe5c9b2d53f.html">controllers</a> </div> </div> <div class="contents"> <h1>DisplayController.cxx</h1><a href="DisplayController_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <a name="l00013"></a>00013 <span class="comment">// for cfitsio</span> <a name="l00014"></a>00014 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span> <a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#include "config.h"</span> <a name="l00016"></a>00016 <span class="preprocessor">#else</span> <a name="l00017"></a>00017 <span class="preprocessor"></span> <a name="l00018"></a>00018 <span class="comment">// for truncation warning in debug mode and version</span> <a name="l00019"></a>00019 <span class="preprocessor">#ifdef _MSC_VER</span> <a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#include "msdevstudio/MSconfig.h"</span> <a name="l00021"></a>00021 <span class="preprocessor">#endif</span> <a name="l00022"></a>00022 <span class="preprocessor"></span> <a name="l00023"></a>00023 <span class="preprocessor">#endif // HAVE_CONFIG_H</span> <a name="l00024"></a>00024 <span class="preprocessor"></span> <a name="l00025"></a>00025 <span class="preprocessor">#include <iostream></span> <a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="DisplayController_8h.html" title="DisplayController class interface declaration.">DisplayController.h</a>"</span> <a name="l00027"></a>00027 <a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="DataRepController_8h.html" title="DataRepController class interface.">DataRepController.h</a>"</span> <a name="l00029"></a>00029 <span class="preprocessor">#include "<a class="code" href="FunctionController_8h.html" title="hippodraw::FunctionController class interface">FunctionController.h</a>"</span> <a name="l00030"></a>00030 <a name="l00031"></a>00031 <span class="preprocessor">#include "<a class="code" href="AxisModelLog_8h.html" title="AxisModelLog class interface.">axes/AxisModelLog.h</a>"</span> <a name="l00032"></a>00032 <span class="preprocessor">#include "<a class="code" href="AxisModelLinear_8h.html" title="hippodraw::AxisModelLinear class interface">axes/AxisModelLinear.h</a>"</span> <a name="l00033"></a>00033 <a name="l00034"></a>00034 <span class="preprocessor">#include "<a class="code" href="BinnerAxis_8h.html" title="hippodraw::BinnerAxis class interface">binners/BinnerAxis.h</a>"</span> <a name="l00035"></a>00035 <span class="preprocessor">#include "<a class="code" href="BinnerAxisFactory_8h.html">binners/BinnerAxisFactory.h</a>"</span> <a name="l00036"></a>00036 <a name="l00037"></a>00037 <span class="preprocessor">#include "<a class="code" href="DataRepException_8h.html">datareps/DataRepException.h</a>"</span> <a name="l00038"></a>00038 <span class="preprocessor">#include "<a class="code" href="DataRepFactory_8h.html">datareps/DataRepFactory.h</a>"</span> <a name="l00039"></a>00039 <span class="preprocessor">#include "<a class="code" href="FunctionRep_8h.html" title="hippodraw::FunctionRep class interface">datareps/FunctionRep.h</a>"</span> <a name="l00040"></a>00040 <span class="preprocessor">#include "<a class="code" href="LineDataRep_8h.html" title="LineDataRep class interface.">datareps/LineDataRep.h</a>"</span> <a name="l00041"></a>00041 <span class="preprocessor">#include "<a class="code" href="TextDataRep_8h.html" title="hippodraw::TextDataRep class interface">datareps/TextDataRep.h</a>"</span> <a name="l00042"></a>00042 <span class="preprocessor">#include "<a class="code" href="StripChart_8h.html" title="StripChart class interface.">datareps/StripChart.h</a>"</span> <a name="l00043"></a>00043 <a name="l00044"></a>00044 <span class="preprocessor">#include "<a class="code" href="DataSourceController_8h.html" title="DataSourceController class interface.">datasrcs/DataSourceController.h</a>"</span> <a name="l00045"></a>00045 <span class="preprocessor">#include "<a class="code" href="NTuple_8h.html" title="hippodraw::NTuple class interface.">datasrcs/NTuple.h</a>"</span> <a name="l00046"></a>00046 <span class="preprocessor">#include "<a class="code" href="NTupleController_8h.html" title="hippodraw::NTupleController class interface">datasrcs/NTupleController.h</a>"</span> <a name="l00047"></a>00047 <a name="l00048"></a>00048 <span class="preprocessor">#include "<a class="code" href="ViewBase_8h.html" title="hippodraw::ViewBase class interface">graphics/ViewBase.h</a>"</span> <a name="l00049"></a>00049 <span class="preprocessor">#include "<a class="code" href="ViewFactory_8h.html" title="ViewFactory class interface.">graphics/ViewFactory.h</a>"</span> <a name="l00050"></a>00050 <a name="l00051"></a>00051 <span class="preprocessor">#include "<a class="code" href="PlotterException_8h.html" title="PlotterException class interface.">plotters/PlotterException.h</a>"</span> <a name="l00052"></a>00052 <span class="preprocessor">#include "<a class="code" href="PlotterFactory_8h.html">plotters/PlotterFactory.h</a>"</span> <a name="l00053"></a>00053 <span class="preprocessor">#include "<a class="code" href="TextPlotter_8h.html" title="TextPlotter class interface.">plotters/TextPlotter.h</a>"</span> <a name="l00054"></a>00054 <span class="preprocessor">#include "<a class="code" href="XyPlotter_8h.html" title="hippodraw::XyPlotter class interface">plotters/XyPlotter.h</a>"</span> <a name="l00055"></a>00055 <a name="l00056"></a>00056 <span class="preprocessor">#include "<a class="code" href="BinningProjector_8h.html" title="hippodraw::BinningProjector class interface">projectors/BinningProjector.h</a>"</span> <a name="l00057"></a>00057 <span class="preprocessor">#include "<a class="code" href="NTupleProjector_8h.html" title="hippodraw::NTupleProjector class interface">projectors/NTupleProjector.h</a>"</span> <a name="l00058"></a>00058 <a name="l00059"></a>00059 <span class="preprocessor">#include "<a class="code" href="BinToMovingBrkPt_8h.html" title="BinToMovingBrkPt class interface.">colorreps/BinToMovingBrkPt.h</a>"</span> <a name="l00060"></a>00060 <span class="preprocessor">#include "<a class="code" href="BinToColorScaleMovingBrkPt_8h.html" title="hippodraw::BinToColorScaleMovingBrkPt class interface">colorreps/BinToColorScaleMovingBrkPt.h</a>"</span> <a name="l00061"></a>00061 <span class="preprocessor">#include "<a class="code" href="BinToColorFactory_8h.html" title="BinToColorFactory class interface.">colorreps/BinToColorFactory.h</a>"</span> <a name="l00062"></a>00062 <span class="preprocessor">#include "<a class="code" href="BinToUsrDefinedScale_8h.html" title="BinToUsrDefinedScale class interface.">colorreps/BinToUsrDefinedScale.h</a>"</span> <a name="l00063"></a>00063 <span class="preprocessor">#include "<a class="code" href="ColumnPointRep_8h.html" title="hippodraw::ColumnPointRep class interface">reps/ColumnPointRep.h</a>"</span> <a name="l00064"></a>00064 <span class="preprocessor">#include "<a class="code" href="LinePointRep_8h.html" title="hippodraw::LinePointRep class interface">reps/LinePointRep.h</a>"</span> <a name="l00065"></a>00065 <span class="preprocessor">#include "<a class="code" href="PointRepFactory_8h.html" title="PointRepFactory class interface.">reps/PointRepFactory.h</a>"</span> <a name="l00066"></a>00066 <span class="preprocessor">#include "<a class="code" href="SymbolPointRep_8h.html" title="hippodraw::SymbolPointRep class interface">reps/SymbolPointRep.h</a>"</span> <a name="l00067"></a>00067 <span class="preprocessor">#include "<a class="code" href="TextRepBase_8h.html" title="hippodraw::TextRepBase class interface">reps/TextRepBase.h</a>"</span> <a name="l00068"></a>00068 <span class="preprocessor">#include "<a class="code" href="TextRepFactory_8h.html" title="hippodraw::TextRepFactory class interface">reps/TextRepFactory.h</a>"</span> <a name="l00069"></a>00069 <a name="l00070"></a>00070 <span class="preprocessor">#include "<a class="code" href="TransformFactory_8h.html">transforms/TransformFactory.h</a>"</span> <a name="l00071"></a>00071 <span class="preprocessor">#include "<a class="code" href="XYTransform_8h.html" title="hippodraw::XYTransform class interface">transforms/XYTransform.h</a>"</span> <a name="l00072"></a>00072 <a name="l00073"></a>00073 <span class="preprocessor">#ifdef HAVE_CFITSIO</span> <a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="FitsController_8h.html" title="hippodraw::FitsController class interface.">fits/FitsController.h</a>"</span> <a name="l00075"></a>00075 <span class="preprocessor">#endif</span> <a name="l00076"></a>00076 <span class="preprocessor"></span> <a name="l00077"></a>00077 <span class="preprocessor">#include <algorithm></span> <a name="l00078"></a>00078 <a name="l00079"></a>00079 <span class="preprocessor">#include <cassert></span> <a name="l00080"></a>00080 <a name="l00081"></a>00081 <span class="keyword">using</span> std::list; <a name="l00082"></a>00082 <span class="keyword">using</span> std::string; <a name="l00083"></a>00083 <span class="keyword">using</span> std::swap; <a name="l00084"></a>00084 <span class="keyword">using</span> std::vector; <a name="l00085"></a>00085 <span class="keyword">using</span> std::find; <a name="l00086"></a>00086 <a name="l00087"></a>00087 <span class="keyword">using namespace </span>hippodraw; <a name="l00088"></a>00088 <a name="l00089"></a>00089 <a class="code" href="classhippodraw_1_1DisplayController.html" title="A singleton class that is the interface between GUI and the displays.">DisplayController</a> * DisplayController::s_instance = 0; <a name="l00090"></a>00090 <a name="l00091"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a7a123e904c61d756661e9cf2b1779704">00091</a> DisplayController::DisplayController ( ) <a name="l00092"></a>00092 { <a name="l00093"></a>00093 } <a name="l00094"></a>00094 <a name="l00095"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a51c0b44f89ea44d96f4134fea3a9476a">00095</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a51c0b44f89ea44d96f4134fea3a9476a" title="The destructor.">DisplayController::~DisplayController</a> ( ) <a name="l00096"></a>00096 { <a name="l00097"></a>00097 <a class="code" href="classhippodraw_1_1DataRepController.html" title="A singleton class that is the interface between GUI and the DataRep.">DataRepController</a> * controller = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">DataRepController::instance</a> (); <a name="l00098"></a>00098 <span class="keyword">delete</span> controller; <a name="l00099"></a>00099 } <a name="l00100"></a>00100 <a name="l00101"></a><a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f">00101</a> <a class="code" href="classhippodraw_1_1DisplayController.html" title="A singleton class that is the interface between GUI and the displays.">DisplayController</a> * <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">DisplayController::instance</a> ( ) <a name="l00102"></a>00102 { <a name="l00103"></a>00103 <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1DisplayController.html#a7c662e8b2acc9baa5d26612c108de09f" title="The pointer to the singleton object.">s_instance</a> == 0 ) { <a name="l00104"></a>00104 <a class="code" href="classhippodraw_1_1DisplayController.html#a7c662e8b2acc9baa5d26612c108de09f" title="The pointer to the singleton object.">s_instance</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1DisplayController.html#a7a123e904c61d756661e9cf2b1779704" title="A default constructor for avoiding creation except by itself or with derived classes...">DisplayController</a> ( ); <a name="l00105"></a>00105 } <a name="l00106"></a>00106 <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1DisplayController.html#a7c662e8b2acc9baa5d26612c108de09f" title="The pointer to the singleton object.">s_instance</a>; <a name="l00107"></a>00107 } <a name="l00108"></a>00108 <a name="l00109"></a>00109 <span class="keyword">const</span> vector < string > & <a name="l00110"></a>00110 <a class="code" href="classhippodraw_1_1DisplayController.html#a532eaf3e1dc04f214318bbb7831c7ceb" title="Returns the types of value to color transforms available.">DisplayController::</a> <a name="l00111"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a532eaf3e1dc04f214318bbb7831c7ceb">00111</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a532eaf3e1dc04f214318bbb7831c7ceb" title="Returns the types of value to color transforms available.">getValueTransformTypes</a> ()<span class="keyword"> const </span> <a name="l00112"></a>00112 <span class="keyword"></span>{ <a name="l00113"></a>00113 <a class="code" href="classhippodraw_1_1BinToColorFactory.html" title="A factory for creation of objects whose class is derived from BinToColor.">BinToColorFactory</a> * factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">BinToColorFactory::instance</a> (); <a name="l00114"></a>00114 <a name="l00115"></a>00115 <span class="keywordflow">return</span> factory -> names (); <a name="l00116"></a>00116 } <a name="l00117"></a>00117 <a name="l00118"></a>00118 <span class="keywordtype">void</span> <a name="l00119"></a>00119 <a class="code" href="classhippodraw_1_1DisplayController.html#a02e1053c188eff053b50510d91f165e2" title="Sets the value to color transform model.">DisplayController::</a> <a name="l00120"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a02e1053c188eff053b50510d91f165e2">00120</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a02e1053c188eff053b50510d91f165e2" title="Sets the value to color transform model.">setValueTransform</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <span class="keyword">const</span> std::string & name ) <a name="l00121"></a>00121 { <a name="l00122"></a>00122 <a class="code" href="classhippodraw_1_1BinToColorFactory.html" title="A factory for creation of objects whose class is derived from BinToColor.">BinToColorFactory</a> * factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">BinToColorFactory::instance</a> (); <a name="l00123"></a>00123 <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> * model = factory -> create ( name ); <a name="l00124"></a>00124 <a name="l00125"></a>00125 plotter -> setValueRep ( model ); <a name="l00126"></a>00126 } <a name="l00127"></a>00127 <a name="l00128"></a>00128 <span class="keywordtype">void</span> <a name="l00129"></a>00129 <a class="code" href="classhippodraw_1_1DisplayController.html#a02e1053c188eff053b50510d91f165e2" title="Sets the value to color transform model.">DisplayController::</a> <a name="l00130"></a><a class="code" href="classhippodraw_1_1DisplayController.html#af45dc3a09fdf2a300e96c270cc864757">00130</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a02e1053c188eff053b50510d91f165e2" title="Sets the value to color transform model.">setValueTransform</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <span class="keywordtype">int</span> index ) <a name="l00131"></a>00131 { <a name="l00132"></a>00132 <a class="code" href="classhippodraw_1_1BinToColorFactory.html" title="A factory for creation of objects whose class is derived from BinToColor.">BinToColorFactory</a> * factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">BinToColorFactory::instance</a> (); <a name="l00133"></a>00133 <span class="keyword">const</span> vector < string > & names = factory -> names (); <a name="l00134"></a>00134 <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> * rep = factory -> create ( names[index] ); <a name="l00135"></a>00135 <a name="l00136"></a>00136 plotter -> setValueRep ( rep ); <a name="l00137"></a>00137 } <a name="l00138"></a>00138 <a name="l00139"></a>00139 <span class="keywordtype">void</span> <a name="l00140"></a>00140 <a class="code" href="classhippodraw_1_1DisplayController.html#acc28372db7075d96ac6ac1e8e97698b7" title="Creates and adds to the factory a new value transform.">DisplayController::</a> <a name="l00141"></a><a class="code" href="classhippodraw_1_1DisplayController.html#acc28372db7075d96ac6ac1e8e97698b7">00141</a> <a class="code" href="classhippodraw_1_1DisplayController.html#acc28372db7075d96ac6ac1e8e97698b7" title="Creates and adds to the factory a new value transform.">addValueTransform</a> ( <span class="keyword">const</span> std::string & name, <a name="l00142"></a>00142 <span class="keyword">const</span> std::vector < double > & ctrl_points ) <a name="l00143"></a>00143 { <a name="l00144"></a>00144 <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> * model = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1BinToUsrDefinedScale.html" title="The class derived from the BinToColor class.">BinToUsrDefinedScale</a> ( name.c_str() ); <a name="l00145"></a>00145 model -> setControlPoints ( ctrl_points ); <a name="l00146"></a>00146 <a name="l00147"></a>00147 <a class="code" href="classhippodraw_1_1BinToColorFactory.html" title="A factory for creation of objects whose class is derived from BinToColor.">BinToColorFactory</a> * factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">BinToColorFactory::instance</a> (); <a name="l00148"></a>00148 factory -> add ( model ); <a name="l00149"></a>00149 } <a name="l00150"></a>00150 <a name="l00151"></a>00151 <span class="keywordtype">bool</span> <a name="l00152"></a>00152 <a class="code" href="classhippodraw_1_1DisplayController.html#aefc685584dc810e942cb255a56965a41" title="Removes the value to color transform model.">DisplayController::</a> <a name="l00153"></a><a class="code" href="classhippodraw_1_1DisplayController.html#aefc685584dc810e942cb255a56965a41">00153</a> <a class="code" href="classhippodraw_1_1DisplayController.html#aefc685584dc810e942cb255a56965a41" title="Removes the value to color transform model.">removeValueTransform</a> ( <span class="keyword">const</span> std::string & name ) <a name="l00154"></a>00154 { <a name="l00155"></a>00155 <a class="code" href="classhippodraw_1_1BinToColorFactory.html" title="A factory for creation of objects whose class is derived from BinToColor.">BinToColorFactory</a> * factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">BinToColorFactory::instance</a> (); <a name="l00156"></a>00156 <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> * prototype = factory -> prototype ( name ); <a name="l00157"></a>00157 <span class="keywordtype">bool</span> yes = prototype -> isUserDefined (); <a name="l00158"></a>00158 <span class="keywordflow">if</span> ( yes ) { <a name="l00159"></a>00159 factory -> <span class="keyword">remove</span> ( name ); <a name="l00160"></a>00160 } <a name="l00161"></a>00161 <a name="l00162"></a>00162 <span class="keywordflow">return</span> yes; <a name="l00163"></a>00163 } <a name="l00164"></a>00164 <a name="l00165"></a>00165 <span class="keyword">const</span> vector <double > & <a name="l00166"></a>00166 <a class="code" href="classhippodraw_1_1DisplayController.html#a95830a5eedb89f107d378cccd8f96bc9" title="Returns the control points of the value to color transform model.">DisplayController::</a> <a name="l00167"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a95830a5eedb89f107d378cccd8f96bc9">00167</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a95830a5eedb89f107d378cccd8f96bc9" title="Returns the control points of the value to color transform model.">getValueCtrlPts</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="l00168"></a>00168 { <a name="l00169"></a>00169 <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> * r = <span class="keyword">const_cast<</span> <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> *<span class="keyword">></span> (plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#ab8a5addcc6ba76e42ed603f1b91116f2" title="Returns the value to color representation.">getValueRep</a>()); <a name="l00170"></a>00170 <span class="keywordflow">return</span> r -> getControlPoints (); <a name="l00171"></a>00171 } <a name="l00172"></a>00172 <a name="l00173"></a>00173 <span class="keywordtype">void</span> <a name="l00174"></a>00174 <a class="code" href="classhippodraw_1_1DisplayController.html#a26de8605d28c33a8909cf6210dbadbd5" title="Sets the control points for the value to color transform model.">DisplayController::</a> <a name="l00175"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a26de8605d28c33a8909cf6210dbadbd5">00175</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a26de8605d28c33a8909cf6210dbadbd5" title="Sets the control points for the value to color transform model.">setValueCtrlPts</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> *plotter, <a name="l00176"></a>00176 <span class="keyword">const</span> std::vector < double > & sv) <a name="l00177"></a>00177 { <a name="l00178"></a>00178 <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> * r = <span class="keyword">const_cast<</span> <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> *<span class="keyword">></span> (plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#ab8a5addcc6ba76e42ed603f1b91116f2" title="Returns the value to color representation.">getValueRep</a>()); <a name="l00179"></a>00179 <span class="keywordflow">if</span> ( r != 0 ) { <a name="l00180"></a>00180 r -> setControlPoints ( sv ); <a name="l00181"></a>00181 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep = plotter -> selectedDataRep (); <a name="l00182"></a>00182 datarep -> notifyObservers (); <a name="l00183"></a>00183 } <a name="l00184"></a>00184 } <a name="l00185"></a>00185 <a name="l00186"></a>00186 <span class="keywordtype">void</span> <a name="l00187"></a>00187 <a class="code" href="classhippodraw_1_1DisplayController.html#a54656b6ef6752ae4f789dd94da6bdfd6" title="Save the updated control points of a BinToColor transform.">DisplayController::</a> <a name="l00188"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a54656b6ef6752ae4f789dd94da6bdfd6">00188</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a54656b6ef6752ae4f789dd94da6bdfd6" title="Save the updated control points of a BinToColor transform.">saveValueCtrlPts</a>( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> *plotter, <a name="l00189"></a>00189 <span class="keyword">const</span> std::vector <double> & sv) <a name="l00190"></a>00190 { <a name="l00191"></a>00191 <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> * r = <span class="keyword">const_cast<</span> <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> *<span class="keyword">></span> (plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#ab8a5addcc6ba76e42ed603f1b91116f2" title="Returns the value to color representation.">getValueRep</a>()); <a name="l00192"></a>00192 <span class="keywordflow">if</span> ( r != 0 ) { <a name="l00193"></a>00193 <span class="keyword">const</span> std::string transformName = r-><a class="code" href="classhippodraw_1_1BinToColor.html#af8370604529de0f829b8424e1288a104" title="Returns the name of the value to color transform.">name</a>(); <a name="l00194"></a>00194 <a class="code" href="classhippodraw_1_1DisplayController.html#aefc685584dc810e942cb255a56965a41" title="Removes the value to color transform model.">removeValueTransform</a>(transformName); <a name="l00195"></a>00195 <a class="code" href="classhippodraw_1_1DisplayController.html#acc28372db7075d96ac6ac1e8e97698b7" title="Creates and adds to the factory a new value transform.">addValueTransform</a>(transformName, sv); <a name="l00196"></a>00196 } <a name="l00197"></a>00197 } <a name="l00198"></a>00198 <a name="l00199"></a>00199 <a name="l00200"></a>00200 <span class="keywordtype">int</span> <a name="l00201"></a>00201 <a class="code" href="classhippodraw_1_1DisplayController.html#a7f29f591a13a4359ea830eaf1efd4a09" title="Returns the index to list of value to color transform names of the plotter.">DisplayController::</a> <a name="l00202"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a7f29f591a13a4359ea830eaf1efd4a09">00202</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a7f29f591a13a4359ea830eaf1efd4a09" title="Returns the index to list of value to color transform names of the plotter.">getValueTransformIndex</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter ) <a name="l00203"></a>00203 { <a name="l00204"></a>00204 <span class="keywordtype">int</span> index = -1; <a name="l00205"></a>00205 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> * rep = plotter -> getValueRep (); <span class="comment">// return the value to color representation</span> <a name="l00206"></a>00206 <span class="keywordflow">if</span> ( rep != 0 ) { <span class="comment">// may not have one.</span> <a name="l00207"></a>00207 <span class="keyword">const</span> <span class="keywordtype">string</span> & name = rep -> name (); <a name="l00208"></a>00208 <span class="keyword">const</span> vector < string > & names = <a class="code" href="classhippodraw_1_1DisplayController.html#a532eaf3e1dc04f214318bbb7831c7ceb" title="Returns the types of value to color transforms available.">getValueTransformTypes</a> (); <a name="l00209"></a>00209 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="namespacenum__util.html#a137f48a49d12a7dae8ba7c86db2a0c01">size</a> = names.size(); <a name="l00210"></a>00210 <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < size; i++ ) { <a name="l00211"></a>00211 <span class="keywordflow">if</span> ( name == names[i] ) { <a name="l00212"></a>00212 index = i; <a name="l00213"></a>00213 <span class="keywordflow">break</span>; <a name="l00214"></a>00214 } <a name="l00215"></a>00215 } <a name="l00216"></a>00216 } <a name="l00217"></a>00217 <a name="l00218"></a>00218 <span class="keywordflow">return</span> index; <a name="l00219"></a>00219 } <a name="l00220"></a>00220 <a name="l00221"></a>00221 <span class="keywordtype">bool</span> <a name="l00222"></a>00222 <a class="code" href="classhippodraw_1_1DisplayController.html#abdd6edf35057ba9929af4a925ad0ff2c" title="Returns true if value to color transform has control points.">DisplayController::</a> <a name="l00223"></a><a class="code" href="classhippodraw_1_1DisplayController.html#abdd6edf35057ba9929af4a925ad0ff2c">00223</a> <a class="code" href="classhippodraw_1_1DisplayController.html#abdd6edf35057ba9929af4a925ad0ff2c" title="Returns true if value to color transform has control points.">hasControlPoints</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 )<span class="keyword"> const</span> <a name="l00224"></a>00224 <span class="keyword"></span>{ <a name="l00225"></a>00225 <span class="keywordtype">bool</span> yes = <span class="keyword">false</span>; <a name="l00226"></a>00226 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> * rep = plotter -> getValueRep (); <a name="l00227"></a>00227 <span class="keywordflow">if</span> ( rep != 0 ) { <span class="comment">// may not have one</span> <a name="l00228"></a>00228 yes = rep -> <a class="code" href="classhippodraw_1_1DisplayController.html#abdd6edf35057ba9929af4a925ad0ff2c" title="Returns true if value to color transform has control points.">hasControlPoints</a> (); <a name="l00229"></a>00229 } <a name="l00230"></a>00230 <a name="l00231"></a>00231 <span class="keywordflow">return</span> yes; <a name="l00232"></a>00232 } <a name="l00233"></a>00233 <a name="l00234"></a>00234 <span class="keywordtype">bool</span> <a name="l00235"></a>00235 <a class="code" href="classhippodraw_1_1DisplayController.html#a11e021f59613d94dbabbee62692ffa9f" title="Returns true if value to color transform is user defined.">DisplayController::</a> <a name="l00236"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a11e021f59613d94dbabbee62692ffa9f">00236</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a11e021f59613d94dbabbee62692ffa9f" title="Returns true if value to color transform is user defined.">isUserDefinedValueTransform</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 )<span class="keyword"> const</span> <a name="l00237"></a>00237 <span class="keyword"></span>{ <a name="l00238"></a>00238 <span class="keywordtype">bool</span> yes = <span class="keyword">false</span>; <a name="l00239"></a>00239 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> * rep = plotter -> getValueRep (); <a name="l00240"></a>00240 <span class="keywordflow">if</span> ( rep != 0 ) { <a name="l00241"></a>00241 yes = rep -> isUserDefined (); <a name="l00242"></a>00242 } <a name="l00243"></a>00243 <a name="l00244"></a>00244 <span class="keywordflow">return</span> yes; <a name="l00245"></a>00245 } <a name="l00246"></a>00246 <a name="l00247"></a>00247 <span class="keyword">const</span> vector < string > & <a name="l00248"></a>00248 <a class="code" href="classhippodraw_1_1DisplayController.html#a113ed13177e5e3eedf6f00ebebeabbcd" title="Returns the types of displays available.">DisplayController::</a> <a name="l00249"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a113ed13177e5e3eedf6f00ebebeabbcd">00249</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a113ed13177e5e3eedf6f00ebebeabbcd" title="Returns the types of displays available.">getDisplayTypes</a> ()<span class="keyword"> const</span> <a name="l00250"></a>00250 <span class="keyword"></span>{ <a name="l00251"></a>00251 <a class="code" href="classhippodraw_1_1DataRepFactory.html" title="This Singleton class maintains a list of DataRep objects.">DataRepFactory</a> * factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">DataRepFactory::instance</a> (); <a name="l00252"></a>00252 <a name="l00253"></a>00253 <span class="keywordflow">return</span> factory -> names (); <a name="l00254"></a>00254 } <a name="l00255"></a>00255 <a name="l00256"></a>00256 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * <a name="l00257"></a>00257 <a class="code" href="classhippodraw_1_1DisplayController.html#a7213939a823f535735653e951e612073" title="Creates a display object.">DisplayController::</a> <a name="l00258"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a7213939a823f535735653e951e612073">00258</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a7213939a823f535735653e951e612073" title="Creates a display object.">createDisplay</a> ( <span class="keyword">const</span> std::string & name ) <a name="l00259"></a>00259 { <a name="l00260"></a>00260 <a class="code" href="classhippodraw_1_1DataRepController.html" title="A singleton class that is the interface between GUI and the DataRep.">DataRepController</a> * controller = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">DataRepController::instance</a> (); <a name="l00261"></a>00261 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep = controller -> createDataRep ( name ); <a name="l00262"></a>00262 <a name="l00263"></a>00263 <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1DisplayController.html#a7213939a823f535735653e951e612073" title="Creates a display object.">createDisplay</a> ( rep ); <a name="l00264"></a>00264 } <a name="l00265"></a>00265 <a name="l00266"></a>00266 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * <a name="l00267"></a>00267 <a class="code" href="classhippodraw_1_1DisplayController.html#a7213939a823f535735653e951e612073" title="Creates a display object.">DisplayController::</a> <a name="l00268"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a35d6a229a3cdd863b5be91fa4c2baf7f">00268</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a7213939a823f535735653e951e612073" title="Creates a display object.">createDisplay</a> ( <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep ) <a name="l00269"></a>00269 { <a name="l00270"></a>00270 <span class="keywordtype">bool</span> yes = rep -> <a class="code" href="classhippodraw_1_1DisplayController.html#a46d57c56b8980d6987702379e1b7d351" title="Returns true if the DataRep contained by the plotter at index index has NTuple bindings...">hasNTupleBindings</a> (); <a name="l00271"></a>00271 <span class="keywordflow">if</span> ( yes ) { <a name="l00272"></a>00272 <span class="keywordtype">string</span> what ( <span class="stringliteral">"DisplayController: data rep of type "</span> ); <a name="l00273"></a>00273 what += rep -> name(); <a name="l00274"></a>00274 what +=<span class="stringliteral">"\nhas NTuple bindings.\n"</span>; <a name="l00275"></a>00275 what += <span class="stringliteral">"Can not create without them"</span>; <a name="l00276"></a>00276 <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="l00277"></a>00277 } <a name="l00278"></a>00278 <a name="l00279"></a>00279 <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_1DisplayController.html#a05e9b232fb0df3b6e26b8edfa68e4332" title="Returns a newly created PlotterBase object.">createPlotter</a> ( rep ); <a name="l00280"></a>00280 plotter -> <a class="code" href="classhippodraw_1_1DisplayController.html#a352fcd32484d5e1a2d8c75fb98a5cdea" title="Adds the DataRep to the PlotterBase object by including it.">addDataRep</a> ( rep ); <a name="l00281"></a>00281 plotter -> setAutoRanging ( <span class="keyword">true</span> ); <a name="l00282"></a>00282 <a name="l00283"></a>00283 <span class="keywordflow">return</span> plotter; <a name="l00284"></a>00284 } <a name="l00285"></a>00285 <a name="l00289"></a>00289 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * <a name="l00290"></a>00290 <a class="code" href="classhippodraw_1_1DisplayController.html#a7213939a823f535735653e951e612073" title="Creates a display object.">DisplayController::</a> <a name="l00291"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a542616a21d847fe9e814769271b86e30">00291</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a7213939a823f535735653e951e612073" title="Creates a display object.">createDisplay</a> ( <span class="keyword">const</span> std::string & name, <a name="l00292"></a>00292 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> & tuple, <a name="l00293"></a>00293 <span class="keyword">const</span> std::vector< std::string > & bindings )<span class="keyword"> const</span> <a name="l00294"></a>00294 <span class="keyword"></span>{ <a name="l00295"></a>00295 <span class="comment">// Expansion needed by RootNTuple with multi-dimensional array</span> <a name="l00296"></a>00296 tuple.<a class="code" href="classhippodraw_1_1DataSource.html#a75ecce461832b750da62b9887ac0e89a" title="Expand the multidimension column if needed.">expandIfNeeded</a>(bindings); <a name="l00297"></a>00297 <a name="l00298"></a>00298 <a class="code" href="classhippodraw_1_1DataRepFactory.html" title="This Singleton class maintains a list of DataRep objects.">DataRepFactory</a> * factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">DataRepFactory::instance</a> (); <a name="l00299"></a>00299 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * proto = factory-><a class="code" href="classhippodraw_1_1Factory.html#a2c88aa135586175269c5af15c94b3ede" title="Returns a pointer to a prototype with name name.">prototype</a> ( name ); <a name="l00300"></a>00300 assert ( proto != 0 ); <a name="l00301"></a>00301 <a name="l00302"></a>00302 <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_1DisplayController.html#a05e9b232fb0df3b6e26b8edfa68e4332" title="Returns a newly created PlotterBase object.">createPlotter</a> ( proto ); <a name="l00303"></a>00303 <a class="code" href="classhippodraw_1_1DisplayController.html#a352fcd32484d5e1a2d8c75fb98a5cdea" title="Adds the DataRep to the PlotterBase object by including it.">addDataRep</a> ( plotter, name, &tuple, bindings ); <a name="l00304"></a>00304 <span class="preprocessor">#ifdef HAVE_CFITSIO</span> <a name="l00305"></a>00305 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( proto -> needsMatrixSet () ) { <a name="l00306"></a>00306 <a class="code" href="classhippodraw_1_1FitsController.html" title="A Controller class for FITS files.">FitsController</a> * controller = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">FitsController::instance</a> (); <a name="l00307"></a>00307 controller -> checkForImage ( plotter, tuple ); <a name="l00308"></a>00308 } <a name="l00309"></a>00309 <span class="preprocessor">#endif</span> <a name="l00310"></a>00310 <span class="preprocessor"></span> <a name="l00311"></a>00311 plotter -> autoScale (); <a name="l00312"></a>00312 <a name="l00313"></a>00313 <span class="keywordflow">return</span> plotter; <a name="l00314"></a>00314 } <a name="l00315"></a>00315 <a name="l00316"></a>00316 <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * <a name="l00317"></a>00317 <a class="code" href="classhippodraw_1_1DisplayController.html#a90d933ca56dee9e8988270c6ac2321aa">DisplayController::</a> <a name="l00318"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a90d933ca56dee9e8988270c6ac2321aa">00318</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a90d933ca56dee9e8988270c6ac2321aa">createNTupleDiff</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter ) <a name="l00319"></a>00319 { <a name="l00320"></a>00320 <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * ntuple = 0; <a name="l00321"></a>00321 ntuple = plotter -> <a class="code" href="classhippodraw_1_1DisplayController.html#aa32747e681dc57f5d805a4a3262e567f" title="Creates a NTuple from the plotter.">createNTuple</a> (); <a name="l00322"></a>00322 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="namespacenum__util.html#a137f48a49d12a7dae8ba7c86db2a0c01">size</a> = ntuple -> rows (); <a name="l00323"></a>00323 <a name="l00324"></a>00324 vector < double > values ( size ); <a name="l00325"></a>00325 vector < double > residuals ( size ); <a name="l00326"></a>00326 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * data1 = plotter -> getDataRep(0); <a name="l00327"></a>00327 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * data2 = plotter -> getDataRep(1); <a name="l00328"></a>00328 <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * ntuple1 = data1 -> <a class="code" href="classhippodraw_1_1DisplayController.html#aa32747e681dc57f5d805a4a3262e567f" title="Creates a NTuple from the plotter.">createNTuple</a>(); <a name="l00329"></a>00329 <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * ntuple2 = data2 -> <a class="code" href="classhippodraw_1_1DisplayController.html#aa32747e681dc57f5d805a4a3262e567f" title="Creates a NTuple from the plotter.">createNTuple</a>(); <a name="l00330"></a>00330 <a name="l00331"></a>00331 vector < double > & x1 = ntuple1 -> getColumn ( 0 ); <span class="comment">// X coordinate</span> <a name="l00332"></a>00332 vector < double > & y1 = ntuple1 -> getColumn ( 1 ); <span class="comment">// Y coordinate</span> <a name="l00333"></a>00333 vector < double > & deltaX1 = ntuple1 -> getColumn (2); <span class="comment">// Half bin width </span> <a name="l00334"></a>00334 <a name="l00335"></a>00335 vector < double > & x2 = ntuple2 -> getColumn ( 0 ); <span class="comment">// X coordinate</span> <a name="l00336"></a>00336 vector < double > & y2 = ntuple2 -> getColumn ( 1 ); <span class="comment">// Y coordinate</span> <a name="l00337"></a>00337 vector < double > & deltaX2 = ntuple2 -> getColumn (2); <span class="comment">// Half bin width </span> <a name="l00338"></a>00338 <a name="l00339"></a>00339 vector <double> xDiff; <a name="l00340"></a>00340 vector <double> yDiff; <a name="l00341"></a>00341 vector <double> deltaXDiff; <a name="l00342"></a>00342 vector <double> deltaYDiff; <a name="l00343"></a>00343 <a name="l00344"></a>00344 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; <a name="l00345"></a>00345 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j = 0; <a name="l00346"></a>00346 <span class="keywordflow">while</span>( i < x1.size() && j < x2.size() ) { <span class="comment">// Compare of two histogram </span> <a name="l00347"></a>00347 <span class="keywordflow">if</span> (x1[i] + deltaX1[i] == x2[j] + deltaX2[j]) { <a name="l00348"></a>00348 <span class="keywordflow">if</span> ( xDiff.empty()) { <a name="l00349"></a>00349 xDiff.push_back(x1[i]); <a name="l00350"></a>00350 yDiff.push_back(y2[j] - y1[i]); <a name="l00351"></a>00351 deltaXDiff.push_back(deltaX1[i]); <a name="l00352"></a>00352 i++; <a name="l00353"></a>00353 j++; <a name="l00354"></a>00354 <span class="keywordflow">continue</span>; <a name="l00355"></a>00355 } <span class="keywordflow">else</span> { <a name="l00356"></a>00356 <span class="keywordtype">double</span> tmpX = xDiff.back(); <a name="l00357"></a>00357 <span class="keywordtype">double</span> tmpDeltaX = deltaXDiff.back(); <a name="l00358"></a>00358 <span class="keywordtype">double</span> xLeft = tmpX + tmpDeltaX; <a name="l00359"></a>00359 <span class="keywordtype">double</span> xRight = x1[i] + deltaX1[i]; <a name="l00360"></a>00360 xDiff.push_back(xLeft+0.5*(xRight - xLeft)); <a name="l00361"></a>00361 yDiff.push_back(y2[j] - y1[i]); <a name="l00362"></a>00362 deltaXDiff.push_back(0.5*(xRight - xLeft)); <a name="l00363"></a>00363 i++; <a name="l00364"></a>00364 j++; <a name="l00365"></a>00365 <span class="keywordflow">continue</span>; <a name="l00366"></a>00366 } <a name="l00367"></a>00367 } <a name="l00368"></a>00368 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (x1[i] + deltaX1[i] < x2[j] + deltaX2[j]) { <a name="l00369"></a>00369 <span class="keywordflow">if</span> ( xDiff.empty()) { <a name="l00370"></a>00370 xDiff.push_back(x1[i]); <a name="l00371"></a>00371 yDiff.push_back(y2[j] - y1[i]); <a name="l00372"></a>00372 deltaXDiff.push_back(deltaX1[i]); <a name="l00373"></a>00373 i++; <a name="l00374"></a>00374 <span class="keywordflow">continue</span>; <a name="l00375"></a>00375 } <span class="keywordflow">else</span> { <a name="l00376"></a>00376 <span class="keywordtype">double</span> tmpX = xDiff.back(); <a name="l00377"></a>00377 <span class="keywordtype">double</span> tmpDeltaX = deltaXDiff.back(); <a name="l00378"></a>00378 <span class="keywordtype">double</span> xLeft = tmpX + tmpDeltaX; <a name="l00379"></a>00379 <span class="keywordtype">double</span> xRight = x1[i] + deltaX1[i]; <a name="l00380"></a>00380 xDiff.push_back(xLeft+0.5*(xRight - xLeft)); <a name="l00381"></a>00381 yDiff.push_back(y2[j] - y1[i]); <a name="l00382"></a>00382 deltaXDiff.push_back(0.5*(xRight - xLeft)); <a name="l00383"></a>00383 i++; <a name="l00384"></a>00384 <span class="keywordflow">continue</span>; <a name="l00385"></a>00385 } <a name="l00386"></a>00386 } <span class="keywordflow">else</span> { <a name="l00387"></a>00387 <span class="keywordflow">if</span> ( xDiff.empty() ) { <a name="l00388"></a>00388 xDiff.push_back(x2[j]); <a name="l00389"></a>00389 yDiff.push_back(y2[j] - y1[i]); <a name="l00390"></a>00390 deltaXDiff.push_back(deltaX2[j]); <a name="l00391"></a>00391 j++; <a name="l00392"></a>00392 <span class="keywordflow">continue</span>; <a name="l00393"></a>00393 } <span class="keywordflow">else</span> { <a name="l00394"></a>00394 <span class="keywordtype">double</span> tmpX = xDiff.back(); <a name="l00395"></a>00395 <span class="keywordtype">double</span> tmpDeltaX = deltaXDiff.back(); <a name="l00396"></a>00396 <span class="keywordtype">double</span> xLeft = tmpX + tmpDeltaX; <a name="l00397"></a>00397 <span class="keywordtype">double</span> xRight = x2[j] + deltaX2[j]; <a name="l00398"></a>00398 xDiff.push_back(xLeft+0.5*(xRight - xLeft)); <a name="l00399"></a>00399 yDiff.push_back(y2[j] - y1[i]); <a name="l00400"></a>00400 deltaXDiff.push_back(0.5*(xRight - xLeft)); <a name="l00401"></a>00401 j++; <a name="l00402"></a>00402 <span class="keywordflow">continue</span>; <a name="l00403"></a>00403 } <a name="l00404"></a>00404 } <a name="l00405"></a>00405 } <a name="l00406"></a>00406 <a name="l00407"></a>00407 <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * newNtuple = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a>(); <a name="l00408"></a>00408 newNtuple-><a class="code" href="classhippodraw_1_1NTuple.html#a904fc609e925ee9d7a4f49a4125b33ab" title="Adds a column to the end of the ntuple and returns the index to the added column...">addColumn</a> ( <span class="stringliteral">"X"</span>, xDiff ); <a name="l00409"></a>00409 newNtuple-><a class="code" href="classhippodraw_1_1NTuple.html#a904fc609e925ee9d7a4f49a4125b33ab" title="Adds a column to the end of the ntuple and returns the index to the added column...">addColumn</a> ( <span class="stringliteral">"Residuals"</span>, yDiff ); <a name="l00410"></a>00410 newNtuple-><a class="code" href="classhippodraw_1_1NTuple.html#a904fc609e925ee9d7a4f49a4125b33ab" title="Adds a column to the end of the ntuple and returns the index to the added column...">addColumn</a> ( <span class="stringliteral">"DeltaX"</span>, deltaXDiff ); <a name="l00411"></a>00411 <a name="l00412"></a>00412 <span class="keywordflow">return</span> newNtuple; <a name="l00413"></a>00413 } <a name="l00414"></a>00414 <a name="l00415"></a>00415 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * <a name="l00416"></a>00416 <a class="code" href="classhippodraw_1_1DisplayController.html#a6f43b5507e4a851b301bd6d74b16e887" title="Returns difference display.">DisplayController::</a> <a name="l00417"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a6f43b5507e4a851b301bd6d74b16e887">00417</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a6f43b5507e4a851b301bd6d74b16e887" title="Returns difference display.">createDifferenceDisplay</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter ) <a name="l00418"></a>00418 { <a name="l00419"></a>00419 <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * ntuple = <a class="code" href="classhippodraw_1_1DisplayController.html#a90d933ca56dee9e8988270c6ac2321aa">createNTupleDiff</a> ( plotter ); <a name="l00420"></a>00420 <span class="keywordtype">int</span> <a class="code" href="namespacenum__util.html#a137f48a49d12a7dae8ba7c86db2a0c01">size</a> = ntuple-><a class="code" href="classhippodraw_1_1NTuple.html#a2b76a8f13ad489df9fa8cc9452c9012b" title="Returns the number of rows.">rows</a>(); <a name="l00421"></a>00421 <a name="l00422"></a>00422 ntuple -> setTitle ( plotter -> getTitle () ); <a name="l00423"></a>00423 <a name="l00424"></a>00424 <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">DataSourceController::instance</a> () -> registerNTuple ( ntuple ); <a name="l00425"></a>00425 <a name="l00426"></a>00426 vector < string > bindings ( 3 ); <a name="l00427"></a>00427 <a name="l00428"></a>00428 bindings[0] = ntuple -> getLabelAt ( 0 ); <a name="l00429"></a>00429 bindings[1] = ntuple -> getLabelAt ( 1 ); <a name="l00430"></a>00430 bindings[2] = ntuple -> getLabelAt ( 2 ); <a name="l00431"></a>00431 <a name="l00432"></a>00432 <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="l00433"></a>00433 <a name="l00434"></a>00434 <span class="comment">// Make scaling of x-axis match that of the original plot.</span> <a name="l00435"></a>00435 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * new_plotter = controller -> <a class="code" href="classhippodraw_1_1DisplayController.html#a7213939a823f535735653e951e612073" title="Creates a display object.">createDisplay</a> ( <span class="stringliteral">"XY Plot"</span>, <a name="l00436"></a>00436 *ntuple, <a name="l00437"></a>00437 bindings ); <a name="l00438"></a>00438 controller-><a class="code" href="classhippodraw_1_1DisplayController.html#a6eee66773c140b3ea98700e576d20e27" title="Sets a log scale on or off for the specified axis for the plotter.">setLog</a>( new_plotter, <span class="stringliteral">"x"</span>, <a name="l00439"></a>00439 controller -> <a class="code" href="classhippodraw_1_1DisplayController.html#a6749b659850134a35d47b557fb4b70e0" title="Returns true if the designated axis is on a logarithmic scale.">getLog</a>( plotter, <span class="stringliteral">"x"</span> ) ); <a name="l00440"></a>00440 <a name="l00441"></a>00441 <span class="keywordflow">return</span> new_plotter; <a name="l00442"></a>00442 } <a name="l00443"></a>00443 <a name="l00444"></a>00444 <a name="l00445"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a05e9b232fb0df3b6e26b8edfa68e4332">00445</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_1DisplayController.html#a05e9b232fb0df3b6e26b8edfa68e4332" title="Returns a newly created PlotterBase object.">DisplayController::createPlotter</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep )<span class="keyword"> const</span> <a name="l00446"></a>00446 <span class="keyword"></span>{ <a name="l00447"></a>00447 <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_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">PlotterFactory::instance</a> (); <a name="l00448"></a>00448 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter = 0; <a name="l00449"></a>00449 <span class="keywordflow">try</span> { <a name="l00450"></a>00450 plotter = factory -> create ( <span class="stringliteral">"XyPlotter"</span> ); <a name="l00451"></a>00451 <span class="keywordflow">if</span> ( rep -> hasAxis ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> ) ) { <a name="l00452"></a>00452 plotter -> setEnableZ ( <span class="keyword">true</span> ); <a name="l00453"></a>00453 } <a name="l00454"></a>00454 } <a name="l00455"></a>00455 <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="l00456"></a>00456 assert ( <span class="keyword">false</span> ); <a name="l00457"></a>00457 } <a name="l00458"></a>00458 <span class="keywordflow">return</span> plotter; <a name="l00459"></a>00459 } <a name="l00460"></a>00460 <a name="l00463"></a>00463 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * <a name="l00464"></a>00464 <a class="code" href="classhippodraw_1_1DisplayController.html#a352fcd32484d5e1a2d8c75fb98a5cdea" title="Adds the DataRep to the PlotterBase object by including it.">DisplayController::</a> <a name="l00465"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a3ddef48bf1f0a95363696915cd5bc1be">00465</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a352fcd32484d5e1a2d8c75fb98a5cdea" title="Adds the DataRep to the PlotterBase object by including it.">addDataRep</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l00466"></a>00466 <span class="keyword">const</span> std::string & <a class="code" href="namespacenum__util.html#af7e893a8c6a5f6a426480fc85cda4fa1">type</a>, <a name="l00467"></a>00467 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * tuple, <a name="l00468"></a>00468 <span class="keyword">const</span> std::vector < std::string > & bindings )<span class="keyword"> const</span> <a name="l00469"></a>00469 <span class="keyword"></span>{ <a name="l00470"></a>00470 <span class="keywordtype">bool</span> yes = <a class="code" href="classhippodraw_1_1DisplayController.html#a74e433dbcd2c1e554386bf58b9621148" title="Returns true if adding a DataRep of type type to the PlotterBase @ plotter is compatible...">isCompatible</a> ( plotter, type ); <a name="l00471"></a>00471 <span class="keywordflow">if</span> ( ! yes ) <span class="keywordflow">return</span> 0; <a name="l00472"></a>00472 <a name="l00473"></a>00473 <a class="code" href="classhippodraw_1_1DataRepController.html" title="A singleton class that is the interface between GUI and the DataRep.">DataRepController</a> * controller = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">DataRepController::instance</a> (); <a name="l00474"></a>00474 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep = controller-><a class="code" href="classhippodraw_1_1DataRepController.html#abcb5800e60891a3da3033e41057b931b" title="Creates a new DataRep object of class name.">createDataRep</a> ( type, tuple, bindings ); <a name="l00475"></a>00475 <a class="code" href="classhippodraw_1_1DisplayController.html#a352fcd32484d5e1a2d8c75fb98a5cdea" title="Adds the DataRep to the PlotterBase object by including it.">addDataRep</a> ( plotter, rep ); <a name="l00476"></a>00476 <a name="l00477"></a>00477 <span class="keywordflow">return</span> rep; <a name="l00478"></a>00478 } <a name="l00479"></a>00479 <a name="l00480"></a>00480 <span class="keywordtype">void</span> <a name="l00481"></a>00481 <a class="code" href="classhippodraw_1_1DisplayController.html#a1e2b443150cf481bc67f07179c00cd0c" title="Adds the DataRep to the PlotterBase object by stacking it.">DisplayController::</a> <a name="l00482"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a1e2b443150cf481bc67f07179c00cd0c">00482</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a1e2b443150cf481bc67f07179c00cd0c" title="Adds the DataRep to the PlotterBase object by stacking it.">stackDataRep</a> ( <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_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep )<span class="keyword"> const</span> <a name="l00483"></a>00483 <span class="keyword"></span>{ <a name="l00484"></a>00484 <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 = 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="l00485"></a>00485 xyplotter -> <a class="code" href="classhippodraw_1_1DisplayController.html#a242df210735f7e433d8ff016b40f12b8" title="Creates a new DataRep object with class name name and adds it to the existing plotter...">addDataRepStacked</a> ( rep ); <a name="l00486"></a>00486 } <a name="l00487"></a>00487 <a name="l00488"></a>00488 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * <a name="l00489"></a>00489 <a class="code" href="classhippodraw_1_1DisplayController.html#a242df210735f7e433d8ff016b40f12b8" title="Creates a new DataRep object with class name name and adds it to the existing plotter...">DisplayController::</a> <a name="l00490"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a242df210735f7e433d8ff016b40f12b8">00490</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a242df210735f7e433d8ff016b40f12b8" title="Creates a new DataRep object with class name name and adds it to the existing plotter...">addDataRepStacked</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l00491"></a>00491 <span class="keyword">const</span> std::string & <a class="code" href="namespacenum__util.html#af7e893a8c6a5f6a426480fc85cda4fa1">type</a>, <a name="l00492"></a>00492 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * tuple, <a name="l00493"></a>00493 <span class="keyword">const</span> std::vector < std::string > & bindings )<span class="keyword"> const</span> <a name="l00494"></a>00494 <span class="keyword"></span>{ <a name="l00495"></a>00495 <span class="keywordtype">bool</span> yes = <a class="code" href="classhippodraw_1_1DisplayController.html#a74e433dbcd2c1e554386bf58b9621148" title="Returns true if adding a DataRep of type type to the PlotterBase @ plotter is compatible...">isCompatible</a> ( plotter, type ); <a name="l00496"></a>00496 <span class="keywordflow">if</span> ( ! yes ) <span class="keywordflow">return</span> 0; <a name="l00497"></a>00497 <a name="l00498"></a>00498 <a class="code" href="classhippodraw_1_1DataRepController.html" title="A singleton class that is the interface between GUI and the DataRep.">DataRepController</a> * controller = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">DataRepController::instance</a> (); <a name="l00499"></a>00499 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep = controller-><a class="code" href="classhippodraw_1_1DataRepController.html#abcb5800e60891a3da3033e41057b931b" title="Creates a new DataRep object of class name.">createDataRep</a> ( type, tuple, bindings ); <a name="l00500"></a>00500 <a name="l00501"></a>00501 <a class="code" href="classhippodraw_1_1DisplayController.html#a1e2b443150cf481bc67f07179c00cd0c" title="Adds the DataRep to the PlotterBase object by stacking it.">stackDataRep</a> ( plotter, rep ); <a name="l00502"></a>00502 <a name="l00503"></a>00503 <span class="keywordflow">return</span> rep; <a name="l00504"></a>00504 } <a name="l00505"></a>00505 <a name="l00506"></a>00506 <a class="code" href="classhippodraw_1_1LineDataRep.html" title="A derived class of DataRep which displays a value as a line along the X or Y axis...">LineDataRep</a> * <a name="l00507"></a>00507 <a class="code" href="classhippodraw_1_1DisplayController.html#a7e7c0c3ff0df321505e5fb4c14ab3503" title="Adds a LineDataRep to the Plotter object.">DisplayController::</a> <a name="l00508"></a><a class="code" href="classhippodraw_1_1DisplayController.html#aafe54aad40f82b2c10aabbb7969344a1">00508</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a7e7c0c3ff0df321505e5fb4c14ab3503" title="Adds a LineDataRep to the Plotter object.">addLineRep</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <span class="keywordtype">double</span> value ) <a name="l00509"></a>00509 { <a name="l00510"></a>00510 <a class="code" href="classhippodraw_1_1LineDataRep.html" title="A derived class of DataRep which displays a value as a line along the X or Y axis...">LineDataRep</a> * rep = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1LineDataRep.html" title="A derived class of DataRep which displays a value as a line along the X or Y axis...">LineDataRep</a> ( axis, value ); <a name="l00511"></a>00511 <a class="code" href="classhippodraw_1_1DisplayController.html#a352fcd32484d5e1a2d8c75fb98a5cdea" title="Adds the DataRep to the PlotterBase object by including it.">addDataRep</a> ( plotter, rep ); <a name="l00512"></a>00512 <a name="l00513"></a>00513 <span class="keywordflow">return</span> rep; <a name="l00514"></a>00514 } <a name="l00515"></a>00515 <a name="l00516"></a>00516 <a class="code" href="classhippodraw_1_1LineDataRep.html" title="A derived class of DataRep which displays a value as a line along the X or Y axis...">LineDataRep</a> * <a name="l00517"></a>00517 <a class="code" href="classhippodraw_1_1DisplayController.html#a7e7c0c3ff0df321505e5fb4c14ab3503" title="Adds a LineDataRep to the Plotter object.">DisplayController::</a> <a name="l00518"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a7e7c0c3ff0df321505e5fb4c14ab3503">00518</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a7e7c0c3ff0df321505e5fb4c14ab3503" title="Adds a LineDataRep to the Plotter object.">addLineRep</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <span class="keyword">const</span> std::string & axis, <span class="keywordtype">double</span> value ) <a name="l00519"></a>00519 { <a name="l00520"></a>00520 <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> ( axis ); <a name="l00521"></a>00521 <a name="l00522"></a>00522 <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1DisplayController.html#a7e7c0c3ff0df321505e5fb4c14ab3503" title="Adds a LineDataRep to the Plotter object.">addLineRep</a> ( plotter, type, value ); <a name="l00523"></a>00523 } <a name="l00524"></a>00524 <a name="l00525"></a>00525 <span class="keywordtype">void</span> <a name="l00526"></a>00526 <a class="code" href="classhippodraw_1_1DisplayController.html#aa1411b57d0f771d0433ddc97b7d7a796" title="Fixes the rep so it displays well on plotter.">DisplayController::</a> <a name="l00527"></a><a class="code" href="classhippodraw_1_1DisplayController.html#aa1411b57d0f771d0433ddc97b7d7a796">00527</a> <a class="code" href="classhippodraw_1_1DisplayController.html#aa1411b57d0f771d0433ddc97b7d7a796" title="Fixes the rep so it displays well on plotter.">fixLogIfBinned</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 class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep )<span class="keyword"> const</span> <a name="l00528"></a>00528 <span class="keyword"></span>{ <a name="l00529"></a>00529 <a class="code" href="classhippodraw_1_1DisplayController.html#adfb0f33a2d4d9439666d85cd2ab10437" title="Sets the binner on the DataRep.">setBinner</a> ( plotter, rep, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> ); <a name="l00530"></a>00530 <a class="code" href="classhippodraw_1_1DisplayController.html#adfb0f33a2d4d9439666d85cd2ab10437" title="Sets the binner on the DataRep.">setBinner</a> ( plotter, rep, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> ); <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_1DisplayController.html#a352fcd32484d5e1a2d8c75fb98a5cdea" title="Adds the DataRep to the PlotterBase object by including it.">DisplayController::</a> <a name="l00538"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a352fcd32484d5e1a2d8c75fb98a5cdea">00538</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a352fcd32484d5e1a2d8c75fb98a5cdea" title="Adds the DataRep to the PlotterBase object by including it.">addDataRep</a> ( <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_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep )<span class="keyword"> const</span> <a name="l00539"></a>00539 <span class="keyword"></span>{ <a name="l00540"></a>00540 <span class="keywordflow">if</span> ( plotter -> getNumDataReps () > 0 ) { <a name="l00541"></a>00541 <a class="code" href="classhippodraw_1_1DisplayController.html#aa1411b57d0f771d0433ddc97b7d7a796" title="Fixes the rep so it displays well on plotter.">fixLogIfBinned</a> ( plotter, rep ); <a name="l00542"></a>00542 } <a name="l00543"></a>00543 <a name="l00544"></a>00544 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a3f6282f04deb4b8117d58c43e0658650" title="Adds a DataRep object to the plotter.">addDataRep</a> ( rep ); <a name="l00545"></a>00545 <a name="l00546"></a>00546 <span class="keywordflow">if</span> ( !rep-><a class="code" href="classhippodraw_1_1DataRep.html#a18e0738613979d60bd910e0e8d3d3e83" title="Returns true if this DataRep has zero rows in its DataSource.">hasZeroRows</a>() ){ <a name="l00547"></a>00547 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a78efd83b13a596d06130bbd830a3576a" title="Check if Axis needs to be scaled or not.">checkAxisScaling</a> ( ); <a name="l00548"></a>00548 } <a name="l00549"></a>00549 <a name="l00550"></a>00550 } <a name="l00551"></a>00551 <a name="l00554"></a>00554 <span class="keywordtype">bool</span> <a name="l00555"></a>00555 <a class="code" href="classhippodraw_1_1DisplayController.html#a74e433dbcd2c1e554386bf58b9621148" title="Returns true if adding a DataRep of type type to the PlotterBase @ plotter is compatible...">DisplayController::</a> <a name="l00556"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a74e433dbcd2c1e554386bf58b9621148">00556</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a74e433dbcd2c1e554386bf58b9621148" title="Returns true if adding a DataRep of type type to the PlotterBase @ plotter is compatible...">isCompatible</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="l00557"></a>00557 <span class="keyword">const</span> std::string & datarep )<span class="keyword"> const</span> <a name="l00558"></a>00558 <span class="keyword"></span>{ <a name="l00559"></a>00559 <a class="code" href="classhippodraw_1_1DataRepFactory.html" title="This Singleton class maintains a list of DataRep objects.">DataRepFactory</a> * factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">DataRepFactory::instance</a> (); <a name="l00560"></a>00560 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * proto = factory-><a class="code" href="classhippodraw_1_1Factory.html#a2c88aa135586175269c5af15c94b3ede" title="Returns a pointer to a prototype with name name.">prototype</a> ( datarep ); <a name="l00561"></a>00561 <a name="l00562"></a>00562 <span class="keywordtype">bool</span> yes = <span class="keyword">true</span>; <a name="l00563"></a>00563 <span class="comment">// does it need Z axis display</span> <a name="l00564"></a>00564 <span class="keywordflow">if</span> ( proto -> hasAxis ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> ) ) { <a name="l00565"></a>00565 yes = 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 name="l00566"></a>00566 } <a name="l00567"></a>00567 <a name="l00568"></a>00568 <span class="keywordflow">return</span> yes; <a name="l00569"></a>00569 } <a name="l00570"></a>00570 <a name="l00571"></a>00571 <span class="keywordtype">void</span> <a name="l00572"></a>00572 <a class="code" href="classhippodraw_1_1DisplayController.html#afd711bdd0c3c00d04977e94c58b6a5ce" title="Removes TextRep Observer objects, if any, from its target.">DisplayController::</a> <a name="l00573"></a><a class="code" href="classhippodraw_1_1DisplayController.html#afd711bdd0c3c00d04977e94c58b6a5ce">00573</a> <a class="code" href="classhippodraw_1_1DisplayController.html#afd711bdd0c3c00d04977e94c58b6a5ce" title="Removes TextRep Observer objects, if any, from its target.">removeTextObservers</a> ( <span class="keyword">const</span> std::vector < const ViewBase * > & views ) <a name="l00574"></a>00574 { <a name="l00575"></a>00575 <span class="preprocessor">#ifdef ITERATOR_MEMBER_DEFECT</span> <a name="l00576"></a>00576 <span class="preprocessor"></span> std:: <a name="l00577"></a>00577 <span class="preprocessor">#endif</span> <a name="l00578"></a>00578 <span class="preprocessor"></span> vector < const ViewBase * > ::const_iterator iter = views.begin(); <a name="l00579"></a>00579 <a name="l00580"></a>00580 <span class="keywordflow">while</span> ( iter != views.end() ) { <a name="l00581"></a>00581 <a name="l00582"></a>00582 <span class="comment">// If its a text view, tell the target DataRep (observable) to remove</span> <a name="l00583"></a>00583 <span class="comment">// this->plotter from its list of observers.</span> <a name="l00584"></a>00584 <a name="l00585"></a>00585 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1ViewBase.html" title="The abstract base class for views.">ViewBase</a> * curview = ( * iter++ ); <a name="l00586"></a>00586 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * curplotter = curview-><a class="code" href="classhippodraw_1_1ViewBase.html#a78aa09930b4007dfa886e1ecb2dbf57b" title="Returns the plotter used by this view.">getPlotter</a> (); <a name="l00587"></a>00587 <a name="l00588"></a>00588 <a class="code" href="classhippodraw_1_1TextPlotter.html" title="A Plotter class that draws text.">TextPlotter</a> * textPlotter <a name="l00589"></a>00589 = dynamic_cast < <a class="code" href="classhippodraw_1_1TextPlotter.html" title="A Plotter class that draws text.">TextPlotter</a> * > ( curplotter ); <a name="l00590"></a>00590 <a name="l00591"></a>00591 <span class="keywordflow">if</span> ( textPlotter ){ <a name="l00592"></a>00592 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * target = textPlotter-><a class="code" href="classhippodraw_1_1TextPlotter.html#ac7b3bc5a3e719a7f022f55e0b056e9de" title="Returns the target DataRep of its own TextDataRep object.">getParentDataRep</a>(); <a name="l00593"></a>00593 <span class="keywordflow">if</span> ( target ){ <a name="l00594"></a>00594 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * tar = const_cast < <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * > ( target ); <a name="l00595"></a>00595 tar-><a class="code" href="classhippodraw_1_1Observable.html#af7647690e00b67ed5356dc6a16473a73" title="Removes an Observer from the Observer list.">removeObserver</a> ( textPlotter ); <a name="l00596"></a>00596 } <a name="l00597"></a>00597 } <a name="l00598"></a>00598 } <a name="l00599"></a>00599 } <a name="l00600"></a>00600 <a name="l00601"></a>00601 <span class="keywordtype">void</span> <a name="l00602"></a>00602 <a class="code" href="classhippodraw_1_1DisplayController.html#a1ab5b0f60f4bb807e08fe6d5084fc76f" title="Adds views from source to destination if they contain TextRep whose target is contained...">DisplayController::</a> <a name="l00603"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a1ab5b0f60f4bb807e08fe6d5084fc76f">00603</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a1ab5b0f60f4bb807e08fe6d5084fc76f" title="Adds views from source to destination if they contain TextRep whose target is contained...">addTextViewToList</a> ( std::vector < const ViewBase * > & dest, <a name="l00604"></a>00604 <span class="keyword">const</span> std::vector < const ViewBase * > & src ) <a name="l00605"></a>00605 { <a name="l00606"></a>00606 std::vector < const ViewBase * > ::const_iterator first = src.begin(); <a name="l00607"></a>00607 <span class="keywordflow">while</span> ( first != src.end() ) { <a name="l00608"></a>00608 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1ViewBase.html" title="The abstract base class for views.">ViewBase</a> * view = *first++; <a name="l00609"></a>00609 <a name="l00610"></a>00610 vector < const ViewBase * > :: iterator i <a name="l00611"></a>00611 = find ( dest.begin(), dest.end (), view ); <a name="l00612"></a>00612 <span class="keywordflow">if</span> ( i != dest.end() ) <span class="keywordflow">continue</span>; <span class="comment">// already in list</span> <a name="l00613"></a>00613 <a name="l00614"></a>00614 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter = view-><a class="code" href="classhippodraw_1_1ViewBase.html#a78aa09930b4007dfa886e1ecb2dbf57b" title="Returns the plotter used by this view.">getPlotter</a> (); <a name="l00615"></a>00615 <a class="code" href="classhippodraw_1_1TextPlotter.html" title="A Plotter class that draws text.">TextPlotter</a> * text_plotter = dynamic_cast < <a class="code" href="classhippodraw_1_1TextPlotter.html" title="A Plotter class that draws text.">TextPlotter</a> * > ( plotter ); <a name="l00616"></a>00616 <span class="keywordflow">if</span> ( text_plotter == 0 ) <span class="keywordflow">continue</span>; <span class="comment">// not a text plotter</span> <a name="l00617"></a>00617 <a name="l00618"></a>00618 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep = text_plotter-><a class="code" href="classhippodraw_1_1TextPlotter.html#ac7b3bc5a3e719a7f022f55e0b056e9de" title="Returns the target DataRep of its own TextDataRep object.">getParentDataRep</a> (); <a name="l00619"></a>00619 <span class="keywordtype">bool</span> add_to_list = <span class="keyword">false</span>; <a name="l00620"></a>00620 <span class="keywordflow">for</span> ( i = dest.begin (); i != dest.end(); ++i ) { <a name="l00621"></a>00621 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1ViewBase.html" title="The abstract base class for views.">ViewBase</a> * view = *i; <a name="l00622"></a>00622 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter = view-><a class="code" href="classhippodraw_1_1ViewBase.html#a78aa09930b4007dfa886e1ecb2dbf57b" title="Returns the plotter used by this view.">getPlotter</a> (); <a name="l00623"></a>00623 <span class="keywordflow">if</span> ( plotter == 0 ) <span class="keywordflow">continue</span>; <span class="comment">// view has no plotter, can be groupview</span> <a name="l00624"></a>00624 <span class="keywordtype">int</span> num = 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="l00625"></a>00625 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> j = 0; j < num; j++ ) { <a name="l00626"></a>00626 <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> ( j ); <a name="l00627"></a>00627 <span class="keywordflow">if</span> ( rep == datarep ) { <a name="l00628"></a>00628 add_to_list = <span class="keyword">true</span>; <a name="l00629"></a>00629 <span class="keywordflow">break</span>; <a name="l00630"></a>00630 } <a name="l00631"></a>00631 } <a name="l00632"></a>00632 <span class="keywordflow">if</span> ( add_to_list ) <span class="keywordflow">break</span>; <a name="l00633"></a>00633 } <a name="l00634"></a>00634 <span class="keywordflow">if</span> ( add_to_list ) dest.push_back ( view ); <a name="l00635"></a>00635 } <a name="l00636"></a>00636 } <a name="l00637"></a>00637 <a name="l00638"></a>00638 <span class="keywordtype">bool</span> <a name="l00639"></a>00639 <a class="code" href="classhippodraw_1_1DisplayController.html#af09c70def27461a67e28665871996c41" title="Tests if specified axis is binned.">DisplayController::</a> <a name="l00640"></a><a class="code" href="classhippodraw_1_1DisplayController.html#af09c70def27461a67e28665871996c41">00640</a> <a class="code" href="classhippodraw_1_1DisplayController.html#af09c70def27461a67e28665871996c41" title="Tests if specified axis is binned.">isAxisBinned</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l00641"></a>00641 <span class="keyword">const</span> std::string & axis ) <a name="l00642"></a>00642 { <a name="l00643"></a>00643 <span class="keywordtype">bool</span> yes = <span class="keyword">false</span>; <a name="l00644"></a>00644 <a name="l00645"></a>00645 <span class="keywordtype">int</span> index = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#af17d91d1b3039f791a5045d18386944d" title="Returns the index of the active plotter.">activePlotIndex</a> ( ); <a name="l00646"></a>00646 <span class="keywordflow">if</span> ( index < 0 ) { <a name="l00647"></a>00647 <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_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">FunctionController::instance</a>(); <a name="l00648"></a>00648 index = controller-><a class="code" href="classhippodraw_1_1FunctionController.html#afd3e43e0f807aceb6511f71ca5609044" title="Returns the index to an unique DataRep object that is not a FunctionRep.">getUniqueNonFunctionIndex</a> ( plotter ); <a name="l00649"></a>00649 } <a name="l00650"></a>00650 <span class="keywordflow">if</span> ( index >= 0 ) { <a name="l00651"></a>00651 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * projector = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#ad21611548a8b5dc96d82032aa4a886e1" title="Returns the active projector.">activeProjector</a> (); <a name="l00652"></a>00652 yes = projector-><a class="code" href="classhippodraw_1_1ProjectorBase.html#ac45e76c75c339e6dc783bc5eb62bc7b3" title="Returns true if specified axis is binned.">isAxisBinned</a> ( axis ); <a name="l00653"></a>00653 } <a name="l00654"></a>00654 <a name="l00655"></a>00655 <span class="keywordflow">return</span> yes; <a name="l00656"></a>00656 } <a name="l00657"></a>00657 <a name="l00658"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a987a253f49593dfa358b9e087dfd34d2">00658</a> <a class="code" href="classhippodraw_1_1ViewBase.html" title="The abstract base class for views.">ViewBase</a> * <a class="code" href="classhippodraw_1_1DisplayController.html#a26cfefbe59d0da3feedb61c889954f45" title="Creates an object which is a derived class of ViewBase.">DisplayController::createTextView</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1ViewFactory.html" title="The abstract base class for a factory that creates objects closely related to the...">ViewFactory</a> * v_factory, <a name="l00659"></a>00659 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l00660"></a>00660 <span class="keyword">const</span> std::string & name, <a name="l00661"></a>00661 <span class="keyword">const</span> std::string & text) <a name="l00662"></a>00662 { <a name="l00663"></a>00663 <span class="keywordtype">int</span> index = <a class="code" href="classhippodraw_1_1DisplayController.html#a6fe40c65a134431836bb07d74d3525b1" title="Returns the active DataRep index for the DataRep objects contained in the plotter...">activeDataRepIndex</a> ( plotter ); <a name="l00664"></a>00664 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep = 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> ( index ); <a name="l00665"></a>00665 <a class="code" href="classhippodraw_1_1ViewBase.html" title="The abstract base class for views.">ViewBase</a> * view = <a class="code" href="classhippodraw_1_1DisplayController.html#a26cfefbe59d0da3feedb61c889954f45" title="Creates an object which is a derived class of ViewBase.">createTextView</a> ( v_factory, datarep, name, text ); <a name="l00666"></a>00666 assert ( view != 0 ); <a name="l00667"></a>00667 <a name="l00668"></a>00668 <span class="comment">// Set the parent plotter of the text plotter.</span> <a name="l00669"></a>00669 view-><a class="code" href="classhippodraw_1_1ViewBase.html#a78aa09930b4007dfa886e1ecb2dbf57b" title="Returns the plotter used by this view.">getPlotter</a>()-><a class="code" href="classhippodraw_1_1PlotterBase.html#aaa4d4192b21240e373e6b4a0587a348c" title="Sets the parent plotter.">setParentPlotter</a>(plotter); <a name="l00670"></a>00670 <a name="l00671"></a>00671 <span class="keywordflow">return</span> view; <a name="l00672"></a>00672 } <a name="l00673"></a>00673 <a name="l00674"></a>00674 <span class="keyword">const</span> vector < string > & <a name="l00675"></a>00675 <a class="code" href="classhippodraw_1_1DisplayController.html#a124ab327d9f80f405a593899bc083e8f" title="Returns the types of text displays.">DisplayController::</a> <a name="l00676"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a124ab327d9f80f405a593899bc083e8f">00676</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a124ab327d9f80f405a593899bc083e8f" title="Returns the types of text displays.">getTextTypes</a> ()<span class="keyword"> const</span> <a name="l00677"></a>00677 <span class="keyword"></span>{ <a name="l00678"></a>00678 <a class="code" href="classhippodraw_1_1TextRepFactory.html" title="A factory for textual representations.">TextRepFactory</a> * text_factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">TextRepFactory::instance</a> (); <a name="l00679"></a>00679 <a name="l00680"></a>00680 <span class="keywordflow">return</span> text_factory-><a class="code" href="classhippodraw_1_1Factory.html#ab375ca98328f5bd02d39169ca515ef9d" title="Returns the list of available prototype names.">names</a> (); <a name="l00681"></a>00681 } <a name="l00682"></a>00682 <a name="l00683"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a7122ac2e29af309cc57d12cfed52e29a">00683</a> <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * <a class="code" href="classhippodraw_1_1DisplayController.html#a7122ac2e29af309cc57d12cfed52e29a" title="Creates an object of a class derived from DataRep which is textual data representation...">DisplayController::createTextDataRep</a> ( <span class="keyword">const</span> std::string & name, <a name="l00684"></a>00684 <span class="keyword">const</span> std::string & text) <a name="l00685"></a>00685 { <a name="l00686"></a>00686 <a class="code" href="classhippodraw_1_1TextRepFactory.html" title="A factory for textual representations.">TextRepFactory</a> * text_factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">TextRepFactory::instance</a> (); <a name="l00687"></a>00687 <a class="code" href="classhippodraw_1_1RepBase.html" title="The base class for the point representation hierarchy.">RepBase</a> * textrep = text_factory-><a class="code" href="classhippodraw_1_1Factory.html#a1c53a3eab4f96ad0638fab10da2d6e03" title="Creates a new object from a prototype named name.">create</a> ( name ); <a name="l00688"></a>00688 assert ( textrep != 0 ); <a name="l00689"></a>00689 <a name="l00690"></a>00690 textrep-><a class="code" href="classhippodraw_1_1RepBase.html#ac1ae51949d41ee9054634be5967d91b8" title="Sets the text.">setText</a> ( text ); <a name="l00691"></a>00691 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1TextDataRep.html" title="Displays data in textual representation.">TextDataRep</a> ( textrep ); <a name="l00692"></a>00692 <a name="l00693"></a>00693 <span class="keywordflow">return</span> datarep; <a name="l00694"></a>00694 } <a name="l00695"></a>00695 <a name="l00696"></a>00696 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * <a name="l00697"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a8b39f9f37e3002a3bb5e91b5354341f0">00697</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a8b39f9f37e3002a3bb5e91b5354341f0" title="Creates a plotter object for the DataRep with text representation of type name.">DisplayController::createTextPlotter</a> ( <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep, <a name="l00698"></a>00698 <span class="keyword">const</span> std::string & name, <a name="l00699"></a>00699 <span class="keyword">const</span> std::string & text) <a name="l00700"></a>00700 { <a name="l00701"></a>00701 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * textdatarep = <a class="code" href="classhippodraw_1_1DisplayController.html#a7122ac2e29af309cc57d12cfed52e29a" title="Creates an object of a class derived from DataRep which is textual data representation...">createTextDataRep</a> ( name, text ); <a name="l00702"></a>00702 <a class="code" href="classhippodraw_1_1TextPlotter.html" title="A Plotter class that draws text.">TextPlotter</a> * plotter = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1TextPlotter.html" title="A Plotter class that draws text.">TextPlotter</a> ( ); <a name="l00703"></a>00703 plotter-><a class="code" href="classhippodraw_1_1TextPlotter.html#a00ce5cb89847e32d808196841499cea3" title="Adds a DataRep object to the plotter.">addDataRep</a> ( textdatarep ); <a name="l00704"></a>00704 plotter-><a class="code" href="classhippodraw_1_1TextPlotter.html#a575fb04b654ddc672e474ed73fc1935a" title="Sets the target DataRep of its own TextDataRep object.">setParentDataRep</a> ( datarep ); <a name="l00705"></a>00705 <a name="l00706"></a>00706 <span class="keywordflow">return</span> plotter; <a name="l00707"></a>00707 } <a name="l00708"></a>00708 <a name="l00709"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a26cfefbe59d0da3feedb61c889954f45">00709</a> <a class="code" href="classhippodraw_1_1ViewBase.html" title="The abstract base class for views.">ViewBase</a> * <a class="code" href="classhippodraw_1_1DisplayController.html#a26cfefbe59d0da3feedb61c889954f45" title="Creates an object which is a derived class of ViewBase.">DisplayController::createTextView</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1ViewFactory.html" title="The abstract base class for a factory that creates objects closely related to the...">ViewFactory</a> * v_factory, <a name="l00710"></a>00710 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep, <a name="l00711"></a>00711 <span class="keyword">const</span> std::string & name, <a name="l00712"></a>00712 <span class="keyword">const</span> std::string & text) <a name="l00713"></a>00713 { <a name="l00714"></a>00714 <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_1DisplayController.html#a8b39f9f37e3002a3bb5e91b5354341f0" title="Creates a plotter object for the DataRep with text representation of type name.">createTextPlotter</a> ( datarep, name, text ); <a name="l00715"></a>00715 <a name="l00716"></a>00716 <span class="keywordflow">return</span> v_factory-><a class="code" href="classhippodraw_1_1ViewFactory.html#aaa895487d5ae0f454e95502c04301d37" title="Creates a view for the plotter.">createView</a> ( plotter ); <a name="l00717"></a>00717 } <a name="l00718"></a>00718 <a name="l00719"></a>00719 <span class="keywordtype">int</span> <a class="code" href="classhippodraw_1_1DisplayController.html#a6fe40c65a134431836bb07d74d3525b1" title="Returns the active DataRep index for the DataRep objects contained in the plotter...">DisplayController::</a> <a name="l00720"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a6fe40c65a134431836bb07d74d3525b1">00720</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a6fe40c65a134431836bb07d74d3525b1" title="Returns the active DataRep index for the DataRep objects contained in the plotter...">activeDataRepIndex</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 )<span class="keyword"> const</span> <a name="l00721"></a>00721 <span class="keyword"></span>{ <a name="l00722"></a>00722 <span class="keywordtype">int</span> index = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#af17d91d1b3039f791a5045d18386944d" title="Returns the index of the active plotter.">activePlotIndex</a> (); <a name="l00723"></a>00723 <span class="keywordflow">if</span> ( index < 0 ) { <a name="l00724"></a>00724 <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_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">FunctionController::instance</a> (); <a name="l00725"></a>00725 index = controller-><a class="code" href="classhippodraw_1_1FunctionController.html#afd3e43e0f807aceb6511f71ca5609044" title="Returns the index to an unique DataRep object that is not a FunctionRep.">getUniqueNonFunctionIndex</a> ( plotter ); <a name="l00726"></a>00726 } <a name="l00727"></a>00727 <span class="keywordflow">return</span> index; <a name="l00728"></a>00728 } <a name="l00729"></a>00729 <a name="l00730"></a>00730 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * <a name="l00731"></a>00731 <a class="code" href="classhippodraw_1_1DisplayController.html#acba2c4047396b1cb0d748649ac782f78" title="Returns the active DataRep object for the DataRep objects contained in the plotter...">DisplayController::</a> <a name="l00732"></a><a class="code" href="classhippodraw_1_1DisplayController.html#acba2c4047396b1cb0d748649ac782f78">00732</a> <a class="code" href="classhippodraw_1_1DisplayController.html#acba2c4047396b1cb0d748649ac782f78" title="Returns the active DataRep object for the DataRep objects contained in the plotter...">activeDataRep</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 )<span class="keyword"> const</span> <a name="l00733"></a>00733 <span class="keyword"></span>{ <a name="l00734"></a>00734 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep = 0; <a name="l00735"></a>00735 <span class="keywordtype">int</span> index = <a class="code" href="classhippodraw_1_1DisplayController.html#a6fe40c65a134431836bb07d74d3525b1" title="Returns the active DataRep index for the DataRep objects contained in the plotter...">activeDataRepIndex</a> ( plotter ); <a name="l00736"></a>00736 <span class="keywordflow">if</span> ( index >= 0 ) { <a name="l00737"></a>00737 rep = plotter -> getDataRep ( index ); <a name="l00738"></a>00738 } <a name="l00739"></a>00739 <a name="l00740"></a>00740 <span class="keywordflow">return</span> rep; <a name="l00741"></a>00741 } <a name="l00742"></a>00742 <a name="l00743"></a>00743 <span class="keywordtype">void</span> <a name="l00744"></a>00744 <a class="code" href="classhippodraw_1_1DisplayController.html#a1dd82bec85593b7518ee85f563236ee3" title="Sets the active DataRep index.">DisplayController::</a> <a name="l00745"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a1dd82bec85593b7518ee85f563236ee3">00745</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a1dd82bec85593b7518ee85f563236ee3" title="Sets the active DataRep index.">setActiveDataRepIndex</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <span class="keywordtype">int</span> index ) <a name="l00746"></a>00746 { <a name="l00747"></a>00747 plotter -> setActivePlot ( index, <span class="keyword">true</span> ); <a name="l00748"></a>00748 } <a name="l00749"></a>00749 <a name="l00750"></a>00750 <span class="keyword">const</span> vector < string > & <a name="l00751"></a>00751 <a class="code" href="classhippodraw_1_1DisplayController.html#aefeae1ad985550039c399628a8b6d855" title="Returns the axis bindings, if any, otherwise returns an empty vector.">DisplayController::</a> <a name="l00752"></a><a class="code" href="classhippodraw_1_1DisplayController.html#aefeae1ad985550039c399628a8b6d855">00752</a> <a class="code" href="classhippodraw_1_1DisplayController.html#aefeae1ad985550039c399628a8b6d855" title="Returns the axis bindings, if any, otherwise returns an empty vector.">axisBindings</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 )<span class="keyword"> const</span> <a name="l00753"></a>00753 <span class="keyword"></span>{ <a name="l00754"></a>00754 <span class="comment">// This only make sense for a NTupleProjector, so we downcast</span> <a name="l00755"></a>00755 <a class="code" href="classhippodraw_1_1NTupleProjector.html" title="An NTupleProjector is a projector that projects data from an DataSource object.">NTupleProjector</a> * ntProjector = <a name="l00756"></a>00756 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> *> ( plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#ad21611548a8b5dc96d82032aa4a886e1" title="Returns the active projector.">activeProjector</a>() ); <a name="l00757"></a>00757 <a name="l00758"></a>00758 <span class="keywordflow">if</span> ( ntProjector == 0 ) <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1DisplayController.html#aba066a2b2ac69008d54af027489ab0eb" title="A empty vector of strings.">m_null_vector</a>; <a name="l00759"></a>00759 <a name="l00760"></a>00760 <span class="keywordflow">return</span> ntProjector-><a class="code" href="classhippodraw_1_1NTupleProjector.html#a49828970434ec09bd5b2367ac070d436" title="Returns the current axis bindings.">getAxisBindings</a> (); <a name="l00761"></a>00761 } <a name="l00762"></a>00762 <a name="l00763"></a>00763 <span class="keyword">const</span> vector < string > & <a name="l00764"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a7d5f1eef991fab205909e98313c7a1c9">00764</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a0f092138f237debaf5af9d43f38c166a" title="Returns the axis binding options for a DataRep of type type.">DisplayController::bindingOptions</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="l00765"></a>00765 <span class="keywordtype">int</span> index ) <a name="l00766"></a>00766 { <a name="l00767"></a>00767 <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> ( index ); <a name="l00768"></a>00768 <a class="code" href="classhippodraw_1_1DataRepController.html" title="A singleton class that is the interface between GUI and the DataRep.">DataRepController</a> * controller = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">DataRepController::instance</a> (); <a name="l00769"></a>00769 <a name="l00770"></a>00770 <span class="keywordflow">return</span> controller-><a class="code" href="classhippodraw_1_1DataRepController.html#aac96cd73dfac8c36c5b6451b3ada0eb8" title="Returns the binding options, if any, for the named DataRep.">bindingOptions</a> ( rep ); <a name="l00771"></a>00771 } <a name="l00772"></a>00772 <a name="l00773"></a>00773 <span class="keyword">const</span> vector < string > & <a name="l00774"></a>00774 <a class="code" href="classhippodraw_1_1DisplayController.html#a0f092138f237debaf5af9d43f38c166a" title="Returns the axis binding options for a DataRep of type type.">DisplayController::</a> <a name="l00775"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a0f092138f237debaf5af9d43f38c166a">00775</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a0f092138f237debaf5af9d43f38c166a" title="Returns the axis binding options for a DataRep of type type.">bindingOptions</a> ( <span class="keyword">const</span> std::string & <a class="code" href="namespacenum__util.html#af7e893a8c6a5f6a426480fc85cda4fa1">type</a> ) <a name="l00776"></a>00776 { <a name="l00777"></a>00777 <a class="code" href="classhippodraw_1_1DataRepFactory.html" title="This Singleton class maintains a list of DataRep objects.">DataRepFactory</a> * factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">DataRepFactory::instance</a> (); <a name="l00778"></a>00778 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep = factory -> prototype ( type ); <a name="l00779"></a>00779 <a class="code" href="classhippodraw_1_1DataRepController.html" title="A singleton class that is the interface between GUI and the DataRep.">DataRepController</a> * controller = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">DataRepController::instance</a> (); <a name="l00780"></a>00780 <a name="l00781"></a>00781 <span class="keywordflow">return</span> controller -> <a class="code" href="classhippodraw_1_1DisplayController.html#a0f092138f237debaf5af9d43f38c166a" title="Returns the axis binding options for a DataRep of type type.">bindingOptions</a> ( rep ); <a name="l00782"></a>00782 } <a name="l00783"></a>00783 <a name="l00784"></a>00784 <span class="keyword">const</span> vector < string > & <a name="l00785"></a>00785 <a class="code" href="classhippodraw_1_1DisplayController.html#aefeae1ad985550039c399628a8b6d855" title="Returns the axis bindings, if any, otherwise returns an empty vector.">DisplayController::</a> <a name="l00786"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a4a7b97d82e21309e9238803d1acd7adb">00786</a> <a class="code" href="classhippodraw_1_1DisplayController.html#aefeae1ad985550039c399628a8b6d855" title="Returns the axis bindings, if any, otherwise returns an empty vector.">axisBindings</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, <span class="keywordtype">int</span> index )<span class="keyword"> const</span> <a name="l00787"></a>00787 <span class="keyword"></span>{ <a name="l00788"></a>00788 assert ( index < plotter->getNumDataReps () ); <a name="l00789"></a>00789 <a name="l00790"></a>00790 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * pbase = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a128cb21ff41cef271076868d688097f3" title="Returns the projector at index i.">getProjector</a> ( index ); <a name="l00791"></a>00791 <span class="comment">// This only make sense for a NTupleProjector, so we downcast</span> <a name="l00792"></a>00792 <a class="code" href="classhippodraw_1_1NTupleProjector.html" title="An NTupleProjector is a projector that projects data from an DataSource object.">NTupleProjector</a> * ntProjector = <a name="l00793"></a>00793 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> *> ( pbase ); <a name="l00794"></a>00794 <a name="l00795"></a>00795 <span class="keywordflow">if</span> ( ntProjector == 0 ) <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1DisplayController.html#aba066a2b2ac69008d54af027489ab0eb" title="A empty vector of strings.">m_null_vector</a>; <a name="l00796"></a>00796 <a name="l00797"></a>00797 <span class="keywordflow">return</span> ntProjector-><a class="code" href="classhippodraw_1_1NTupleProjector.html#a49828970434ec09bd5b2367ac070d436" title="Returns the current axis bindings.">getAxisBindings</a> (); <a name="l00798"></a>00798 } <a name="l00799"></a>00799 <a name="l00800"></a>00800 <span class="keywordtype">int</span> <a name="l00801"></a>00801 <a class="code" href="classhippodraw_1_1DisplayController.html#a73330f05dd3c9028662fe6ffe48d3312" title="Returns the number of entries.">DisplayController::</a> <a name="l00802"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a73330f05dd3c9028662fe6ffe48d3312">00802</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a73330f05dd3c9028662fe6ffe48d3312" title="Returns the number of entries.">getNumberOfEntries</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, <span class="keywordtype">int</span> index )<span class="keyword"> const</span> <a name="l00803"></a>00803 <span class="keyword"></span>{ <a name="l00804"></a>00804 assert ( index < plotter->getNumDataReps () ); <a name="l00805"></a>00805 <a name="l00806"></a>00806 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * projector = plotter -> <a class="code" href="classhippodraw_1_1DisplayController.html#a961e0f09af8140617d4c67a841f8b71d" title="Returns the currently selected projector in the plot.">getProjector</a> ( index ); <a name="l00807"></a>00807 <a name="l00808"></a>00808 <span class="keywordflow">return</span> projector -> <a class="code" href="classhippodraw_1_1DisplayController.html#a73330f05dd3c9028662fe6ffe48d3312" title="Returns the number of entries.">getNumberOfEntries</a> (); <a name="l00809"></a>00809 } <a name="l00810"></a>00810 <a name="l00811"></a>00811 <span class="keywordtype">int</span> <a name="l00812"></a>00812 <a class="code" href="classhippodraw_1_1DisplayController.html#ac1488777113f0cad3841555fc673a10d" title="Returns the number of underflow.">DisplayController::</a> <a name="l00813"></a><a class="code" href="classhippodraw_1_1DisplayController.html#ac1488777113f0cad3841555fc673a10d">00813</a> <a class="code" href="classhippodraw_1_1DisplayController.html#ac1488777113f0cad3841555fc673a10d" title="Returns the number of underflow.">getUnderflow</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, <span class="keywordtype">int</span> index )<span class="keyword"> const</span> <a name="l00814"></a>00814 <span class="keyword"></span>{ <a name="l00815"></a>00815 assert ( index < plotter->getNumDataReps () ); <a name="l00816"></a>00816 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * projector = plotter -> <a class="code" href="classhippodraw_1_1DisplayController.html#a961e0f09af8140617d4c67a841f8b71d" title="Returns the currently selected projector in the plot.">getProjector</a> ( index ); <a name="l00817"></a>00817 <span class="keywordflow">return</span> projector -> <a class="code" href="classhippodraw_1_1DisplayController.html#ac1488777113f0cad3841555fc673a10d" title="Returns the number of underflow.">getUnderflow</a> (); <a name="l00818"></a>00818 } <a name="l00819"></a>00819 <a name="l00820"></a>00820 <span class="keywordtype">int</span> <a name="l00821"></a>00821 <a class="code" href="classhippodraw_1_1DisplayController.html#ad10b52ddce646b82546b4d40b9181306" title="Returns the number of overflow.">DisplayController::</a> <a name="l00822"></a><a class="code" href="classhippodraw_1_1DisplayController.html#ad10b52ddce646b82546b4d40b9181306">00822</a> <a class="code" href="classhippodraw_1_1DisplayController.html#ad10b52ddce646b82546b4d40b9181306" title="Returns the number of overflow.">getOverflow</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, <span class="keywordtype">int</span> index )<span class="keyword"> const</span> <a name="l00823"></a>00823 <span class="keyword"></span>{ <a name="l00824"></a>00824 assert ( index < plotter->getNumDataReps () ); <a name="l00825"></a>00825 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * projector = plotter -> <a class="code" href="classhippodraw_1_1DisplayController.html#a961e0f09af8140617d4c67a841f8b71d" title="Returns the currently selected projector in the plot.">getProjector</a> ( index ); <a name="l00826"></a>00826 <span class="keywordflow">return</span> projector -> <a class="code" href="classhippodraw_1_1DisplayController.html#ad10b52ddce646b82546b4d40b9181306" title="Returns the number of overflow.">getOverflow</a> (); <a name="l00827"></a>00827 } <a name="l00828"></a>00828 <a name="l00829"></a>00829 <span class="keywordtype">double</span> <a name="l00830"></a>00830 <a class="code" href="classhippodraw_1_1DisplayController.html#ad488d2311d3e7ca721594a3722e85e2d" title="Returns the average value.">DisplayController::</a> <a name="l00831"></a><a class="code" href="classhippodraw_1_1DisplayController.html#ad488d2311d3e7ca721594a3722e85e2d">00831</a> <a class="code" href="classhippodraw_1_1DisplayController.html#ad488d2311d3e7ca721594a3722e85e2d" title="Returns the average value.">getAverage</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="l00832"></a>00832 <span class="keyword">const</span> std::string & axis, <span class="keywordtype">int</span> index )<span class="keyword"> const</span> <a name="l00833"></a>00833 <span class="keyword"></span>{ <a name="l00834"></a>00834 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">Axes::Type</a> a = <a class="code" href="namespacehippodraw_1_1Axes.html#ae2337bddf33bc8b17dd5c08e665422cd" title="Converts from string representation ot Axes::Type representation.">Axes::convert</a> ( axis ); <a name="l00835"></a>00835 <a name="l00836"></a>00836 <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1DisplayController.html#ad488d2311d3e7ca721594a3722e85e2d" title="Returns the average value.">getAverage</a> ( plotter, a, index ); <a name="l00837"></a>00837 } <a name="l00838"></a>00838 <a name="l00839"></a>00839 <span class="keywordtype">double</span> <a name="l00840"></a>00840 <a class="code" href="classhippodraw_1_1DisplayController.html#ad488d2311d3e7ca721594a3722e85e2d" title="Returns the average value.">DisplayController::</a> <a name="l00841"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a51936b9d4f35ef632656bbf8c0f27067">00841</a> <a class="code" href="classhippodraw_1_1DisplayController.html#ad488d2311d3e7ca721594a3722e85e2d" title="Returns the average value.">getAverage</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="l00842"></a>00842 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <a name="l00843"></a>00843 <span class="keywordtype">int</span> index )<span class="keyword"> const</span> <a name="l00844"></a>00844 <span class="keyword"></span>{ <a name="l00845"></a>00845 assert ( index < plotter -> getNumDataReps () ); <a name="l00846"></a>00846 <a name="l00847"></a>00847 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * projector = plotter -> <a class="code" href="classhippodraw_1_1DisplayController.html#a961e0f09af8140617d4c67a841f8b71d" title="Returns the currently selected projector in the plot.">getProjector</a> ( index ); <a name="l00848"></a>00848 <a name="l00849"></a>00849 <span class="keywordflow">return</span> projector -> <a class="code" href="classhippodraw_1_1DisplayController.html#ad488d2311d3e7ca721594a3722e85e2d" title="Returns the average value.">getAverage</a> ( axis ); <a name="l00850"></a>00850 } <a name="l00851"></a>00851 <a name="l00852"></a>00852 <span class="keywordtype">double</span> <a name="l00853"></a>00853 <a class="code" href="classhippodraw_1_1DisplayController.html#acd3f80cc2f70b6c524a1ec2cdb6be5a7" title="Returns the root mean square along the specified axis for DataRep indexed by index...">DisplayController::</a> <a name="l00854"></a><a class="code" href="classhippodraw_1_1DisplayController.html#acd3f80cc2f70b6c524a1ec2cdb6be5a7">00854</a> <a class="code" href="classhippodraw_1_1DisplayController.html#acd3f80cc2f70b6c524a1ec2cdb6be5a7" title="Returns the root mean square along the specified axis for DataRep indexed by index...">getRMS</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="l00855"></a>00855 <span class="keyword">const</span> std::string & axis, <span class="keywordtype">int</span> index )<span class="keyword"> const</span> <a name="l00856"></a>00856 <span class="keyword"></span>{ <a name="l00857"></a>00857 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">Axes::Type</a> a = <a class="code" href="namespacehippodraw_1_1Axes.html#ae2337bddf33bc8b17dd5c08e665422cd" title="Converts from string representation ot Axes::Type representation.">Axes::convert</a> ( axis ); <a name="l00858"></a>00858 <a name="l00859"></a>00859 <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1DisplayController.html#acd3f80cc2f70b6c524a1ec2cdb6be5a7" title="Returns the root mean square along the specified axis for DataRep indexed by index...">getRMS</a> ( plotter, a, index ); <a name="l00860"></a>00860 } <a name="l00861"></a>00861 <a name="l00862"></a>00862 <span class="keywordtype">double</span> <a name="l00863"></a>00863 <a class="code" href="classhippodraw_1_1DisplayController.html#acd3f80cc2f70b6c524a1ec2cdb6be5a7" title="Returns the root mean square along the specified axis for DataRep indexed by index...">DisplayController::</a> <a name="l00864"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a1eec43eece49069e0c0b1bd401cd6bf1">00864</a> <a class="code" href="classhippodraw_1_1DisplayController.html#acd3f80cc2f70b6c524a1ec2cdb6be5a7" title="Returns the root mean square along the specified axis for DataRep indexed by index...">getRMS</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="l00865"></a>00865 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <a name="l00866"></a>00866 <span class="keywordtype">int</span> index )<span class="keyword"> const</span> <a name="l00867"></a>00867 <span class="keyword"></span>{ <a name="l00868"></a>00868 assert ( index < plotter -> getNumDataReps () ); <a name="l00869"></a>00869 <a name="l00870"></a>00870 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * projector = plotter -> <a class="code" href="classhippodraw_1_1DisplayController.html#a961e0f09af8140617d4c67a841f8b71d" title="Returns the currently selected projector in the plot.">getProjector</a> ( index ); <a name="l00871"></a>00871 <a name="l00872"></a>00872 <span class="keywordflow">return</span> projector -> <a class="code" href="classhippodraw_1_1DisplayController.html#acd3f80cc2f70b6c524a1ec2cdb6be5a7" title="Returns the root mean square along the specified axis for DataRep indexed by index...">getRMS</a> ( axis ); <a name="l00873"></a>00873 } <a name="l00874"></a>00874 <a name="l00875"></a><a class="code" href="classhippodraw_1_1DisplayController.html#aaa678636e331dc0224fc3c632634badd">00875</a> <span class="keyword">const</span> <span class="keywordtype">string</span> & <a class="code" href="classhippodraw_1_1DisplayController.html#aaa678636e331dc0224fc3c632634badd" title="Returns the type of DataRep contained in the plotter at index index.">DisplayController::getType</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="l00876"></a>00876 <span class="keywordtype">int</span> index )<span class="keyword"> const</span> <a name="l00877"></a>00877 <span class="keyword"></span>{ <a name="l00878"></a>00878 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep = 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> ( index ); <a name="l00879"></a>00879 <a name="l00880"></a>00880 <span class="keywordflow">return</span> datarep-><a class="code" href="classhippodraw_1_1DataRep.html#a11c23a386abb9eb8a42f0c2c2835d640" title="Returns the name of the display.">name</a> (); <a name="l00881"></a>00881 } <a name="l00882"></a>00882 <a name="l00883"></a>00883 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * <a name="l00884"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a961e0f09af8140617d4c67a841f8b71d">00884</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a961e0f09af8140617d4c67a841f8b71d" title="Returns the currently selected projector in the plot.">DisplayController::getProjector</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 )<span class="keyword"> const</span> <a name="l00885"></a>00885 <span class="keyword"></span>{ <a name="l00886"></a>00886 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a666709c994dc9582b8127aefa106fe48" title="Returns the selected DataRep.">selectedDataRep</a> (); <a name="l00887"></a>00887 <a name="l00888"></a>00888 <span class="keywordflow">if</span> ( datarep == 0 ) <span class="keywordflow">return</span> 0; <a name="l00889"></a>00889 <a name="l00890"></a>00890 <span class="keywordflow">return</span> datarep-><a class="code" href="classhippodraw_1_1DataRep.html#a37b55376f6e66874ac5a9ece07a0f57f" title="Returns the Projector object controlling the data.">getProjector</a> (); <a name="l00891"></a>00891 } <a name="l00892"></a>00892 <a name="l00896"></a>00896 <a class="code" href="classhippodraw_1_1NTupleProjector.html" title="An NTupleProjector is a projector that projects data from an DataSource object.">NTupleProjector</a> * <a name="l00897"></a><a class="code" href="classhippodraw_1_1DisplayController.html#ac920cdada74e3e9003f0c58fb3bf8852">00897</a> <a class="code" href="classhippodraw_1_1DisplayController.html#ac920cdada74e3e9003f0c58fb3bf8852" title="Returns projector that supports binding, if display has one, otherwise returns null...">DisplayController::getBindingProjector</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 )<span class="keyword"> const</span> <a name="l00898"></a>00898 <span class="keyword"></span>{ <a name="l00899"></a>00899 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * projbase = <a class="code" href="classhippodraw_1_1DisplayController.html#a961e0f09af8140617d4c67a841f8b71d" title="Returns the currently selected projector in the plot.">getProjector</a> ( plotter ); <a name="l00900"></a>00900 <span class="keywordflow">if</span> ( projbase != 0 ) { <a name="l00901"></a>00901 <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="l00902"></a>00902 = 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> * > ( projbase ); <a name="l00903"></a>00903 <span class="keywordflow">return</span> projector; <a name="l00904"></a>00904 } <a name="l00905"></a>00905 <span class="comment">// Failure of the above is because multiple DataRep objects are</span> <a name="l00906"></a>00906 <span class="comment">// selected. However, if the the additional ones are all</span> <a name="l00907"></a>00907 <span class="comment">// FunctionRep objects, then we want to find the single DataRep</span> <a name="l00908"></a>00908 <span class="comment">// object.</span> <a name="l00909"></a>00909 <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="l00910"></a>00910 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = 0; i < number; i++ ) { <a name="l00911"></a>00911 <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="l00912"></a>00912 <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="l00913"></a>00913 <span class="keywordflow">if</span> ( frep != 0 ) <span class="keywordflow">continue</span>; <a name="l00914"></a>00914 <span class="keywordflow">if</span> ( projbase == 0 ) { <a name="l00915"></a>00915 projbase = rep-><a class="code" href="classhippodraw_1_1DataRep.html#a37b55376f6e66874ac5a9ece07a0f57f" title="Returns the Projector object controlling the data.">getProjector</a> (); <a name="l00916"></a>00916 } <a name="l00917"></a>00917 <span class="keywordflow">else</span> { <a name="l00918"></a>00918 <span class="keywordflow">return</span> 0; <span class="comment">// multiple non- FunctionRep objects found</span> <a name="l00919"></a>00919 } <a name="l00920"></a>00920 } <a name="l00921"></a>00921 <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="l00922"></a>00922 = 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> * > ( projbase ); <a name="l00923"></a>00923 <a name="l00924"></a>00924 <span class="keywordflow">return</span> projector; <a name="l00925"></a>00925 } <a name="l00926"></a>00926 <a name="l00927"></a><a class="code" href="classhippodraw_1_1DisplayController.html#afa9280822747be9441d68e613c24933c">00927</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1DisplayController.html#afa9280822747be9441d68e613c24933c" title="Sets the ntuple on the selected DataRep, if it has ntuple bindings, otherwise does...">DisplayController::setNTuple</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l00928"></a>00928 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * ntuple )<span class="keyword"> const</span> <a name="l00929"></a>00929 <span class="keyword"></span>{ <a name="l00930"></a>00930 <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 class="code" href="classhippodraw_1_1DisplayController.html#ac920cdada74e3e9003f0c58fb3bf8852" title="Returns projector that supports binding, if display has one, otherwise returns null...">getBindingProjector</a> ( plotter ); <a name="l00931"></a>00931 <span class="keywordflow">if</span> ( projector == 0 ) <span class="keywordflow">return</span>; <a name="l00932"></a>00932 <a name="l00933"></a>00933 projector-><a class="code" href="classhippodraw_1_1NTupleProjector.html#a85781de61fcbae91ab04f388c2dc982c" title="Changes the DataSource used for the projections to source.">setNTuple</a> ( ntuple ); <a name="l00934"></a>00934 <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * nt = const_cast < <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * > ( ntuple ); <a name="l00935"></a>00935 nt-><a class="code" href="classhippodraw_1_1Observable.html#a935717d80cde1bfe272cd0c5e256ee7b" title="Adds an Observer to the Observer list.">addObserver</a> ( projector ); <a name="l00936"></a>00936 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a666709c994dc9582b8127aefa106fe48" title="Returns the selected DataRep.">selectedDataRep</a> (); <a name="l00937"></a>00937 <a name="l00938"></a>00938 datarep-><a class="code" href="classhippodraw_1_1Observable.html#a22405609eb7094686259b6a82ad8e0cc" title="Notifies Observer objects of a change.">notifyObservers</a> (); <a name="l00939"></a>00939 } <a name="l00940"></a>00940 <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * <a name="l00941"></a>00941 <a class="code" href="classhippodraw_1_1DisplayController.html#aca3e412c5dd370850bfe38898ab28ed4" title="Returns the Datasource for the plotter&#39;s selected DataRep or the DataSource used...">DisplayController::</a> <a name="l00942"></a><a class="code" href="classhippodraw_1_1DisplayController.html#aca3e412c5dd370850bfe38898ab28ed4">00942</a> <a class="code" href="classhippodraw_1_1DisplayController.html#aca3e412c5dd370850bfe38898ab28ed4" title="Returns the Datasource for the plotter&#39;s selected DataRep or the DataSource used...">getDataSource</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="l00943"></a>00943 { <a name="l00944"></a>00944 <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * source = 0; <a name="l00945"></a>00945 <span class="keywordtype">int</span> index = <a class="code" href="classhippodraw_1_1DisplayController.html#a6fe40c65a134431836bb07d74d3525b1" title="Returns the active DataRep index for the DataRep objects contained in the plotter...">activeDataRepIndex</a> ( plotter ); <a name="l00946"></a>00946 <span class="keywordtype">int</span> numDataReps = plotter -> getNumDataReps (); <a name="l00947"></a>00947 <span class="keywordflow">if</span> ( index >= 0 || numDataReps < 2 ) { <a name="l00948"></a>00948 source = <a class="code" href="classhippodraw_1_1DisplayController.html#aca3e412c5dd370850bfe38898ab28ed4" title="Returns the Datasource for the plotter&#39;s selected DataRep or the DataSource used...">getDataSource</a> ( plotter, 0 ); <a name="l00949"></a>00949 } <a name="l00950"></a>00950 <span class="keywordflow">else</span> { <a name="l00951"></a>00951 source = <a class="code" href="classhippodraw_1_1DisplayController.html#aca3e412c5dd370850bfe38898ab28ed4" title="Returns the Datasource for the plotter&#39;s selected DataRep or the DataSource used...">getDataSource</a> ( plotter, 0 ); <a name="l00952"></a>00952 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = 1; i< numDataReps; i++ ) { <a name="l00953"></a>00953 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * nt = <a class="code" href="classhippodraw_1_1DisplayController.html#aca3e412c5dd370850bfe38898ab28ed4" title="Returns the Datasource for the plotter&#39;s selected DataRep or the DataSource used...">getDataSource</a> ( plotter, i ); <a name="l00954"></a>00954 <span class="keywordflow">if</span> ( source != nt ) { <a name="l00955"></a>00955 source = 0; <a name="l00956"></a>00956 <span class="keywordflow">break</span>; <a name="l00957"></a>00957 } <a name="l00958"></a>00958 } <a name="l00959"></a>00959 } <a name="l00960"></a>00960 <span class="keywordflow">return</span> source; <a name="l00961"></a>00961 } <a name="l00962"></a>00962 <a name="l00963"></a>00963 <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * <a name="l00964"></a>00964 <a class="code" href="classhippodraw_1_1DisplayController.html#aca3e412c5dd370850bfe38898ab28ed4" title="Returns the Datasource for the plotter&#39;s selected DataRep or the DataSource used...">DisplayController::</a> <a name="l00965"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a7127d5e59b685616cd5538b40a08911b">00965</a> <a class="code" href="classhippodraw_1_1DisplayController.html#aca3e412c5dd370850bfe38898ab28ed4" title="Returns the Datasource for the plotter&#39;s selected DataRep or the DataSource used...">getDataSource</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, <span class="keywordtype">int</span> index ) <a name="l00966"></a>00966 { <a name="l00967"></a>00967 <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * source = 0; <a name="l00968"></a>00968 <a name="l00969"></a>00969 <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> ( index ); <a name="l00970"></a>00970 <span class="keywordflow">if</span> ( rep-><a class="code" href="classhippodraw_1_1DataRep.html#a31579875c6ccc59185e3503446d4a09a" title="Returns true if the DataRep&#39;s projector can bind to DataSource.">hasNTupleBindings</a> () ) { <a name="l00971"></a>00971 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * pbase = rep-><a class="code" href="classhippodraw_1_1DataRep.html#a37b55376f6e66874ac5a9ece07a0f57f" title="Returns the Projector object controlling the data.">getProjector</a> (); <a name="l00972"></a>00972 <a class="code" href="classhippodraw_1_1NTupleProjector.html" title="An NTupleProjector is a projector that projects data from an DataSource object.">NTupleProjector</a> * projector = 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> * > ( pbase ); <a name="l00973"></a>00973 <span class="keywordflow">if</span> ( projector != 0 ) { <a name="l00974"></a>00974 source = projector -> getNTuple (); <a name="l00975"></a>00975 } <a name="l00976"></a>00976 } <a name="l00977"></a>00977 <a name="l00978"></a>00978 <span class="keywordflow">return</span> source; <a name="l00979"></a>00979 } <a name="l00980"></a>00980 <a name="l00981"></a>00981 <span class="keywordtype">void</span> <a name="l00982"></a>00982 <a class="code" href="classhippodraw_1_1DisplayController.html#ab9d08a58a61c7ee71f0a723298989027" title="Sets the interval count on the the NTuple of the active DataRep of the plotter.">DisplayController::</a> <a name="l00983"></a><a class="code" href="classhippodraw_1_1DisplayController.html#ab9d08a58a61c7ee71f0a723298989027">00983</a> <a class="code" href="classhippodraw_1_1DisplayController.html#ab9d08a58a61c7ee71f0a723298989027" title="Sets the interval count on the the NTuple of the active DataRep of the plotter.">setIntervalCount</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, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> count ) <a name="l00984"></a>00984 { <a name="l00985"></a>00985 <span class="keywordtype">int</span> i = <a class="code" href="classhippodraw_1_1DisplayController.html#a6fe40c65a134431836bb07d74d3525b1" title="Returns the active DataRep index for the DataRep objects contained in the plotter...">activeDataRepIndex</a> ( plotter ); <a name="l00986"></a>00986 <span class="keywordflow">if</span> ( i < 0 ) <span class="keywordflow">return</span>; <a name="l00987"></a>00987 <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * ds = <a class="code" href="classhippodraw_1_1DisplayController.html#aca3e412c5dd370850bfe38898ab28ed4" title="Returns the Datasource for the plotter&#39;s selected DataRep or the DataSource used...">getDataSource</a> ( plotter, i ); <a name="l00988"></a>00988 <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * ntuple = dynamic_cast < <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * > ( ds ); <a name="l00989"></a>00989 <a name="l00990"></a>00990 <span class="keywordflow">if</span> ( ntuple != 0 ) ntuple-><a class="code" href="classhippodraw_1_1NTuple.html#ae0aaf446cfde9571718b91b66572160a" title="Sets the interval count.">setIntervalCount</a> ( count ); <a name="l00991"></a>00991 } <a name="l00992"></a>00992 <a name="l00993"></a>00993 <span class="keywordtype">void</span> <a name="l00994"></a>00994 <a class="code" href="classhippodraw_1_1DisplayController.html#a65fec5f805d29befe4585b226845f180" title="Sets the interval counting to yes on the NTuple of the active DataRep of the plotter...">DisplayController::</a> <a name="l00995"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a65fec5f805d29befe4585b226845f180">00995</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a65fec5f805d29befe4585b226845f180" title="Sets the interval counting to yes on the NTuple of the active DataRep of the plotter...">setIntervalEnabled</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, <span class="keywordtype">bool</span> yes ) <a name="l00996"></a>00996 { <a name="l00997"></a>00997 <span class="keywordtype">int</span> i = <a class="code" href="classhippodraw_1_1DisplayController.html#a6fe40c65a134431836bb07d74d3525b1" title="Returns the active DataRep index for the DataRep objects contained in the plotter...">activeDataRepIndex</a> ( plotter ); <a name="l00998"></a>00998 <span class="keywordflow">if</span> ( i < 0 ) <span class="keywordflow">return</span>; <a name="l00999"></a>00999 <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * ds = <a class="code" href="classhippodraw_1_1DisplayController.html#aca3e412c5dd370850bfe38898ab28ed4" title="Returns the Datasource for the plotter&#39;s selected DataRep or the DataSource used...">getDataSource</a> ( plotter, i ); <a name="l01000"></a>01000 <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * ntuple = dynamic_cast < <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * > ( ds ); <a name="l01001"></a>01001 <a name="l01002"></a>01002 <span class="keywordflow">if</span> ( ntuple != 0 ) ntuple-><a class="code" href="classhippodraw_1_1NTuple.html#ad889288071f3192cbbbc4eddcf3adfae" title="Sets interval counting to be enabled.">setIntervalEnabled</a> ( yes ); <a name="l01003"></a>01003 } <a name="l01004"></a>01004 <a name="l01005"></a>01005 <span class="keywordtype">void</span> <a name="l01006"></a>01006 <a class="code" href="classhippodraw_1_1DisplayController.html#af80721ca661ea1f4292a4c656bd79a3a" title="Sets the interval counting to yes of all the NTuple used by the plotter.">DisplayController::</a> <a name="l01007"></a><a class="code" href="classhippodraw_1_1DisplayController.html#af80721ca661ea1f4292a4c656bd79a3a">01007</a> <a class="code" href="classhippodraw_1_1DisplayController.html#af80721ca661ea1f4292a4c656bd79a3a" title="Sets the interval counting to yes of all the NTuple used by the plotter.">setAllIntervalEnabled</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, <span class="keywordtype">bool</span> yes ) <a name="l01008"></a>01008 { <a name="l01009"></a>01009 <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="l01010"></a>01010 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = 0; i < number; i++ ) { <a name="l01011"></a>01011 <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * ds = <a class="code" href="classhippodraw_1_1DisplayController.html#aca3e412c5dd370850bfe38898ab28ed4" title="Returns the Datasource for the plotter&#39;s selected DataRep or the DataSource used...">getDataSource</a> ( plotter, i ); <a name="l01012"></a>01012 <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * ntuple = dynamic_cast < <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * > ( ds ); <a name="l01013"></a>01013 <span class="keywordflow">if</span> ( ntuple != 0 ) ntuple-><a class="code" href="classhippodraw_1_1NTuple.html#ad889288071f3192cbbbc4eddcf3adfae" title="Sets interval counting to be enabled.">setIntervalEnabled</a> ( yes ); <a name="l01014"></a>01014 } <a name="l01015"></a>01015 } <a name="l01016"></a>01016 <a name="l01017"></a>01017 <span class="keywordtype">bool</span> <a name="l01018"></a>01018 <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...">DisplayController::</a> <a name="l01019"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a5521f3f70ccdf2c243ecb769702197b2">01019</a> <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> ( <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="l01020"></a>01020 { <a name="l01021"></a>01021 <span class="keywordtype">bool</span> yes = <span class="keyword">true</span>; <a name="l01022"></a>01022 <a class="code" href="classhippodraw_1_1DataSourceController.html" title="A singleton class that is the interface between GUI and the DataSource objects.">DataSourceController</a> * controller = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">DataSourceController::instance</a> (); <a name="l01023"></a>01023 <a name="l01024"></a>01024 <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="l01025"></a>01025 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = 0; i < number; i++ ) { <a name="l01026"></a>01026 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * source = <a class="code" href="classhippodraw_1_1DisplayController.html#aca3e412c5dd370850bfe38898ab28ed4" title="Returns the Datasource for the plotter&#39;s selected DataRep or the DataSource used...">getDataSource</a> ( plotter, i ); <a name="l01027"></a>01027 <span class="keywordflow">if</span> ( source != 0 ) { <a name="l01028"></a>01028 yes = controller -> isFromFile ( source ); <a name="l01029"></a>01029 } <a name="l01030"></a>01030 <span class="keywordflow">if</span> ( yes == <span class="keyword">false</span> ) <span class="keywordflow">break</span>; <a name="l01031"></a>01031 } <a name="l01032"></a>01032 <a name="l01033"></a>01033 <span class="keywordflow">return</span> yes; <a name="l01034"></a>01034 } <a name="l01035"></a>01035 <a name="l01036"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a46d57c56b8980d6987702379e1b7d351">01036</a> <span class="keywordtype">bool</span> <a class="code" href="classhippodraw_1_1DisplayController.html#a46d57c56b8980d6987702379e1b7d351" title="Returns true if the DataRep contained by the plotter at index index has NTuple bindings...">DisplayController::hasNTupleBindings</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="l01037"></a>01037 <span class="keywordtype">int</span> index ) <a name="l01038"></a>01038 { <a name="l01039"></a>01039 assert ( ! ( index < 0 ) ); <a name="l01040"></a>01040 <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> ( index ); <a name="l01041"></a>01041 <a name="l01042"></a>01042 <span class="keywordflow">return</span> rep-><a class="code" href="classhippodraw_1_1DataRep.html#a31579875c6ccc59185e3503446d4a09a" title="Returns true if the DataRep&#39;s projector can bind to DataSource.">hasNTupleBindings</a> (); <a name="l01043"></a>01043 } <a name="l01044"></a>01044 <a name="l01045"></a>01045 <span class="keyword">const</span> <span class="keywordtype">string</span> & <a name="l01046"></a>01046 <a class="code" href="classhippodraw_1_1DisplayController.html#a389efe9eeee476b93a2dd9f87cc90f27" title="Returns the name of the DataSource for the DataRep contained in the plotter at index...">DisplayController::</a> <a name="l01047"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a389efe9eeee476b93a2dd9f87cc90f27">01047</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a389efe9eeee476b93a2dd9f87cc90f27" title="Returns the name of the DataSource for the DataRep contained in the plotter at index...">getDataSourceName</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="l01048"></a>01048 <span class="keywordtype">int</span> index ) <a name="l01049"></a>01049 { <a name="l01050"></a>01050 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * source = <a class="code" href="classhippodraw_1_1DisplayController.html#aca3e412c5dd370850bfe38898ab28ed4" title="Returns the Datasource for the plotter&#39;s selected DataRep or the DataSource used...">getDataSource</a> ( plotter, index ); <a name="l01051"></a>01051 <a name="l01052"></a>01052 <span class="keywordflow">return</span> source -> getName (); <a name="l01053"></a>01053 } <a name="l01054"></a>01054 <a name="l01055"></a>01055 <span class="keyword">const</span> vector < string > & <a name="l01056"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a6f589aa5bb0686a1d1c18aa9dd2de701">01056</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a6f589aa5bb0686a1d1c18aa9dd2de701" title="Returns the labels of the DataSource columns for the DataRep contained in the plotter...">DisplayController::getDataSourceLabels</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="l01057"></a>01057 <span class="keywordtype">int</span> index ) <a name="l01058"></a>01058 { <a name="l01059"></a>01059 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep = 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> ( index ); <a name="l01060"></a>01060 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * pbase = datarep-><a class="code" href="classhippodraw_1_1DataRep.html#a37b55376f6e66874ac5a9ece07a0f57f" title="Returns the Projector object controlling the data.">getProjector</a> (); <a name="l01061"></a>01061 <a class="code" href="classhippodraw_1_1NTupleProjector.html" title="An NTupleProjector is a projector that projects data from an DataSource object.">NTupleProjector</a> * projector = 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> * > ( pbase ); <a name="l01062"></a>01062 <span class="keywordflow">if</span> ( projector == 0 ) <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1DisplayController.html#aba066a2b2ac69008d54af027489ab0eb" title="A empty vector of strings.">m_null_vector</a>; <a name="l01063"></a>01063 <a name="l01064"></a>01064 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * tuple = projector-><a class="code" href="classhippodraw_1_1NTupleProjector.html#a4accd8889e3cc6ced269a0b851164bf8" title="Returns the DataSource used by the projector.">getNTuple</a> (); <a name="l01065"></a>01065 <a name="l01066"></a>01066 <span class="keywordflow">return</span> tuple-><a class="code" href="classhippodraw_1_1DataSource.html#a5f883b623617dd5f66e2fa57216c9397" title="Returns the list of available labels.">getLabels</a> (); <a name="l01067"></a>01067 } <a name="l01068"></a>01068 <a name="l01069"></a>01069 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * <a name="l01070"></a>01070 <a class="code" href="classhippodraw_1_1DisplayController.html#a2cf6430188bb195b6097294346bde4ab" title="Returns the unique DataRep.">DisplayController::</a> <a name="l01071"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a2cf6430188bb195b6097294346bde4ab">01071</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a2cf6430188bb195b6097294346bde4ab" title="Returns the unique DataRep.">getUniqueWithNTupleBindings</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="l01072"></a>01072 { <a name="l01073"></a>01073 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep = 0; <a name="l01074"></a>01074 <span class="keywordtype">int</span> active = plotter -> activePlotIndex (); <a name="l01075"></a>01075 <a name="l01076"></a>01076 <span class="keywordflow">if</span> ( active < 0 ) { <span class="comment">// multiple active</span> <a name="l01077"></a>01077 <span class="keywordtype">int</span> count = 0; <a name="l01078"></a>01078 <span class="keywordtype">int</span> number = plotter -> getNumDataReps (); <a name="l01079"></a>01079 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = 0; i < number; i++ ) { <a name="l01080"></a>01080 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * trep = plotter -> getDataRep ( i ); <a name="l01081"></a>01081 <span class="keywordflow">if</span> ( trep -> <a class="code" href="classhippodraw_1_1DisplayController.html#a46d57c56b8980d6987702379e1b7d351" title="Returns true if the DataRep contained by the plotter at index index has NTuple bindings...">hasNTupleBindings</a> () ) { <a name="l01082"></a>01082 <span class="keywordflow">if</span> ( count == 0 ) { <a name="l01083"></a>01083 rep = trep; <a name="l01084"></a>01084 count ++; <a name="l01085"></a>01085 } <a name="l01086"></a>01086 <span class="keywordflow">else</span> { <a name="l01087"></a>01087 rep = 0; <a name="l01088"></a>01088 <span class="keywordflow">break</span>; <a name="l01089"></a>01089 } <a name="l01090"></a>01090 } <a name="l01091"></a>01091 } <a name="l01092"></a>01092 } <a name="l01093"></a>01093 <span class="keywordflow">else</span> { <span class="comment">// only one active</span> <a name="l01094"></a>01094 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> ( active ); <a name="l01095"></a>01095 <span class="keywordflow">if</span> ( rep -><a class="code" href="classhippodraw_1_1DisplayController.html#a46d57c56b8980d6987702379e1b7d351" title="Returns true if the DataRep contained by the plotter at index index has NTuple bindings...">hasNTupleBindings</a> () == <span class="keyword">false</span> ) { <a name="l01096"></a>01096 rep = 0; <a name="l01097"></a>01097 } <a name="l01098"></a>01098 } <a name="l01099"></a>01099 <a name="l01100"></a>01100 <span class="keywordflow">return</span> rep; <a name="l01101"></a>01101 } <a name="l01102"></a>01102 <a name="l01103"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a965f7ae4856f0466e8be07df3311c89d">01103</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1DisplayController.html#a965f7ae4856f0466e8be07df3311c89d" title="Sets the axis binding, if any, otherwise does nothing.">DisplayController::setAxisBinding</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01104"></a>01104 <span class="keyword">const</span> std::string & axis, <a name="l01105"></a>01105 <span class="keyword">const</span> std::string & label ) <a name="l01106"></a>01106 { <a name="l01107"></a>01107 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep = plotter -> getTarget (); <a name="l01108"></a>01108 <a name="l01109"></a>01109 <span class="keywordflow">if</span> ( rep != 0 ) { <a name="l01110"></a>01110 rep -> <a class="code" href="classhippodraw_1_1DisplayController.html#a965f7ae4856f0466e8be07df3311c89d" title="Sets the axis binding, if any, otherwise does nothing.">setAxisBinding</a> ( axis, label ); <a name="l01111"></a>01111 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">Axes::Type</a> a = <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a>; <a name="l01112"></a>01112 <span class="keywordflow">if</span> ( axis[0] == <span class="charliteral">'Y'</span> ) a = <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a>; <a name="l01113"></a>01113 plotter -> setAutoRanging ( a, <span class="keyword">true</span> ); <a name="l01114"></a>01114 plotter -> autoScale (); <a name="l01115"></a>01115 } <a name="l01116"></a>01116 } <a name="l01117"></a>01117 <a name="l01118"></a>01118 <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1DisplayController.html#ac1cff1b7df1348218abc334e2487ef4a" title="Sets all the axis bindings, if any, otherwise does nothing.">DisplayController::</a> <a name="l01119"></a><a class="code" href="classhippodraw_1_1DisplayController.html#ac1cff1b7df1348218abc334e2487ef4a">01119</a> <a class="code" href="classhippodraw_1_1DisplayController.html#ac1cff1b7df1348218abc334e2487ef4a" title="Sets all the axis bindings, if any, otherwise does nothing.">setAxisBindings</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01120"></a>01120 <span class="keyword">const</span> std::vector< std::string > & labels )<span class="keyword"> const</span> <a name="l01121"></a>01121 <span class="keyword"></span>{ <a name="l01122"></a>01122 <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 class="code" href="classhippodraw_1_1DisplayController.html#ac920cdada74e3e9003f0c58fb3bf8852" title="Returns projector that supports binding, if display has one, otherwise returns null...">getBindingProjector</a> ( plotter ); <a name="l01123"></a>01123 <span class="keywordflow">if</span> ( projector == 0 ) <span class="keywordflow">return</span>; <a name="l01124"></a>01124 <a name="l01125"></a>01125 projector-><a class="code" href="classhippodraw_1_1NTupleProjector.html#a2ffeeab35fcb17b807244095add8d2d7" title="Sets the axis bindings, Sets, in the order of the binding options, the binding to...">setAxisBindings</a> ( labels ); <a name="l01126"></a>01126 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a352144bce77f0f9cadfb18097f50898c" title="Sets the auto-ranging.">setAutoRanging</a> ( <span class="keyword">true</span> ); <a name="l01127"></a>01127 <a name="l01128"></a>01128 } <a name="l01129"></a>01129 <a name="l01130"></a>01130 <span class="keywordtype">bool</span> <a name="l01131"></a>01131 <a class="code" href="classhippodraw_1_1DisplayController.html#aa61093d6a75c6dd99758ddcf44cba7a0" title="Returns true only if all the data in a bound DataSource are valid.">DisplayController::</a> <a name="l01132"></a><a class="code" href="classhippodraw_1_1DisplayController.html#aa61093d6a75c6dd99758ddcf44cba7a0">01132</a> <a class="code" href="classhippodraw_1_1DisplayController.html#aa61093d6a75c6dd99758ddcf44cba7a0" title="Returns true only if all the data in a bound DataSource are valid.">isDataValid</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 )<span class="keyword"> const</span> <a name="l01133"></a>01133 <span class="keyword"></span>{ <a name="l01134"></a>01134 <span class="keywordtype">bool</span> valid = <span class="keyword">true</span>; <a name="l01135"></a>01135 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep = plotter -> getTarget (); <a name="l01136"></a>01136 <span class="keywordflow">if</span> ( rep != 0 ) { <a name="l01137"></a>01137 valid = <a class="code" href="classhippodraw_1_1DisplayController.html#aa61093d6a75c6dd99758ddcf44cba7a0" title="Returns true only if all the data in a bound DataSource are valid.">isDataValid</a> ( rep ); <a name="l01138"></a>01138 } <a name="l01139"></a>01139 <a name="l01140"></a>01140 <span class="keywordflow">return</span> valid; <a name="l01141"></a>01141 } <a name="l01142"></a>01142 <a name="l01143"></a>01143 <span class="keywordtype">bool</span> <a name="l01144"></a>01144 <a class="code" href="classhippodraw_1_1DisplayController.html#aa61093d6a75c6dd99758ddcf44cba7a0" title="Returns true only if all the data in a bound DataSource are valid.">DisplayController::</a> <a name="l01145"></a><a class="code" href="classhippodraw_1_1DisplayController.html#afa40764e9830f7579d667d4742aa30d1">01145</a> <a class="code" href="classhippodraw_1_1DisplayController.html#aa61093d6a75c6dd99758ddcf44cba7a0" title="Returns true only if all the data in a bound DataSource are valid.">isDataValid</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep )<span class="keyword"> const</span> <a name="l01146"></a>01146 <span class="keyword"></span>{ <a name="l01147"></a>01147 <span class="keywordtype">bool</span> valid = <span class="keyword">true</span>; <a name="l01148"></a>01148 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * base = rep -> <a class="code" href="classhippodraw_1_1DisplayController.html#a961e0f09af8140617d4c67a841f8b71d" title="Returns the currently selected projector in the plot.">getProjector</a> (); <a name="l01149"></a>01149 <span class="keyword">const</span> <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="l01150"></a>01150 = dynamic_cast < <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1NTupleProjector.html" title="An NTupleProjector is a projector that projects data from an DataSource object.">NTupleProjector</a> * > ( base ); <a name="l01151"></a>01151 <span class="keywordflow">if</span> ( projector != 0 ) { <a name="l01152"></a>01152 valid = projector -> <a class="code" href="classhippodraw_1_1DisplayController.html#aa61093d6a75c6dd99758ddcf44cba7a0" title="Returns true only if all the data in a bound DataSource are valid.">isDataValid</a> (); <a name="l01153"></a>01153 } <a name="l01154"></a>01154 <a name="l01155"></a>01155 <span class="keywordflow">return</span> valid; <a name="l01156"></a>01156 } <a name="l01157"></a>01157 <a name="l01158"></a>01158 <span class="keywordtype">bool</span> <a name="l01159"></a>01159 <a class="code" href="classhippodraw_1_1DisplayController.html#a6749b659850134a35d47b557fb4b70e0" title="Returns true if the designated axis is on a logarithmic scale.">DisplayController::</a> <a name="l01160"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a6749b659850134a35d47b557fb4b70e0">01160</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a6749b659850134a35d47b557fb4b70e0" title="Returns true if the designated axis is on a logarithmic scale.">getLog</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="l01161"></a>01161 <span class="keyword">const</span> std::string & axis)<span class="keyword"> const</span> <a name="l01162"></a>01162 <span class="keyword"></span>{ <a name="l01163"></a>01163 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">Axes::Type</a> at = <a class="code" href="namespacehippodraw_1_1Axes.html#ae2337bddf33bc8b17dd5c08e665422cd" title="Converts from string representation ot Axes::Type representation.">Axes::convert</a> ( axis ); <a name="l01164"></a>01164 <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1DisplayController.html#a6749b659850134a35d47b557fb4b70e0" title="Returns true if the designated axis is on a logarithmic scale.">getLog</a> ( plotter, at ); <a name="l01165"></a>01165 } <a name="l01166"></a>01166 <a name="l01168"></a>01168 <span class="keywordtype">bool</span> <a name="l01169"></a>01169 <a class="code" href="classhippodraw_1_1DisplayController.html#a6749b659850134a35d47b557fb4b70e0" title="Returns true if the designated axis is on a logarithmic scale.">DisplayController::</a> <a name="l01170"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a8520ad0caee03853c9f53799d38763db">01170</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a6749b659850134a35d47b557fb4b70e0" title="Returns true if the designated axis is on a logarithmic scale.">getLog</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 class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis )<span class="keyword"> const</span> <a name="l01171"></a>01171 <span class="keyword"></span>{ <a name="l01172"></a>01172 assert ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> || axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> || axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> ); <a name="l01173"></a>01173 <a name="l01174"></a>01174 <a class="code" href="classhippodraw_1_1XYTransform.html" title="A transform that transforms the X and Y coordinates independently.">XYTransform</a> * xy_transform <a name="l01175"></a>01175 = dynamic_cast < <a class="code" href="classhippodraw_1_1XYTransform.html" title="A transform that transforms the X and Y coordinates independently.">XYTransform</a> *> ( plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a6f6cfd143891cd8d5b814b11e350011a" title="Returns the transform object used by the plotter.">getTransform</a> () ); <a name="l01176"></a>01176 <a name="l01177"></a>01177 <span class="keywordflow">if</span> ( xy_transform == 0 ) <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l01178"></a>01178 <a name="l01179"></a>01179 <a class="code" href="classhippodraw_1_1TransformBase.html" title="A transform that transforms coordinates from one coordinate system to another.">TransformBase</a> * transform = 0; <a name="l01180"></a>01180 <a name="l01181"></a>01181 <span class="keywordflow">if</span> ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> ){ <a name="l01182"></a>01182 transform = xy_transform-><a class="code" href="classhippodraw_1_1XYTransform.html#acdcbf68e0c8fbc6c0ca8372967e0b796" title="Returns the transform function on the X axis.">xTransform</a> (); <a name="l01183"></a>01183 } <a name="l01184"></a>01184 <span class="keywordflow">if</span> ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> ){ <a name="l01185"></a>01185 transform = xy_transform-><a class="code" href="classhippodraw_1_1XYTransform.html#a5daaa2214ba1793a175878f22a262ea3" title="Returns the transform function on the Y axis.">yTransform</a>(); <a name="l01186"></a>01186 } <a name="l01187"></a>01187 <span class="keywordflow">if</span> ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> ){ <a name="l01188"></a>01188 transform = xy_transform-><a class="code" href="classhippodraw_1_1BinaryTransform.html#a9e91d3eb92a4a04abf58392e1b29b719" title="Returns the transform function on the Z axis.">zTransform</a>(); <a name="l01189"></a>01189 } <a name="l01190"></a>01190 <a name="l01191"></a>01191 assert ( transform ); <a name="l01192"></a>01192 <a name="l01193"></a>01193 <span class="keyword">const</span> <span class="keywordtype">string</span> & name = transform-><a class="code" href="classhippodraw_1_1TransformBase.html#a11c23a386abb9eb8a42f0c2c2835d640" title="Returns the name of the Transform.">name</a> (); <a name="l01194"></a>01194 <a name="l01195"></a>01195 <span class="keywordflow">return</span> name == <span class="stringliteral">"Log"</span>; <a name="l01196"></a>01196 } <a name="l01197"></a>01197 <span class="keywordtype">void</span> <a name="l01198"></a>01198 <a class="code" href="classhippodraw_1_1DisplayController.html#adfb0f33a2d4d9439666d85cd2ab10437" title="Sets the binner on the DataRep.">DisplayController::</a> <a name="l01199"></a><a class="code" href="classhippodraw_1_1DisplayController.html#adfb0f33a2d4d9439666d85cd2ab10437">01199</a> <a class="code" href="classhippodraw_1_1DisplayController.html#adfb0f33a2d4d9439666d85cd2ab10437" title="Sets the binner on the DataRep.">setBinner</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="l01200"></a>01200 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep, <a name="l01201"></a>01201 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis )<span class="keyword"> const</span> <a name="l01202"></a>01202 <span class="keyword"></span>{ <a name="l01203"></a>01203 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * projbase = datarep-><a class="code" href="classhippodraw_1_1DataRep.html#a37b55376f6e66874ac5a9ece07a0f57f" title="Returns the Projector object controlling the data.">getProjector</a> (); <a name="l01204"></a>01204 <a name="l01205"></a>01205 <a class="code" href="classhippodraw_1_1BinningProjector.html" title="The BinningProjector is an abstract class provides most of the functionality for...">BinningProjector</a> * projector <a name="l01206"></a>01206 = <span class="keyword">dynamic_cast<</span> <a class="code" href="classhippodraw_1_1BinningProjector.html" title="The BinningProjector is an abstract class provides most of the functionality for...">BinningProjector</a> * <span class="keyword">></span> ( projbase ); <a name="l01207"></a>01207 <span class="keywordflow">if</span> ( projector == 0 ) <span class="keywordflow">return</span>; <a name="l01208"></a>01208 <a name="l01209"></a>01209 <span class="keywordflow">if</span> ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> && <a name="l01210"></a>01210 projector-><a class="code" href="classhippodraw_1_1ProjectorBase.html#ac45e76c75c339e6dc783bc5eb62bc7b3" title="Returns true if specified axis is binned.">isAxisBinned</a> ( <span class="stringliteral">"Y"</span> ) == false ) <span class="keywordflow">return</span>; <a name="l01211"></a>01211 <a name="l01212"></a>01212 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> & range = plotter -> getRange ( axis, <span class="keyword">false</span> ); <a name="l01213"></a>01213 <a class="code" href="classhippodraw_1_1BinnerAxis.html" title="The base class for the BinnerAxis hierarchy.">BinnerAxis</a> * binner = 0; <a name="l01214"></a>01214 <a name="l01215"></a>01215 <a class="code" href="classhippodraw_1_1BinnerAxisFactory.html" title="A Factory singleton class for creating objects whose class derives from BinnerAxis...">BinnerAxisFactory</a> * binner_factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">BinnerAxisFactory::instance</a> (); <a name="l01216"></a>01216 <a class="code" href="classhippodraw_1_1AxisModelBase.html" title="The AxisModelBase class maintains the Range and scaling of an axis.">AxisModelBase</a> * model = plotter -> getAxisModel ( axis ); <a name="l01217"></a>01217 <a name="l01218"></a>01218 <span class="keywordflow">if</span> ( model-><a class="code" href="classhippodraw_1_1AxisModelBase.html#a4d864ee8e8581e14a866141d6d47976d" title="Returns a boolean describing the type of the scale of the axis.">isLog</a>() ) { <a name="l01219"></a>01219 binner = binner_factory -> create ( <span class="stringliteral">"BinnerLog"</span> ); <a name="l01220"></a>01220 } <span class="keywordflow">else</span> { <span class="comment">// not Log</span> <a name="l01221"></a>01221 binner = binner_factory -> create ( <span class="stringliteral">"BinnerLinear"</span> ); <a name="l01222"></a>01222 } <a name="l01223"></a>01223 <a name="l01224"></a>01224 binner-><a class="code" href="classhippodraw_1_1BinnerAxis.html#a02738ddbbfc62d6c6e1af91deee3cb5d" title="Sets the range.">setRange</a> ( range, <span class="keyword">false</span> ); <a name="l01225"></a>01225 projector-><a class="code" href="classhippodraw_1_1BinningProjector.html#aeaf988cd2b16fa9e09b0d08562e54ac0" title="Sets the bin edge calculator to binner on axis axis.">setBinnerOn</a> ( binner, axis ); <a name="l01226"></a>01226 } <a name="l01227"></a>01227 <a name="l01231"></a>01231 <span class="keywordtype">void</span> <a name="l01232"></a>01232 <a class="code" href="classhippodraw_1_1DisplayController.html#adfb0f33a2d4d9439666d85cd2ab10437" title="Sets the binner on the DataRep.">DisplayController::</a> <a name="l01233"></a><a class="code" href="classhippodraw_1_1DisplayController.html#adb9314eefc70fb61f0bcf3f2bf7a2e24">01233</a> <a class="code" href="classhippodraw_1_1DisplayController.html#adfb0f33a2d4d9439666d85cd2ab10437" title="Sets the binner on the DataRep.">setBinner</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01234"></a>01234 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis ) <a name="l01235"></a>01235 { <a name="l01236"></a>01236 <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="l01237"></a>01237 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = 0; i < number; i++ ) { <a name="l01238"></a>01238 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep = 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="l01239"></a>01239 <a class="code" href="classhippodraw_1_1DisplayController.html#adfb0f33a2d4d9439666d85cd2ab10437" title="Sets the binner on the DataRep.">setBinner</a> ( plotter, datarep, axis ); <a name="l01240"></a>01240 } <a name="l01241"></a>01241 <a name="l01242"></a>01242 } <a name="l01243"></a>01243 <a name="l01244"></a>01244 <span class="keywordtype">void</span> <a name="l01245"></a>01245 <a class="code" href="classhippodraw_1_1DisplayController.html#a044da51a2beccb0d92cd4c5754db5335" title="Sets the axis model to type.">DisplayController::</a> <a name="l01246"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a044da51a2beccb0d92cd4c5754db5335">01246</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a044da51a2beccb0d92cd4c5754db5335" title="Sets the axis model to type.">setAxisModel</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01247"></a>01247 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <a name="l01248"></a>01248 <span class="keyword">const</span> std::string & <a class="code" href="namespacenum__util.html#af7e893a8c6a5f6a426480fc85cda4fa1">type</a> ) <a name="l01249"></a>01249 { <a name="l01250"></a>01250 <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="l01251"></a>01251 <a name="l01252"></a>01252 <span class="keywordflow">if</span> ( model != 0 ) { <a name="l01253"></a>01253 <a class="code" href="classhippodraw_1_1AxisModelBase.html" title="The AxisModelBase class maintains the Range and scaling of an axis.">AxisModelBase</a> * temp = 0; <a name="l01254"></a>01254 <a name="l01255"></a>01255 <span class="keywordflow">if</span> ( type == <span class="stringliteral">"Linear"</span> ) { <a name="l01256"></a>01256 <a name="l01257"></a>01257 <span class="keywordflow">if</span> ( !( model-><a class="code" href="classhippodraw_1_1AxisModelBase.html#a4d864ee8e8581e14a866141d6d47976d" title="Returns a boolean describing the type of the scale of the axis.">isLog</a>() ) ) <span class="keywordflow">return</span>; <span class="comment">// no change needed</span> <a name="l01258"></a>01258 temp = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1AxisModelLinear.html" title="Given a range, calculates a model for an axis with a linear scale.">AxisModelLinear</a> ( *model ); <a name="l01259"></a>01259 <a name="l01260"></a>01260 } <a name="l01261"></a>01261 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( type == <span class="stringliteral">"Log"</span> ) { <a name="l01262"></a>01262 <a name="l01263"></a>01263 <span class="keywordflow">if</span> ( model-><a class="code" href="classhippodraw_1_1AxisModelBase.html#a4d864ee8e8581e14a866141d6d47976d" title="Returns a boolean describing the type of the scale of the axis.">isLog</a> () ) <span class="keywordflow">return</span>; <span class="comment">// no change needed</span> <a name="l01264"></a>01264 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> & range = plotter -> getRange ( axis, <span class="keyword">false</span> ); <a name="l01265"></a>01265 <span class="keywordflow">if</span> ( range.<a class="code" href="classhippodraw_1_1Range.html#a10f7231db7f0fe0855fc344e98575714" title="Returns the maximum of the range object.">high</a>() < 0. ) { <a name="l01266"></a>01266 <span class="keywordtype">string</span> what ( <span class="stringliteral">"Can not change axis to log scale since current "</span> <a name="l01267"></a>01267 <span class="stringliteral">"range is negative"</span> ); <a name="l01268"></a>01268 <span class="keywordflow">throw</span> std::runtime_error ( what ); <a name="l01269"></a>01269 } <a name="l01270"></a>01270 <a name="l01271"></a>01271 <span class="keywordtype">double</span> pos = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a8d76a4540cacd4ae9faad779555b43f1" title="Returns the smallest positive number from the data.">getPosRange</a> ( axis ); <a name="l01272"></a>01272 model-><a class="code" href="classhippodraw_1_1AxisModelBase.html#a325c76e616aa02b4fe13d27e7333d33c" title="The function which changes the pos member of m_range.">setRangePos</a> ( pos ); <a name="l01273"></a>01273 temp = <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> ( *model ); <a name="l01274"></a>01274 <a name="l01275"></a>01275 } <a name="l01276"></a>01276 <a name="l01277"></a>01277 assert ( temp ); <a name="l01278"></a>01278 <a name="l01279"></a>01279 swap ( temp, model ); <a name="l01280"></a>01280 <a name="l01281"></a>01281 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a9f2854a2e173ad7296f233845dbce099" title="Sets the AxisModel on the specified axis.">setAxisModel</a> ( model, axis ); <a name="l01282"></a>01282 <a name="l01283"></a>01283 <a class="code" href="classhippodraw_1_1DisplayController.html#adfb0f33a2d4d9439666d85cd2ab10437" title="Sets the binner on the DataRep.">setBinner</a> ( plotter, axis ); <a name="l01284"></a>01284 <a name="l01285"></a>01285 <span class="comment">// Do not delete until the end so project can use it.</span> <a name="l01286"></a>01286 <span class="keyword">delete</span> temp; <a name="l01287"></a>01287 } <a name="l01288"></a>01288 } <a name="l01289"></a>01289 <a name="l01290"></a>01290 <span class="keywordtype">void</span> <a name="l01291"></a>01291 <a class="code" href="classhippodraw_1_1DisplayController.html#a6eee66773c140b3ea98700e576d20e27" title="Sets a log scale on or off for the specified axis for the plotter.">DisplayController::</a> <a name="l01292"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a6eee66773c140b3ea98700e576d20e27">01292</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a6eee66773c140b3ea98700e576d20e27" title="Sets a log scale on or off for the specified axis for the plotter.">setLog</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01293"></a>01293 <span class="keyword">const</span> std::string & axis, <a name="l01294"></a>01294 <span class="keywordtype">bool</span> flag ) <a name="l01295"></a>01295 { <a name="l01296"></a>01296 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">Axes::Type</a> at = <a class="code" href="namespacehippodraw_1_1Axes.html#ae2337bddf33bc8b17dd5c08e665422cd" title="Converts from string representation ot Axes::Type representation.">Axes::convert</a> ( axis ); <a name="l01297"></a>01297 <a class="code" href="classhippodraw_1_1DisplayController.html#a6eee66773c140b3ea98700e576d20e27" title="Sets a log scale on or off for the specified axis for the plotter.">setLog</a> ( plotter, at, flag ); <a name="l01298"></a>01298 } <a name="l01299"></a>01299 <a name="l01301"></a>01301 <span class="keywordtype">void</span> <a name="l01302"></a>01302 <a class="code" href="classhippodraw_1_1DisplayController.html#a6eee66773c140b3ea98700e576d20e27" title="Sets a log scale on or off for the specified axis for the plotter.">DisplayController::</a> <a name="l01303"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a9276a4f4d5b5f3f42970c6bc100df241">01303</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a6eee66773c140b3ea98700e576d20e27" title="Sets a log scale on or off for the specified axis for the plotter.">setLog</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01304"></a>01304 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <a name="l01305"></a>01305 <span class="keywordtype">bool</span> flag ) <a name="l01306"></a>01306 { <a name="l01307"></a>01307 assert ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> || axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> || axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> ); <a name="l01308"></a>01308 <a name="l01309"></a>01309 <a class="code" href="classhippodraw_1_1TransformBase.html" title="A transform that transforms coordinates from one coordinate system to another.">TransformBase</a> * current = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a6f6cfd143891cd8d5b814b11e350011a" title="Returns the transform object used by the plotter.">getTransform</a> (); <a name="l01310"></a>01310 <a name="l01311"></a>01311 <a class="code" href="classhippodraw_1_1XYTransform.html" title="A transform that transforms the X and Y coordinates independently.">XYTransform</a> * xy_transform = dynamic_cast < <a class="code" href="classhippodraw_1_1XYTransform.html" title="A transform that transforms the X and Y coordinates independently.">XYTransform</a> *> ( current ); <a name="l01312"></a>01312 <a name="l01313"></a>01313 <span class="keywordflow">if</span> ( xy_transform != 0 ) { <a name="l01314"></a>01314 <a class="code" href="classhippodraw_1_1DisplayController.html#a6eee66773c140b3ea98700e576d20e27" title="Sets a log scale on or off for the specified axis for the plotter.">setLog</a> ( plotter, axis, flag, xy_transform ); <a name="l01315"></a>01315 <span class="keywordflow">return</span>; <a name="l01316"></a>01316 } <a name="l01317"></a>01317 assert ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> ); <a name="l01318"></a>01318 <a class="code" href="classhippodraw_1_1BinaryTransform.html" title="A transform that transforms coordinates from one 2D coordinate system to another...">BinaryTransform</a> * b_transform <a name="l01319"></a>01319 = dynamic_cast < <a class="code" href="classhippodraw_1_1BinaryTransform.html" title="A transform that transforms coordinates from one 2D coordinate system to another...">BinaryTransform</a> * > ( current ); <a name="l01320"></a>01320 <span class="keywordtype">string</span> <a class="code" href="namespacenum__util.html#af7e893a8c6a5f6a426480fc85cda4fa1">type</a>; <a name="l01321"></a>01321 <span class="keywordflow">if</span> ( flag ) type = <span class="stringliteral">"Log"</span>; <a name="l01322"></a>01322 <span class="keywordflow">else</span> type = <span class="stringliteral">"Linear"</span>; <a name="l01323"></a>01323 <a name="l01324"></a>01324 <a class="code" href="classhippodraw_1_1DisplayController.html#a044da51a2beccb0d92cd4c5754db5335" title="Sets the axis model to type.">setAxisModel</a> ( plotter, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> , type ); <a name="l01325"></a>01325 <a name="l01326"></a>01326 <a class="code" href="classhippodraw_1_1TransformFactory.html" title="The singleton Factory class for creating objects whose class is derived from TransformBase...">TransformFactory</a> * factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">TransformFactory::instance</a> (); <a name="l01327"></a>01327 <a class="code" href="classhippodraw_1_1TransformBase.html" title="A transform that transforms coordinates from one coordinate system to another.">TransformBase</a> * transform = factory -> createTransform ( type ); <a name="l01328"></a>01328 <a name="l01329"></a>01329 b_transform -> setZTransform ( transform ); <a name="l01330"></a>01330 plotter -> <a class="code" href="classhippodraw_1_1DisplayController.html#a68df0e6834bec3a92a23862c6801f1a0" title="Creates and sets a new transform for the display.">setTransform</a> ( b_transform ); <a name="l01331"></a>01331 } <a name="l01332"></a>01332 <a name="l01333"></a>01333 <span class="keywordtype">void</span> <a name="l01334"></a>01334 <a class="code" href="classhippodraw_1_1DisplayController.html#a6eee66773c140b3ea98700e576d20e27" title="Sets a log scale on or off for the specified axis for the plotter.">DisplayController::</a> <a name="l01335"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a166b437074c9142a2aac2bbd7ea3364a">01335</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a6eee66773c140b3ea98700e576d20e27" title="Sets a log scale on or off for the specified axis for the plotter.">setLog</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01336"></a>01336 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <a name="l01337"></a>01337 <span class="keywordtype">bool</span> flag, <a name="l01338"></a>01338 <a class="code" href="classhippodraw_1_1XYTransform.html" title="A transform that transforms the X and Y coordinates independently.">XYTransform</a> * xy_transform ) <a name="l01339"></a>01339 { <a name="l01340"></a>01340 <a class="code" href="classhippodraw_1_1TransformBase.html" title="A transform that transforms coordinates from one coordinate system to another.">TransformBase</a> * transform = xy_transform-><a class="code" href="classhippodraw_1_1XYTransform.html#acdcbf68e0c8fbc6c0ca8372967e0b796" title="Returns the transform function on the X axis.">xTransform</a> (); <a name="l01341"></a>01341 <a name="l01342"></a>01342 <span class="keywordtype">string</span> x_trans = transform-><a class="code" href="classhippodraw_1_1TransformBase.html#a11c23a386abb9eb8a42f0c2c2835d640" title="Returns the name of the Transform.">name</a> (); <a name="l01343"></a>01343 transform = xy_transform-><a class="code" href="classhippodraw_1_1XYTransform.html#a5daaa2214ba1793a175878f22a262ea3" title="Returns the transform function on the Y axis.">yTransform</a> (); <a name="l01344"></a>01344 <span class="keywordtype">string</span> y_trans = transform-><a class="code" href="classhippodraw_1_1TransformBase.html#a11c23a386abb9eb8a42f0c2c2835d640" title="Returns the name of the Transform.">name</a> (); <a name="l01345"></a>01345 transform = xy_transform-><a class="code" href="classhippodraw_1_1BinaryTransform.html#a9e91d3eb92a4a04abf58392e1b29b719" title="Returns the transform function on the Z axis.">zTransform</a> (); <a name="l01346"></a>01346 <span class="keywordtype">string</span> z_trans = transform-><a class="code" href="classhippodraw_1_1TransformBase.html#a11c23a386abb9eb8a42f0c2c2835d640" title="Returns the name of the Transform.">name</a> (); <a name="l01347"></a>01347 <a name="l01348"></a>01348 <span class="keywordflow">if</span>( flag ){ <span class="comment">//if the axis is to be made logarithmic</span> <a name="l01349"></a>01349 <span class="keywordflow">if</span>( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> ){ <a name="l01350"></a>01350 x_trans = <span class="stringliteral">"Log"</span>; <a name="l01351"></a>01351 <a class="code" href="classhippodraw_1_1DisplayController.html#a044da51a2beccb0d92cd4c5754db5335" title="Sets the axis model to type.">setAxisModel</a> ( plotter, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a>, x_trans ); <a name="l01352"></a>01352 } <a name="l01353"></a>01353 <span class="keywordflow">if</span>( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> ){ <a name="l01354"></a>01354 y_trans = <span class="stringliteral">"Log"</span>; <a name="l01355"></a>01355 <a class="code" href="classhippodraw_1_1DisplayController.html#a044da51a2beccb0d92cd4c5754db5335" title="Sets the axis model to type.">setAxisModel</a> ( plotter, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a>, y_trans ); <a name="l01356"></a>01356 } <a name="l01357"></a>01357 <span class="keywordflow">if</span>( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> ){ <a name="l01358"></a>01358 z_trans = <span class="stringliteral">"Log"</span>; <a name="l01359"></a>01359 <a class="code" href="classhippodraw_1_1DisplayController.html#a044da51a2beccb0d92cd4c5754db5335" title="Sets the axis model to type.">setAxisModel</a> ( plotter, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a>, z_trans ); <a name="l01360"></a>01360 } <a name="l01361"></a>01361 } <a name="l01362"></a>01362 <a name="l01363"></a>01363 <span class="keywordflow">if</span>( !flag ){ <a name="l01364"></a>01364 <span class="keywordflow">if</span>( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> ) { <a name="l01365"></a>01365 x_trans = <span class="stringliteral">"Linear"</span>; <a name="l01366"></a>01366 <a class="code" href="classhippodraw_1_1DisplayController.html#a044da51a2beccb0d92cd4c5754db5335" title="Sets the axis model to type.">setAxisModel</a> ( plotter, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a>, x_trans ); <a name="l01367"></a>01367 } <a name="l01368"></a>01368 <span class="keywordflow">if</span>( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> ) { <a name="l01369"></a>01369 y_trans = <span class="stringliteral">"Linear"</span>; <a name="l01370"></a>01370 <a class="code" href="classhippodraw_1_1DisplayController.html#a044da51a2beccb0d92cd4c5754db5335" title="Sets the axis model to type.">setAxisModel</a> ( plotter, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> , y_trans ); <a name="l01371"></a>01371 } <a name="l01372"></a>01372 <span class="keywordflow">if</span>( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> ) { <a name="l01373"></a>01373 z_trans = <span class="stringliteral">"Linear"</span>; <a name="l01374"></a>01374 <a class="code" href="classhippodraw_1_1DisplayController.html#a044da51a2beccb0d92cd4c5754db5335" title="Sets the axis model to type.">setAxisModel</a> ( plotter, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> , z_trans ); <a name="l01375"></a>01375 } <a name="l01376"></a>01376 } <a name="l01377"></a>01377 <a name="l01378"></a>01378 <a class="code" href="classhippodraw_1_1TransformFactory.html" title="The singleton Factory class for creating objects whose class is derived from TransformBase...">TransformFactory</a> * factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">TransformFactory::instance</a> (); <a name="l01379"></a>01379 <a name="l01380"></a>01380 <span class="comment">// The following verbosness for VC++ in debug mode.</span> <a name="l01381"></a>01381 <span class="keywordtype">string</span> t_name = x_trans; <a name="l01382"></a>01382 t_name += <span class="stringliteral">" "</span>; <a name="l01383"></a>01383 t_name += y_trans; <a name="l01384"></a>01384 t_name += <span class="stringliteral">" "</span>; <a name="l01385"></a>01385 t_name += z_trans; <a name="l01386"></a>01386 transform = factory-><a class="code" href="classhippodraw_1_1TransformFactory.html#acab9b7d2bd801f34c30f1e02695b464a" title="Creates a returns a new TransformBase object with given name.">createTransform</a> ( t_name ); <a name="l01387"></a>01387 <a name="l01388"></a>01388 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a78b74f631dc0bb20ca4cc13a38530046" title="Sets the transform object.">setTransform</a> ( transform ); <a name="l01389"></a>01389 <span class="keyword">delete</span> transform; <span class="comment">// The plotter made a copy and deleted the old one.</span> <a name="l01390"></a>01390 } <a name="l01391"></a>01391 <a name="l01392"></a>01392 <a name="l01393"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a68df0e6834bec3a92a23862c6801f1a0">01393</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1DisplayController.html#a68df0e6834bec3a92a23862c6801f1a0" title="Creates and sets a new transform for the display.">DisplayController::setTransform</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01394"></a>01394 <span class="keyword">const</span> std::string & name ) <a name="l01395"></a>01395 { <a name="l01396"></a>01396 <a class="code" href="classhippodraw_1_1TransformFactory.html" title="The singleton Factory class for creating objects whose class is derived from TransformBase...">TransformFactory</a> * factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">TransformFactory::instance</a> (); <a name="l01397"></a>01397 <a class="code" href="classhippodraw_1_1TransformBase.html" title="A transform that transforms coordinates from one coordinate system to another.">TransformBase</a> * transform = factory-><a class="code" href="classhippodraw_1_1TransformFactory.html#acab9b7d2bd801f34c30f1e02695b464a" title="Creates a returns a new TransformBase object with given name.">createTransform</a> ( name ); <a name="l01398"></a>01398 <a name="l01399"></a>01399 <span class="keywordflow">try</span> { <a name="l01400"></a>01400 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a78b74f631dc0bb20ca4cc13a38530046" title="Sets the transform object.">setTransform</a> ( transform ); <a name="l01401"></a>01401 <span class="keyword">delete</span> transform; <span class="comment">// The plotter made a copy.</span> <a name="l01402"></a>01402 } <span class="keywordflow">catch</span> (<a class="code" href="classhippodraw_1_1PlotterException.html" title="An exception class that is thrown when attempting an illegal operation on a PlotterBase...">PlotterException</a> & eObj) { <a name="l01403"></a>01403 <span class="keyword">delete</span> transform; <span class="comment">// not used or needed</span> <a name="l01404"></a>01404 <span class="keywordflow">throw</span> eObj; <a name="l01405"></a>01405 } <a name="l01406"></a>01406 } <a name="l01407"></a>01407 <a name="l01408"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a747deba63e7cfadb032ac7b941cf1d56">01408</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1DisplayController.html#a68df0e6834bec3a92a23862c6801f1a0" title="Creates and sets a new transform for the display.">DisplayController::setTransform</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01409"></a>01409 <span class="keyword">const</span> std::string & x, <a name="l01410"></a>01410 <span class="keyword">const</span> std::string & y ) <a name="l01411"></a>01411 { <a name="l01412"></a>01412 <a class="code" href="classhippodraw_1_1TransformFactory.html" title="The singleton Factory class for creating objects whose class is derived from TransformBase...">TransformFactory</a> * factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">TransformFactory::instance</a> (); <a name="l01413"></a>01413 <span class="keyword">const</span> <span class="keywordtype">string</span> name = x + <span class="stringliteral">" "</span> + y; <a name="l01414"></a>01414 <a class="code" href="classhippodraw_1_1TransformBase.html" title="A transform that transforms coordinates from one coordinate system to another.">TransformBase</a> * transform = factory-><a class="code" href="classhippodraw_1_1TransformFactory.html#acab9b7d2bd801f34c30f1e02695b464a" title="Creates a returns a new TransformBase object with given name.">createTransform</a> ( name ); <a name="l01415"></a>01415 <a name="l01416"></a>01416 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a78b74f631dc0bb20ca4cc13a38530046" title="Sets the transform object.">setTransform</a> ( transform ); <a name="l01417"></a>01417 <a name="l01418"></a>01418 <span class="keyword">delete</span> transform; <span class="comment">// The plotter made a copy.</span> <a name="l01419"></a>01419 } <a name="l01420"></a>01420 <a name="l01421"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a90c43c6bcad8ef280bbefffa02a42d68">01421</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1DisplayController.html#a90c43c6bcad8ef280bbefffa02a42d68" title="Deletes a PlotterBase object.">DisplayController:: remove</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter ) <a name="l01422"></a>01422 { <a name="l01423"></a>01423 <span class="keyword">delete</span> plotter; <a name="l01424"></a>01424 } <a name="l01425"></a>01425 <a name="l01426"></a><a class="code" href="classhippodraw_1_1DisplayController.html#ad2425409879366ae6ebf841f6954d946">01426</a> <span class="keywordtype">float</span> <a class="code" href="classhippodraw_1_1DisplayController.html#ad2425409879366ae6ebf841f6954d946" title="Returns the size of the representation.">DisplayController::pointSize</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 )<span class="keyword"> const</span> <a name="l01427"></a>01427 <span class="keyword"></span>{ <a name="l01428"></a>01428 <a class="code" href="classhippodraw_1_1RepBase.html" title="The base class for the point representation hierarchy.">RepBase</a> * rep = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a68568fbcd108de55f1376375a02530a7" title="Returns the representation used by the plotter.">representation</a> (); <a name="l01429"></a>01429 <a name="l01430"></a>01430 <span class="keywordflow">return</span> rep-><a class="code" href="classhippodraw_1_1RepBase.html#ae039d328384bad1eacf85c8fc593939d" title="Returns the size of the representation.">size</a> (); <a name="l01431"></a>01431 } <a name="l01432"></a>01432 <a name="l01433"></a>01433 <span class="keywordtype">bool</span> <a name="l01434"></a>01434 <a class="code" href="classhippodraw_1_1DisplayController.html#a07b14daf7208058c933a4bb0748d99e9" title="Returns true if active DataRep uses SymbolPointRep, otherwise returns false.">DisplayController::</a> <a name="l01435"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a07b14daf7208058c933a4bb0748d99e9">01435</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a07b14daf7208058c933a4bb0748d99e9" title="Returns true if active DataRep uses SymbolPointRep, otherwise returns false.">hasSymbolRep</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 )<span class="keyword"> const</span> <a name="l01436"></a>01436 <span class="keyword"></span>{ <a name="l01437"></a>01437 <a class="code" href="classhippodraw_1_1RepBase.html" title="The base class for the point representation hierarchy.">RepBase</a> * rep = plotter -> representation (); <a name="l01438"></a>01438 <a class="code" href="classhippodraw_1_1SymbolPointRep.html" title="A PointRep class draws a symbol to represent the value.">SymbolPointRep</a> * symrep = dynamic_cast < <a class="code" href="classhippodraw_1_1SymbolPointRep.html" title="A PointRep class draws a symbol to represent the value.">SymbolPointRep</a> * > ( rep ); <a name="l01439"></a>01439 <a name="l01440"></a>01440 <span class="keywordflow">return</span> symrep != 0; <a name="l01441"></a>01441 } <a name="l01442"></a>01442 <a name="l01443"></a>01443 <span class="keywordtype">bool</span> <a name="l01444"></a>01444 <a class="code" href="classhippodraw_1_1DisplayController.html#acd81192fd44bc390357382e44844ccbb" title="Returns true if active DataRep uses LinePointRep, otherwise returns false.">DisplayController::</a> <a name="l01445"></a><a class="code" href="classhippodraw_1_1DisplayController.html#acd81192fd44bc390357382e44844ccbb">01445</a> <a class="code" href="classhippodraw_1_1DisplayController.html#acd81192fd44bc390357382e44844ccbb" title="Returns true if active DataRep uses LinePointRep, otherwise returns false.">hasLineRep</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 )<span class="keyword"> const</span> <a name="l01446"></a>01446 <span class="keyword"></span>{ <a name="l01447"></a>01447 <span class="keywordtype">bool</span> yes = <span class="keyword">false</span>; <a name="l01448"></a>01448 <a name="l01449"></a>01449 <a class="code" href="classhippodraw_1_1RepBase.html" title="The base class for the point representation hierarchy.">RepBase</a> * rep = plotter -> representation (); <a name="l01450"></a>01450 <a class="code" href="classhippodraw_1_1ColumnPointRep.html" title="A PointRep class that draws a column to represent the value.">ColumnPointRep</a> * colrep = dynamic_cast < <a class="code" href="classhippodraw_1_1ColumnPointRep.html" title="A PointRep class that draws a column to represent the value.">ColumnPointRep</a> * > ( rep ); <a name="l01451"></a>01451 <a name="l01452"></a>01452 <span class="keywordflow">if</span> ( colrep != 0 ) { <a name="l01453"></a>01453 yes = <span class="keyword">true</span>; <a name="l01454"></a>01454 } <a name="l01455"></a>01455 <span class="keywordflow">else</span> { <a name="l01456"></a>01456 <a class="code" href="classhippodraw_1_1LinePointRep.html" title="A PointRep class that draws a column to represent the value.">LinePointRep</a> * linerep = dynamic_cast < <a class="code" href="classhippodraw_1_1LinePointRep.html" title="A PointRep class that draws a column to represent the value.">LinePointRep</a> * > ( rep ); <a name="l01457"></a>01457 yes = linerep != 0; <a name="l01458"></a>01458 } <a name="l01459"></a>01459 <a name="l01460"></a>01460 <span class="keywordflow">return</span> yes; <a name="l01461"></a>01461 } <a name="l01462"></a>01462 <a name="l01463"></a>01463 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a name="l01464"></a>01464 <a class="code" href="classhippodraw_1_1DisplayController.html#a40dbcedc99038df84906ee3f16b94b67" title="Returns the style of the point representation.">DisplayController::</a> <a name="l01465"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a40dbcedc99038df84906ee3f16b94b67">01465</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a40dbcedc99038df84906ee3f16b94b67" title="Returns the style of the point representation.">getRepStyle</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 )<span class="keyword"> const</span> <a name="l01466"></a>01466 <span class="keyword"></span>{ <a name="l01467"></a>01467 <a class="code" href="classhippodraw_1_1RepBase.html" title="The base class for the point representation hierarchy.">RepBase</a> * rep = plotter -> representation (); <a name="l01468"></a>01468 <a name="l01469"></a>01469 <span class="keywordflow">return</span> rep -> getStyle (); <a name="l01470"></a>01470 } <a name="l01471"></a>01471 <a name="l01472"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a7effabb18b5fd11a3706a5d676a4c2fe">01472</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1DisplayController.html#a7effabb18b5fd11a3706a5d676a4c2fe" title="Sets the size of the representation.">DisplayController::setRepSize</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <span class="keywordtype">float</span> <a class="code" href="namespacenum__util.html#a137f48a49d12a7dae8ba7c86db2a0c01">size</a> ) <a name="l01473"></a>01473 { <a name="l01474"></a>01474 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a666709c994dc9582b8127aefa106fe48" title="Returns the selected DataRep.">selectedDataRep</a> (); <a name="l01475"></a>01475 <a name="l01476"></a>01476 datarep-><a class="code" href="classhippodraw_1_1DataRep.html#aed34adba2066017f9abfe93753995759" title="Sets the size of the representation.">setRepSize</a> ( size ); <a name="l01477"></a>01477 } <a name="l01478"></a>01478 <a name="l01479"></a>01479 <span class="keywordtype">void</span> <a name="l01480"></a>01480 <a class="code" href="classhippodraw_1_1DisplayController.html#a71e7958f0e24501eec3993572b007b51" title="Sets the type of RepBase object to be used by the selected DataRep.">DisplayController::</a> <a name="l01481"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a71e7958f0e24501eec3993572b007b51">01481</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a71e7958f0e24501eec3993572b007b51" title="Sets the type of RepBase object to be used by the selected DataRep.">setPointRep</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <span class="keyword">const</span> std::string & point_rep ) <a name="l01482"></a>01482 { <a name="l01483"></a>01483 <span class="keywordtype">int</span> index = <a class="code" href="classhippodraw_1_1DisplayController.html#a6fe40c65a134431836bb07d74d3525b1" title="Returns the active DataRep index for the DataRep objects contained in the plotter...">activeDataRepIndex</a> ( plotter ); <a name="l01484"></a>01484 <span class="keywordflow">if</span> ( index >= 0 ) { <a name="l01485"></a>01485 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep = plotter -> getDataRep ( index ); <a name="l01486"></a>01486 assert ( datarep ); <a name="l01487"></a>01487 <a class="code" href="classhippodraw_1_1PointRepFactory.html" title="A factory for creation of objects whose class is derived from PointRepBase.">PointRepFactory</a> * factory = <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">PointRepFactory::instance</a> (); <a name="l01488"></a>01488 <a class="code" href="classhippodraw_1_1RepBase.html" title="The base class for the point representation hierarchy.">RepBase</a> * rep = factory -> create ( point_rep ); <a name="l01489"></a>01489 datarep -> <a class="code" href="classhippodraw_1_1DisplayController.html#a71e7958f0e24501eec3993572b007b51" title="Sets the type of RepBase object to be used by the selected DataRep.">setPointRep</a> ( rep ); <a name="l01490"></a>01490 } <a name="l01491"></a>01491 } <a name="l01492"></a>01492 <a name="l01493"></a>01493 <span class="keywordtype">void</span> <a name="l01494"></a>01494 <a class="code" href="classhippodraw_1_1DisplayController.html#ac9e2ea4064363aa382598764642c7d3a" title="Sets the Range on specified axis.">DisplayController::</a> <a name="l01495"></a><a class="code" href="classhippodraw_1_1DisplayController.html#ac9e2ea4064363aa382598764642c7d3a">01495</a> <a class="code" href="classhippodraw_1_1DisplayController.html#ac9e2ea4064363aa382598764642c7d3a" title="Sets the Range on specified axis.">setRange</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01496"></a>01496 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <a name="l01497"></a>01497 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> & range ) <a name="l01498"></a>01498 { <a name="l01499"></a>01499 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a189d730969d2a516bcebcce4d21514b4" title="Sets the range on the specified axis.">setRange</a> ( axis, range ); <a name="l01500"></a>01500 <a name="l01501"></a>01501 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a352144bce77f0f9cadfb18097f50898c" title="Sets the auto-ranging.">setAutoRanging</a> ( axis, <span class="keyword">false</span> ); <a name="l01502"></a>01502 } <a name="l01503"></a>01503 <a name="l01504"></a>01504 <span class="keywordtype">void</span> <a name="l01505"></a>01505 <a class="code" href="classhippodraw_1_1DisplayController.html#adb5f70ebc08b93f22daf3d8d5aedc35c" title="Sets the bin width parameter.">DisplayController::</a> <a name="l01506"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a31a0f596e80d1646c7f97820f4764e17">01506</a> <a class="code" href="classhippodraw_1_1DisplayController.html#adb5f70ebc08b93f22daf3d8d5aedc35c" title="Sets the bin width parameter.">setBinWidth</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01507"></a>01507 <span class="keyword">const</span> std::string & axis, <a name="l01508"></a>01508 <span class="keywordtype">double</span> width ) <a name="l01509"></a>01509 { <a name="l01510"></a>01510 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">Axes::Type</a> at = <a class="code" href="namespacehippodraw_1_1Axes.html#ae2337bddf33bc8b17dd5c08e665422cd" title="Converts from string representation ot Axes::Type representation.">Axes::convert</a> ( axis ); <a name="l01511"></a>01511 <a name="l01512"></a>01512 <a class="code" href="classhippodraw_1_1DisplayController.html#adb5f70ebc08b93f22daf3d8d5aedc35c" title="Sets the bin width parameter.">setBinWidth</a> ( plotter, at, width ); <a name="l01513"></a>01513 } <a name="l01514"></a>01514 <a name="l01515"></a>01515 <span class="keywordtype">void</span> <a name="l01516"></a>01516 <a class="code" href="classhippodraw_1_1DisplayController.html#adb5f70ebc08b93f22daf3d8d5aedc35c" title="Sets the bin width parameter.">DisplayController::</a> <a name="l01517"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a8432df0bd7143540be33f6a8f8697c6f">01517</a> <a class="code" href="classhippodraw_1_1DisplayController.html#adb5f70ebc08b93f22daf3d8d5aedc35c" title="Sets the bin width parameter.">setBinWidth</a> ( <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep, <a name="l01518"></a>01518 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <a name="l01519"></a>01519 <span class="keywordtype">double</span> width ) <a name="l01520"></a>01520 { <a name="l01521"></a>01521 <span class="keyword">const</span> list < Observer * > & obs_list = datarep -> getObservers (); <a name="l01522"></a>01522 list < Observer * >::const_iterator first = obs_list.begin(); <a name="l01523"></a>01523 <span class="keywordflow">while</span> ( first != obs_list.end () ) { <a name="l01524"></a>01524 <a class="code" href="classhippodraw_1_1Observer.html" title="Part of an implementation of the Observable Observer pattern based on the example...">Observer</a> * obs = *first++; <a name="l01525"></a>01525 <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter = dynamic_cast < <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * > ( obs ); <a name="l01526"></a>01526 <span class="keywordflow">if</span> ( plotter != 0 ) { <a name="l01527"></a>01527 plotter -> autoScale (); <a name="l01528"></a>01528 datarep -> <a class="code" href="classhippodraw_1_1DisplayController.html#adb5f70ebc08b93f22daf3d8d5aedc35c" title="Sets the bin width parameter.">setBinWidth</a> ( axis, width ); <a name="l01529"></a>01529 plotter -> setAutoRanging ( axis, <span class="keyword">false</span> ); <a name="l01530"></a>01530 <span class="keywordflow">break</span>; <a name="l01531"></a>01531 } <a name="l01532"></a>01532 } <a name="l01533"></a>01533 } <a name="l01534"></a>01534 <a name="l01535"></a>01535 <span class="keywordtype">void</span> <a name="l01536"></a>01536 <a class="code" href="classhippodraw_1_1DisplayController.html#adb5f70ebc08b93f22daf3d8d5aedc35c" title="Sets the bin width parameter.">DisplayController::</a> <a name="l01537"></a><a class="code" href="classhippodraw_1_1DisplayController.html#adb5f70ebc08b93f22daf3d8d5aedc35c">01537</a> <a class="code" href="classhippodraw_1_1DisplayController.html#adb5f70ebc08b93f22daf3d8d5aedc35c" title="Sets the bin width parameter.">setBinWidth</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01538"></a>01538 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <a name="l01539"></a>01539 <span class="keywordtype">double</span> width ) <a name="l01540"></a>01540 { <a name="l01541"></a>01541 plotter -> <a class="code" href="classhippodraw_1_1DisplayController.html#adb5f70ebc08b93f22daf3d8d5aedc35c" title="Sets the bin width parameter.">setBinWidth</a> ( axis, width ); <a name="l01542"></a>01542 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a352144bce77f0f9cadfb18097f50898c" title="Sets the auto-ranging.">setAutoRanging</a> ( axis, <span class="keyword">false</span> ); <a name="l01543"></a>01543 } <a name="l01544"></a>01544 <a name="l01549"></a>01549 <span class="keywordtype">void</span> <a name="l01550"></a>01550 <a class="code" href="classhippodraw_1_1DisplayController.html#a32dc459f8b2221a32307d0a7bfcd99b0" title="Sets the offset from dragging slider.">DisplayController::</a> <a name="l01551"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a32dc459f8b2221a32307d0a7bfcd99b0">01551</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a32dc459f8b2221a32307d0a7bfcd99b0" title="Sets the offset from dragging slider.">setOffset</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01552"></a>01552 <span class="keyword">const</span> std::string & axis, <a name="l01553"></a>01553 <span class="keywordtype">int</span> parm, <a name="l01554"></a>01554 <span class="keywordtype">bool</span> dragging ) <a name="l01555"></a>01555 { <a name="l01556"></a>01556 <span class="keywordtype">bool</span> widths_are_same = <span class="keyword">false</span>; <a name="l01557"></a>01557 <a name="l01558"></a>01558 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">Axes::Type</a> at = <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a>; <a name="l01559"></a>01559 <span class="keywordflow">if</span> ( axis == <span class="stringliteral">"Y"</span> ) at = <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a>; <a name="l01560"></a>01560 <span class="keywordflow">if</span> ( axis == <span class="stringliteral">"Z"</span> ) at = <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a>; <a name="l01561"></a>01561 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a352144bce77f0f9cadfb18097f50898c" title="Sets the auto-ranging.">setAutoRanging</a> ( at, <span class="keyword">false</span> ); <a name="l01562"></a>01562 <a name="l01563"></a>01563 <span class="keywordtype">int</span> index = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#af17d91d1b3039f791a5045d18386944d" title="Returns the index of the active plotter.">activePlotIndex</a> (); <a name="l01564"></a>01564 <a name="l01565"></a>01565 <span class="keywordflow">if</span> ( index < 0 ) { <a name="l01566"></a>01566 <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="l01567"></a>01567 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = 0; i < number; i++ ) { <a name="l01568"></a>01568 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * projector = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a128cb21ff41cef271076868d688097f3" title="Returns the projector at index i.">getProjector</a> ( i ); <a name="l01569"></a>01569 projector-><a class="code" href="classhippodraw_1_1ProjectorBase.html#ab001b71fbb36d608e1f1557fdb1ae531" title="Sets the bin offset.">setOffset</a> ( axis, parm, dragging ); <a name="l01570"></a>01570 } <a name="l01571"></a>01571 <a name="l01572"></a>01572 widths_are_same = <span class="keyword">true</span>; <a name="l01573"></a>01573 } <a name="l01574"></a>01574 <span class="keywordflow">else</span> { <a name="l01575"></a>01575 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * projector = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a128cb21ff41cef271076868d688097f3" title="Returns the projector at index i.">getProjector</a> ( index ); <a name="l01576"></a>01576 projector-><a class="code" href="classhippodraw_1_1ProjectorBase.html#ab001b71fbb36d608e1f1557fdb1ae531" title="Sets the bin offset.">setOffset</a> ( axis, parm, dragging ); <a name="l01577"></a>01577 } <a name="l01578"></a>01578 <a name="l01579"></a>01579 } <a name="l01580"></a>01580 <a name="l01581"></a>01581 <span class="keywordtype">void</span> <a name="l01582"></a>01582 <a class="code" href="classhippodraw_1_1DisplayController.html#a32dc459f8b2221a32307d0a7bfcd99b0" title="Sets the offset from dragging slider.">DisplayController::</a> <a name="l01583"></a><a class="code" href="classhippodraw_1_1DisplayController.html#ac6e5a08306cf8e482a75192f318b68c2">01583</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a32dc459f8b2221a32307d0a7bfcd99b0" title="Sets the offset from dragging slider.">setOffset</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01584"></a>01584 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <a name="l01585"></a>01585 <span class="keywordtype">double</span> offset ) <a name="l01586"></a>01586 { <a name="l01587"></a>01587 <span class="keywordtype">bool</span> widths_are_same = <span class="keyword">false</span>; <a name="l01588"></a>01588 <a name="l01589"></a>01589 <span class="keywordtype">int</span> index = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#af17d91d1b3039f791a5045d18386944d" title="Returns the index of the active plotter.">activePlotIndex</a> (); <a name="l01590"></a>01590 <a name="l01591"></a>01591 <span class="keywordflow">if</span> ( index < 0 ) { <a name="l01592"></a>01592 <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="l01593"></a>01593 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = 0; i < number; i++ ) { <a name="l01594"></a>01594 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * projector = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a128cb21ff41cef271076868d688097f3" title="Returns the projector at index i.">getProjector</a> ( i ); <a name="l01595"></a>01595 projector-><a class="code" href="classhippodraw_1_1ProjectorBase.html#ab001b71fbb36d608e1f1557fdb1ae531" title="Sets the bin offset.">setOffset</a> ( axis, offset ); <a name="l01596"></a>01596 } <a name="l01597"></a>01597 <a name="l01598"></a>01598 widths_are_same = <span class="keyword">true</span>; <a name="l01599"></a>01599 } <a name="l01600"></a>01600 <span class="keywordflow">else</span> { <a name="l01601"></a>01601 <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * projector = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a128cb21ff41cef271076868d688097f3" title="Returns the projector at index i.">getProjector</a> ( index ); <a name="l01602"></a>01602 projector-><a class="code" href="classhippodraw_1_1ProjectorBase.html#ab001b71fbb36d608e1f1557fdb1ae531" title="Sets the bin offset.">setOffset</a> ( axis, offset ); <a name="l01603"></a>01603 } <a name="l01604"></a>01604 <a name="l01605"></a>01605 } <a name="l01606"></a>01606 <a name="l01607"></a>01607 <span class="keywordtype">void</span> <a name="l01608"></a>01608 <a class="code" href="classhippodraw_1_1DisplayController.html#a9c6ee46f9bc5621791f13a8f15f9b251" title="Set the error display.">DisplayController::</a> <a name="l01609"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a9c6ee46f9bc5621791f13a8f15f9b251">01609</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a9c6ee46f9bc5621791f13a8f15f9b251" title="Set the error display.">setErrorDisplayed</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="l01610"></a>01610 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <a name="l01611"></a>01611 <span class="keywordtype">bool</span> state )<span class="keyword"> const</span> <a name="l01612"></a>01612 <span class="keyword"></span>{ <a name="l01613"></a>01613 <span class="keywordtype">int</span> index = <a class="code" href="classhippodraw_1_1DisplayController.html#a6fe40c65a134431836bb07d74d3525b1" title="Returns the active DataRep index for the DataRep objects contained in the plotter...">activeDataRepIndex</a> ( plotter ); <a name="l01614"></a>01614 <span class="keywordflow">if</span> ( index >= 0 ) { <a name="l01615"></a>01615 <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * rep = plotter -> getDataRep ( index ); <a name="l01616"></a>01616 rep -> setErrorDisplay ( axis, state ); <a name="l01617"></a>01617 } <a name="l01618"></a>01618 } <a name="l01619"></a>01619 <a name="l01620"></a>01620 <span class="keywordtype">void</span> <a name="l01621"></a>01621 <a class="code" href="classhippodraw_1_1DisplayController.html#aa32747e681dc57f5d805a4a3262e567f" title="Creates a NTuple from the plotter.">DisplayController::</a> <a name="l01622"></a><a class="code" href="classhippodraw_1_1DisplayController.html#aa32747e681dc57f5d805a4a3262e567f">01622</a> <a class="code" href="classhippodraw_1_1DisplayController.html#aa32747e681dc57f5d805a4a3262e567f" title="Creates a NTuple from the plotter.">createNTuple</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="l01623"></a>01623 { <a name="l01624"></a>01624 <span class="keywordtype">int</span> index = plotter -> activePlotIndex (); <a name="l01625"></a>01625 <span class="comment">// if ( index < 0 ) return;</span> <a name="l01626"></a>01626 <a name="l01627"></a>01627 <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * ntuple = plotter -> <a class="code" href="classhippodraw_1_1DisplayController.html#aa32747e681dc57f5d805a4a3262e567f" title="Creates a NTuple from the plotter.">createNTuple</a> (); <a name="l01628"></a>01628 <a class="code" href="classhippodraw_1_1DisplayController.html#aba45b6f55c38a5036c5ceb67c05ad94f" title="Returns the pointer to the singleton instance.">DataSourceController::instance</a> () -> registerNTuple ( ntuple ); <a name="l01629"></a>01629 } <a name="l01630"></a>01630 <a name="l01631"></a>01631 <span class="keywordtype">void</span> <a name="l01632"></a>01632 <a class="code" href="classhippodraw_1_1DisplayController.html#a04b642f44797f864a7fade5b2454c69b" title="Set both X and Y axis to log or linear, without resetting the bin width.">DisplayController::</a> <a name="l01633"></a><a class="code" href="classhippodraw_1_1DisplayController.html#a04b642f44797f864a7fade5b2454c69b">01633</a> <a class="code" href="classhippodraw_1_1DisplayController.html#a04b642f44797f864a7fade5b2454c69b" title="Set both X and Y axis to log or linear, without resetting the bin width.">setTransformAxis</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01634"></a>01634 <span class="keyword">const</span> std::string & x, <a name="l01635"></a>01635 <span class="keyword">const</span> std::string & y) <a name="l01636"></a>01636 { <a name="l01637"></a>01637 <a class="code" href="classhippodraw_1_1DisplayController.html#aad8054bc410b55cb1d335365980f8c2a" title="set the axis to log or linear, without reseting the bin width.">setAxisModelWithoutSetBin</a> ( plotter, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a>, x ); <a name="l01638"></a>01638 <a class="code" href="classhippodraw_1_1DisplayController.html#aad8054bc410b55cb1d335365980f8c2a" title="set the axis to log or linear, without reseting the bin width.">setAxisModelWithoutSetBin</a> ( plotter, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a>, y ); <a name="l01639"></a>01639 } <a name="l01640"></a>01640 <a name="l01641"></a>01641 <a name="l01642"></a>01642 <span class="keywordtype">void</span> <a name="l01643"></a>01643 <a class="code" href="classhippodraw_1_1DisplayController.html#aad8054bc410b55cb1d335365980f8c2a" title="set the axis to log or linear, without reseting the bin width.">DisplayController::</a> <a name="l01644"></a><a class="code" href="classhippodraw_1_1DisplayController.html#aad8054bc410b55cb1d335365980f8c2a">01644</a> <a class="code" href="classhippodraw_1_1DisplayController.html#aad8054bc410b55cb1d335365980f8c2a" title="set the axis to log or linear, without reseting the bin width.">setAxisModelWithoutSetBin</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter, <a name="l01645"></a>01645 <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <a name="l01646"></a>01646 <span class="keyword">const</span> std::string & <a class="code" href="namespacenum__util.html#af7e893a8c6a5f6a426480fc85cda4fa1">type</a> ) <a name="l01647"></a>01647 { <a name="l01648"></a>01648 <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="l01649"></a>01649 <a name="l01650"></a>01650 <span class="keywordflow">if</span> ( model != 0 ) { <a name="l01651"></a>01651 <a class="code" href="classhippodraw_1_1AxisModelBase.html" title="The AxisModelBase class maintains the Range and scaling of an axis.">AxisModelBase</a> * temp = 0; <a name="l01652"></a>01652 <a name="l01653"></a>01653 <span class="keywordflow">if</span> ( type == <span class="stringliteral">"Linear"</span> ) { <a name="l01654"></a>01654 <a name="l01655"></a>01655 <span class="keywordflow">if</span> ( !( model-><a class="code" href="classhippodraw_1_1AxisModelBase.html#a4d864ee8e8581e14a866141d6d47976d" title="Returns a boolean describing the type of the scale of the axis.">isLog</a>() ) ) <span class="keywordflow">return</span>; <span class="comment">// no change needed</span> <a name="l01656"></a>01656 temp = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1AxisModelLinear.html" title="Given a range, calculates a model for an axis with a linear scale.">AxisModelLinear</a> ( *model ); <a name="l01657"></a>01657 <a name="l01658"></a>01658 } <a name="l01659"></a>01659 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( type == <span class="stringliteral">"Log"</span> ) { <a name="l01660"></a>01660 <a name="l01661"></a>01661 <span class="keywordflow">if</span> ( model-><a class="code" href="classhippodraw_1_1AxisModelBase.html#a4d864ee8e8581e14a866141d6d47976d" title="Returns a boolean describing the type of the scale of the axis.">isLog</a> () ) <span class="keywordflow">return</span>; <span class="comment">// no change needed </span> <a name="l01662"></a>01662 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> & range = plotter -> getRange ( axis, <span class="keyword">false</span> ); <a name="l01663"></a>01663 <span class="keywordflow">if</span> ( range.<a class="code" href="classhippodraw_1_1Range.html#a10f7231db7f0fe0855fc344e98575714" title="Returns the maximum of the range object.">high</a> () < 0. ) { <a name="l01664"></a>01664 <span class="keywordtype">string</span> what ( <span class="stringliteral">"Can not change axis to Log scale since current "</span> <a name="l01665"></a>01665 <span class="stringliteral">"range is negative."</span> ); <a name="l01666"></a>01666 <span class="keywordflow">throw</span> std::runtime_error ( what ); <a name="l01667"></a>01667 } <a name="l01668"></a>01668 <span class="keywordtype">double</span> pos = plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a8d76a4540cacd4ae9faad779555b43f1" title="Returns the smallest positive number from the data.">getPosRange</a> ( axis ); <a name="l01669"></a>01669 model-><a class="code" href="classhippodraw_1_1AxisModelBase.html#a325c76e616aa02b4fe13d27e7333d33c" title="The function which changes the pos member of m_range.">setRangePos</a> ( pos ); <a name="l01670"></a>01670 temp = <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> ( *model ); <a name="l01671"></a>01671 <a name="l01672"></a>01672 } <a name="l01673"></a>01673 <a name="l01674"></a>01674 assert ( temp ); <a name="l01675"></a>01675 <a name="l01676"></a>01676 swap ( temp, model ); <a name="l01677"></a>01677 <a name="l01678"></a>01678 plotter-><a class="code" href="classhippodraw_1_1PlotterBase.html#a9f2854a2e173ad7296f233845dbce099" title="Sets the AxisModel on the specified axis.">setAxisModel</a> ( model, axis ); <a name="l01679"></a>01679 <a name="l01680"></a>01680 <span class="comment">// Do not delete until the end so project can use it.</span> <a name="l01681"></a>01681 <span class="keyword">delete</span> temp; <a name="l01682"></a>01682 } <a name="l01683"></a>01683 } </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>