TextDataRep.cxx

Go to the documentation of this file.
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 using namespace hippodraw;
00025 
00026 TextDataRep::TextDataRep ( RepBase * rep )
00027   : DataRep()
00028 {
00029   m_name = "TextDataRep";
00030   m_rep = rep;
00031 }
00032 
00033 TextDataRep::TextDataRep ( )
00034   : DataRep()
00035 {
00036   m_name = "TextDataRep";
00037   m_rep = 0;
00038 }
00039 
00040 TextDataRep::
00041 TextDataRep ( const TextDataRep & rep )
00042   : DataRep ( rep )
00043 {
00044 }
00045 
00046 DataRep * TextDataRep::clone ()
00047 {
00048   return new TextDataRep ( *this );
00049 }
00050 
00051 bool TextDataRep::hasNTupleBindings () const
00052 {
00053   return false;
00054 }
00055 
00056 ProjectorBase *
00057 TextDataRep::
00058 getTargetProjector ( ) const
00059 {
00060   ProjectorBase * projector = 0;
00061   DataRep * target = getParentDataRep();
00062 
00063   if ( target != 0 ) {
00064     projector = target -> getProjector ();
00065   }
00066 
00067   return projector;
00068 }
00069 
00070 void
00071 TextDataRep::
00072 drawProjectedValues ( TransformBase *, ViewBase * view )
00073 {
00074   assert ( m_rep );  
00075   TextRepBase * t_rep = dynamic_cast < TextRepBase * > ( m_rep );
00076   assert ( t_rep != 0 );
00077 
00078   ProjectorBase * projector = getTargetProjector ();
00079   if ( projector != 0 ) {
00080     t_rep -> drawProjectedValues ( *projector, *view );
00081   }
00082   else {
00083     t_rep -> displayError ( *view );
00084   }
00085 }
00086 
00087 bool
00088 TextDataRep::
00089 isTargetable () const
00090 {
00091   return false;
00092 }
00093 
00094 using namespace hippodraw;
00095 
00096 bool
00097 TextDataRep::
00098 hasAxis ( hippodraw::Axes::Type ) const
00099 {
00100   return false;
00101 }

Generated for HippoDraw Class Library by doxygen