<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_4a8869a1c3a722e926803cb2dc6e642c.html">plotters</a> </div> </div> <div class="contents"> <h1>PlotterFactory.cxx</h1><a href="PlotterFactory_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <a name="l00011"></a>00011 <span class="comment">// for truncation warning in debug mode</span> <a name="l00012"></a>00012 <span class="preprocessor">#ifdef _MSC_VER</span> <a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#include "msdevstudio/MSconfig.h"</span> <a name="l00014"></a>00014 <span class="preprocessor">#endif</span> <a name="l00015"></a>00015 <span class="preprocessor"></span> <a name="l00016"></a>00016 <span class="preprocessor">#include "<a class="code" href="PlotterFactory_8h.html">PlotterFactory.h</a>"</span> <a name="l00017"></a>00017 <a name="l00018"></a>00018 <span class="comment">// A list of default Plotters.</span> <a name="l00019"></a>00019 <span class="preprocessor">#include "<a class="code" href="Cut1DPlotter_8h.html" title="Cut1DPlotter class interface.">Cut1DPlotter.h</a>"</span> <a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="Cut2DPlotter_8h.html" title="hippodraw::Cut2DPlotter class interface">Cut2DPlotter.h</a>"</span> <a name="l00021"></a>00021 <span class="preprocessor">#include "<a class="code" href="TextPlotter_8h.html" title="TextPlotter class interface.">TextPlotter.h</a>"</span> <a name="l00022"></a>00022 <a name="l00023"></a>00023 <span class="keyword">namespace </span>hippodraw { <a name="l00024"></a>00024 <a name="l00025"></a>00025 PlotterFactory * <a class="code" href="classhippodraw_1_1PlotterFactory.html#a267b215ed631c541dda205a5e100d8f1" title="The pointer to the singleton object.">PlotterFactory::s_instance</a> = 0; <a name="l00026"></a><a class="code" href="classhippodraw_1_1PlotterFactory.html#a6d55f7597759b7eb6135cd4b9cb0f880">00026</a> <a name="l00027"></a>00027 <a class="code" href="classhippodraw_1_1PlotterFactory.html#a6d55f7597759b7eb6135cd4b9cb0f880" title="The default constructor for prevent creation except by itself.">PlotterFactory::PlotterFactory</a>() <a name="l00028"></a>00028 { <a name="l00029"></a>00029 } <a name="l00030"></a><a class="code" href="classhippodraw_1_1PlotterFactory.html#a3bda77c8923e86a3551b8aa8472e244f">00030</a> <a name="l00031"></a>00031 <a class="code" href="classhippodraw_1_1PlotterFactory.html" title="This Singleton class maintains a list of plotters.">PlotterFactory</a> * <a class="code" href="classhippodraw_1_1PlotterFactory.html#a3bda77c8923e86a3551b8aa8472e244f" title="Returns the pointer to the singleton instance.">PlotterFactory::instance</a> () <a name="l00032"></a>00032 { <a name="l00033"></a>00033 <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1PlotterFactory.html#a267b215ed631c541dda205a5e100d8f1" title="The pointer to the singleton object.">s_instance</a> == 0 ) { <a name="l00034"></a>00034 <a class="code" href="classhippodraw_1_1PlotterFactory.html#a267b215ed631c541dda205a5e100d8f1" title="The pointer to the singleton object.">s_instance</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1PlotterFactory.html#a6d55f7597759b7eb6135cd4b9cb0f880" title="The default constructor for prevent creation except by itself.">PlotterFactory</a> ( ); <a name="l00035"></a>00035 <a class="code" href="classhippodraw_1_1PlotterFactory.html#a267b215ed631c541dda205a5e100d8f1" title="The pointer to the singleton object.">s_instance</a>-><a class="code" href="classhippodraw_1_1PlotterFactory.html#a25a40b6614565f755233080a384c35f1" title="Initializes the factory with a set of default Plotters.">initialize</a> (); <a name="l00036"></a>00036 } <a name="l00037"></a>00037 <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1PlotterFactory.html#a267b215ed631c541dda205a5e100d8f1" title="The pointer to the singleton object.">s_instance</a>; <a name="l00038"></a>00038 } <a name="l00039"></a><a class="code" href="classhippodraw_1_1PlotterFactory.html#a25a40b6614565f755233080a384c35f1">00039</a> <a name="l00040"></a>00040 <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1PlotterFactory.html#a25a40b6614565f755233080a384c35f1" title="Initializes the factory with a set of default Plotters.">PlotterFactory::initialize</a> () <a name="l00041"></a>00041 { <a name="l00042"></a>00042 <a class="code" href="classhippodraw_1_1Factory.html#a8aee137075d50e6fca916a1dbfd388c3" title="Adds a prototype object to the list of prototypes.">add</a> ( <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1Cut1DPlotter.html" title="A Plotter class that plots one-dimensional TupleCut values.">Cut1DPlotter</a> () ); <a name="l00043"></a>00043 <a class="code" href="classhippodraw_1_1Factory.html#a8aee137075d50e6fca916a1dbfd388c3" title="Adds a prototype object to the list of prototypes.">add</a> ( <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1Cut2DPlotter.html" title="A Plotter class that plots one-dimensional TupleCut values.">Cut2DPlotter</a> () ); <a name="l00044"></a>00044 <a class="code" href="classhippodraw_1_1Factory.html#a8aee137075d50e6fca916a1dbfd388c3" title="Adds a prototype object to the list of prototypes.">add</a> ( <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1XyPlotter.html" title="A Plotter class that plots points in 2 dimensions and option a third dimension in...">XyPlotter</a> () ); <a name="l00045"></a>00045 <a class="code" href="classhippodraw_1_1Factory.html#a8aee137075d50e6fca916a1dbfd388c3" title="Adds a prototype object to the list of prototypes.">add</a> ( <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1TextPlotter.html" title="A Plotter class that draws text.">TextPlotter</a> () ); <a name="l00046"></a>00046 } <a name="l00047"></a>00047 <a name="l00048"></a>00048 } <span class="comment">// namespace hippodraw</span> </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>