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 #include "reps/UnderflowTextRep.h" 00026 #include "reps/OverflowTextRep.h" 00027 00028 namespace hippodraw { 00029 00030 TextRepFactory * TextRepFactory::s_instance = 0; 00031 00032 TextRepFactory::TextRepFactory () 00033 { 00034 } 00035 00036 TextRepFactory * TextRepFactory::instance () 00037 { 00038 if ( s_instance == 0 ) { 00039 s_instance = new TextRepFactory (); 00040 s_instance->initialize (); 00041 } 00042 00043 return s_instance; 00044 } 00045 00046 void TextRepFactory::initialize () 00047 { 00048 add ( new TotalTextRep () ); 00049 add ( new FuncChiRep () ); 00050 add ( new FuncParmRep () ); 00051 add ( new AverageTextRep ( Axes::X ) ); 00052 add ( new AverageTextRep ( Axes::Y ) ); 00053 add ( new BoxTextRep () ); 00054 add ( new UnderflowTextRep () ); 00055 add ( new OverflowTextRep () ); 00056 } 00057 00058 } // namespace hippodraw