00001 00012 #ifdef _MSC_VER 00013 // A long identifier warning. 00014 #include "msdevstudio/MSconfig.h" 00015 #endif 00016 00017 #include "reps/TextRepFactory.h" 00018 00019 // A list of default TextReps. 00020 #include "reps/TotalTextRep.h" 00021 #include "reps/FuncChiRep.h" 00022 #include "reps/FuncParmRep.h" 00023 #include "reps/AverageTextRep.h" 00024 #include "reps/BoxTextRep.h" 00025 00026 using namespace hippodraw; 00027 00028 TextRepFactory * TextRepFactory::s_instance = 0; 00029 00030 TextRepFactory::TextRepFactory () 00031 { 00032 } 00033 00034 TextRepFactory * TextRepFactory::instance () 00035 { 00036 if ( s_instance == 0 ) { 00037 s_instance = new TextRepFactory (); 00038 s_instance->initialize (); 00039 } 00040 00041 return s_instance; 00042 } 00043 00044 void TextRepFactory::initialize () 00045 { 00046 add ( new TotalTextRep () ); 00047 add ( new FuncChiRep () ); 00048 add ( new FuncParmRep () ); 00049 add ( new AverageTextRep ( Axes::X ) ); 00050 add ( new AverageTextRep ( Axes::Y ) ); 00051 add ( new BoxTextRep () ); 00052 }