PlotterFactory.cxx

Go to the documentation of this file.
00001 
00011 // for truncation warning in debug mode
00012 #ifdef _MSC_VER
00013 #include "msdevstudio/MSconfig.h"
00014 #endif
00015 
00016 #include "PlotterFactory.h"
00017 
00018 // A list of default Plotters.
00019 #include "Cut1DPlotter.h"
00020 #include "Cut2DPlotter.h"
00021 #include "TextPlotter.h"
00022 
00023 namespace hippodraw {
00024 
00025 PlotterFactory * PlotterFactory::s_instance = 0;
00026 
00027 PlotterFactory::PlotterFactory()
00028 {
00029 }
00030 
00031 PlotterFactory * PlotterFactory::instance ()
00032 {
00033   if ( s_instance == 0 ) {
00034     s_instance = new PlotterFactory ( );
00035     s_instance->initialize ();
00036   }
00037   return s_instance;
00038 }
00039 
00040 void PlotterFactory::initialize ()
00041 {
00042   add ( new Cut1DPlotter () );
00043   add ( new Cut2DPlotter () );
00044   add ( new XyPlotter () );
00045   add ( new TextPlotter () );
00046 }
00047 
00048 } // namespace hippodraw

Generated for HippoDraw Class Library by doxygen