00001 00012 // for truncation warning in debug mode 00013 #ifdef _MSC_VER 00014 #include "msdevstudio/MSconfig.h" 00015 #endif 00016 00017 #include "DyHistogram.h" 00018 00019 #include "projectors/DyHist1DProjector.h" 00020 #include "reps/ColumnPointRep.h" 00021 00022 using namespace hippodraw; 00023 00024 DyHistogram::DyHistogram ( ) 00025 : DataRep () 00026 { 00027 m_name = "Histogram"; 00028 00029 m_projector = new DyHist1DProjector(); 00030 m_rep = new ColumnPointRep(); 00031 } 00032 00033 DataRep * DyHistogram::clone () 00034 { 00035 return new DyHistogram ( *this ); 00036 } 00037 00038 bool DyHistogram::acceptFunction ( int num ) 00039 { 00040 return num == 1; 00041 } 00042 00043 bool 00044 DyHistogram:: 00045 hasErrorDisplay () const 00046 { 00047 return true; 00048 } 00049 00050 void 00051 DyHistogram:: 00052 setRepresentation ( RepBase * rep ) 00053 { 00054 DataRep::setRepresentation ( rep ); 00055 if ( rep -> name () == "Symbol" ) { 00056 rep -> setSize ( 4. ); 00057 setErrorDisplay ( Axes::Y, true ); 00058 notifyObservers (); 00059 } 00060 } 00061 00062 bool 00063 DyHistogram:: 00064 hasAxis ( hippodraw::Axes::Type axis ) const 00065 { 00066 return axis == Axes::X || axis == Axes::Y; 00067 }