XYZPlot.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 "XYZPlot.h"
18 
21 
22 #include <stdexcept>
23 
24 using namespace hippodraw;
25 
27  : DataRep ()
28 {
29  m_name = "XYZ Plot";
30 
31  m_projector = new Map3Projector();
33 }
34 
36 {
37  return new XYZPlot ( *this );
38 }
39 
40 bool
43 {
44  return axis == Axes::X || axis == Axes::Y || axis ==Axes::Z;
45 }
46 
47 
48 void XYZPlot::setRepresentation( RepBase * pointrep ) {
49  ColorSymbolPointRep * rep = dynamic_cast<ColorSymbolPointRep *>(pointrep);
50  if (rep == 0) {
51  std::string what("Only ColorSymbol pointreps are allowed ");
52  what += "for this datarep.";
53  throw std::runtime_error(what);
54  }
55 }
std::string m_name
The name of the display as it might be displayed in a GUI.
Definition: DataRep.h:76
XYZPlot()
The default constructor.
Definition: XYZPlot.cxx:26
ColorSymbolPointRep class interface.
return rep
Definition: Inspector.cxx:3843
virtual DataRep * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
Definition: XYZPlot.cxx:35
RepBase * m_rep
The representation used for drawing each data point in the view.
Definition: DataRep.h:94
The base class for data representations.
Definition: DataRep.h:68
XYZPlot class interface.
A PointRep class draws a symbol to represent the coordinate in a color that represents the value...
ProjectorBase * m_projector
A projector used to transform data to projected values that will be plotted.
Definition: DataRep.h:90
virtual bool hasAxis(hippodraw::Axes::Type) const
Returns true if the data representation has specified axis type axis.
Definition: XYZPlot.cxx:42
virtual void setRepresentation(RepBase *pointrep)
Only one pointrep is allowed, ColorSymbolPointRep, so this method will throw an exception if called w...
Definition: XYZPlot.cxx:48
A derived class of NTupleProjector that maps 3 DataSource columns to a 3-dimensional projection...
Definition: Map3Projector.h:30
Type
Axes constants.
Definition: AxesType.h:31
The base class for the point representation hierarchy.
Definition: RepBase.h:45
hippodraw::Map3Projector class interface

Generated for HippoDraw Class Library by doxygen