Cut1DPlotter.cxx
Go to the documentation of this file.
1 
12 // for truncation warning
13 #ifdef _MSC_VER
14 #include "msdevstudio/MSconfig.h"
15 #endif
16 
17 #include "Cut1DPlotter.h"
18 
19 #include "datareps/DataRep.h"
20 #include "datasrcs/TupleCut.h"
21 
22 #include "reps/CutRangeRep.h"
23 #include <cassert>
24 
25 using std::vector;
26 
27 using namespace hippodraw;
28 
30  : CutPlotter ( "Cut1DPlotter" )
31 {
32 }
33 
35  : CutPlotter ( plotter )
36 {
37 }
38 
40 {
41 }
42 
44 {
45  return new Cut1DPlotter ( *this );
46 }
47 
48 void
51 {
52  m_datarep=rep;
53  m_datarep -> addCut ( TupleCut () );
54 }
55 
56 
57 void
60 {
61  XyPlotter::addDataRep ( rep );
62 }
63 
64 void
66 setAxisBinding ( const std::vector < std::string > & bindings )
67 {
68  assert ( bindings.size () == 1 );
69 
70  CutPlotter::setAxisBinding ( bindings );
71 }
72 
74 {
75  const Range & range = getRange ( Axes::X, false );
76  m_datarep -> setCutRangeAt ( range, 0 );
77 
78  updateTargets ();
79 }
80 
81 void
84 {
85  m_datarep -> toggleInverted ( 0 );
86 
87  updateTargets ();
88 }
89 
90 const std::string &
92 getCutLabel () const
93 {
94  const vector < TupleCut > & cuts = m_datarep -> getCuts ();
95  const TupleCut & cut = cuts[0]; // so Doxygen sees it.
96 
97  return cut.getLabel ();
98 }

Generated for HippoDraw Class Library by doxygen