00001 /* 00002 * HippoPlot DataRepFactory class implementation 00003 * 00004 * Copyright (C) 2001-2003 The Board of Trustees of The Leland 00005 * Stanford Junior University. All Rights Reserved. 00006 * 00007 * $Id: DataRepFactory.cxx,v 1.39 2004/06/14 01:51:39 pfkeb Exp $ 00008 * 00009 */ 00010 00011 // for truncation warning in debug mode 00012 #ifdef _MSC_VER 00013 #include "msdevstudio/MSconfig.h" 00014 #endif 00015 00016 #include "DataRepFactory.h" 00017 00018 // A list of default DataReps. 00019 #include "ColorPlot.h" 00020 #include "ContourPlot.h" 00021 #include "Profile2D.h" 00022 #include "ProfileContour.h" 00023 #include "DyHistogram.h" 00024 #include "LineDataRep.h" 00025 #include "ProfileHist.h" 00026 #include "ScatterPlot.h" 00027 #include "St1DHistogram.h" 00028 #include "St2DHistogram.h" 00029 #include "StripChart.h" 00030 #include "XYPlot.h" 00031 #include "XYZPlot.h" 00032 #include "YPlot.h" 00033 #include "ZPlot.h" 00034 00035 DataRepFactory * DataRepFactory::s_instance = 0; 00036 00037 DataRepFactory::DataRepFactory ( ) 00038 { 00039 } 00040 00041 DataRepFactory * DataRepFactory::instance () 00042 { 00043 if ( s_instance == 0 ) { 00044 s_instance = new DataRepFactory ( ); 00045 s_instance->initialize (); 00046 } 00047 return s_instance; 00048 } 00049 00050 void DataRepFactory::initialize () 00051 { 00052 add ( new ColorPlot () ); 00053 add ( new ContourPlot () ); 00054 add ( new Profile2D () ); 00055 add ( new ProfileContour () ); 00056 add ( new DyHistogram () ); 00057 add ( new LineDataRep () ); 00058 add ( new ProfileHist () ); 00059 add ( new ScatterPlot () ); 00060 add ( new St1DHistogram () ); 00061 add ( new St2DHistogram () ); 00062 add ( new StripChart () ); 00063 add ( new XYPlot () ); 00064 add ( new XYZPlot () ); 00065 add ( new YPlot () ); 00066 add ( new ZPlot () ); 00067 }