00001 00012 // for truncation warning in debug mode 00013 #ifdef _MSC_VER 00014 #include "msdevstudio/MSconfig.h" 00015 #endif 00016 00017 #include "TextDataRep.h" 00018 00019 #include "projectors/Map1Projector.h" 00020 #include "reps/TextRepBase.h" 00021 00022 #include <cassert> 00023 00024 TextDataRep::TextDataRep ( RepBase * rep ) 00025 : DataRep() 00026 { 00027 m_name = "TextDataRep"; 00028 m_rep = rep; 00029 } 00030 00031 TextDataRep::TextDataRep ( ) 00032 : DataRep() 00033 { 00034 m_name = "TextDataRep"; 00035 m_rep = 0; 00036 } 00037 00038 TextDataRep:: 00039 TextDataRep ( const TextDataRep & rep ) 00040 : DataRep ( rep ) 00041 { 00042 } 00043 00044 DataRep * TextDataRep::clone () 00045 { 00046 return new TextDataRep ( *this ); 00047 } 00048 00049 bool TextDataRep::hasNTupleBindings () const 00050 { 00051 return false; 00052 } 00053 00054 ProjectorBase * 00055 TextDataRep:: 00056 getTargetProjector ( ) 00057 { 00058 ProjectorBase * projector = 0; 00059 DataRep * target = getParentDataRep(); 00060 // assert ( target ); 00061 if ( target != 0 ) { 00062 // return target->getProjector (); 00063 projector = target -> getProjector (); 00064 } 00065 00066 return projector; 00067 } 00068 00069 void 00070 TextDataRep:: 00071 drawProjectedValues ( TransformBase * transform, ViewBase * view ) 00072 { 00073 assert ( m_rep ); 00074 TextRepBase * t_rep = dynamic_cast < TextRepBase * > ( m_rep ); 00075 assert ( t_rep != 0 ); 00076 00077 ProjectorBase * projector = getTargetProjector (); 00078 if ( projector != 0 ) { 00079 t_rep -> drawProjectedValues ( *projector, *view ); 00080 } 00081 else { 00082 t_rep -> displayError ( *view ); 00083 } 00084 } 00085 00086 bool 00087 TextDataRep:: 00088 isTargetable () const 00089 { 00090 return false; 00091 } 00092 00093 using namespace hippodraw; 00094 00095 bool 00096 TextDataRep:: 00097 hasAxis ( hippodraw::Axes::Type axis ) const 00098 { 00099 return false; 00100 } 00101