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 PlotterFactory * PlotterFactory::s_instance = 0; 00024 00025 PlotterFactory::PlotterFactory() 00026 { 00027 } 00028 00029 PlotterFactory * PlotterFactory::instance () 00030 { 00031 if ( s_instance == 0 ) { 00032 s_instance = new PlotterFactory ( ); 00033 s_instance->initialize (); 00034 } 00035 return s_instance; 00036 } 00037 00038 void PlotterFactory::initialize () 00039 { 00040 add ( new Cut1DPlotter () ); 00041 add ( new Cut2DPlotter () ); 00042 add ( new XyPlotter () ); 00043 add ( new TextPlotter () ); 00044 }