TextDataRep.cxx
Go to the documentation of this file.
1 
12 // for truncation warning in debug mode
13 #ifdef _MSC_VER
14 #include "msdevstudio/MSconfig.h"
15 #endif
16 
17 #include "TextDataRep.h"
18 
20 #include "reps/TextRepBase.h"
21 
22 #include <cassert>
23 
24 using namespace hippodraw;
25 
27  : DataRep()
28 {
29  m_name = "TextDataRep";
30  m_rep = rep;
31 }
32 
34  : DataRep()
35 {
36  m_name = "TextDataRep";
37  m_rep = 0;
38 }
39 
41 TextDataRep ( const TextDataRep & rep )
42  : DataRep ( rep )
43 {
44 }
45 
47 {
48  return new TextDataRep ( *this );
49 }
50 
52 {
53  return false;
54 }
55 
59 {
60  ProjectorBase * projector = 0;
61  DataRep * target = getParentDataRep();
62 
63  if ( target != 0 ) {
64  projector = target -> getProjector ();
65  }
66 
67  return projector;
68 }
69 
70 void
73 {
74  assert ( m_rep );
75  TextRepBase * t_rep = dynamic_cast < TextRepBase * > ( m_rep );
76  assert ( t_rep != 0 );
77 
78  ProjectorBase * projector = getTargetProjector ();
79  if ( projector != 0 ) {
80  t_rep -> drawProjectedValues ( *projector, *view );
81  }
82  else {
83  t_rep -> displayError ( *view );
84  }
85 }
86 
87 bool
89 isTargetable () const
90 {
91  return false;
92 }
93 
94 using namespace hippodraw;
95 
96 bool
99 {
100  return false;
101 }

Generated for HippoDraw Class Library by doxygen