14 #include "msdevstudio/MSconfig.h"
29 using namespace hippodraw;
32 :
BaseXML (
"ViewBase", controller ),
67 const void * addr = reinterpret_cast <
const void * > ( & view );
110 list < XmlElement * > nodelist;
113 std::list < XmlElement * > ::const_iterator first = nodelist.begin ();
114 while ( first != nodelist.end () ) {
117 bool ok = element -> attribute (
"ref", ref );
119 int id = element -> getID ();
122 source -> setParentPlotter ( target );
XmlElement * createElement()
Creates a new element node.
void createChild(XmlElement &tag, const ViewBase &view)
Create the child element, i.e.
XmlElement * createElement(const PlotterBase &plotter)
Returns a newly created XmlElement with attributes set for plotter.
double getHeight() const
A shortcut to get size.height.
virtual bool attribute(const std::string &name, bool &value) const =0
Sets value to the attribute name's value.
virtual void getObjects(const XmlElement *element)
Creates an object derived from ViewBase.
XmlController class interface.
PlotterBaseXML class interface.
virtual Rect getDrawRect() const =0
Returns the drawing Rectangle in the devices coordinate system.
std::string m_y
Attribute name for the Y coordinate.
const XmlElement * getNode(const XmlElement *element) const
Returns the single child node of element of the type that can be handled by this object.
A pure virtual base class of XML element wrapper.
void fillNodeList(const XmlElement *element, std::list< XmlElement * > &nodelist)
Fills the nodelist with immediate child nodes of element with nodes that can be handled by this objec...
std::string m_x
Attribute name for the X coordinate.
ViewBaseXML(const ViewBaseXML &)
A private copy constructor in order to avoid copying.
double getWidth() const
A shortcut to get size.width.
bool areDataSourcesSaved(const PlotterBase &plotter)
Returns true if all the NTuple objects used by the plotter are save to or read from a file...
void setId(XmlElement &tag, int id)
Sets the unique identification of the object.
The base class for the PlotterBase hierarchy.
PlotterBase * getPlotter() const
Returns the plotter used by this view.
virtual void appendChild(const XmlNode &child)=0
Appends a child element to the element.
bool areDataSourcesSaved(const ViewBase &view)
Returns true if all the NTuple objects used by the view have been save to or read from a file...
virtual void setDrawRect(float x, float y, float w, float h)=0
Sets the drawing Rectangle in the devices coordinate system.
Class representing a rectangle.
std::string m_w
Attribute name for the width.
XmlController * m_controller
The singleton XML controller object.
PlotterBaseXML * m_plotter_xml
The PlotterBaseXML instance used by this object.
XmlElement class interface.
The abstract base class for views.
std::string m_h
Attribute name for the height.
double getX() const
A shortcut to get origin.X.
virtual PlotterBase * getObject(const XmlElement *element)
Returns the PlotterBase object represented by the element.
A base class of XML element controllers.
A class that is does XML serialization and de-serialization of derived classes of PlotterBase...
~ViewBaseXML()
The destructor.
void connectPlotters(const XmlElement *root)
Connects the plotters that reference each other.
A base class that is the interface between GUI and the XML serialization and deserialization.
ViewBaseXML class interface.
hippodraw::ViewBase class interface
double getY() const
A shortcut to get origin.Y.
ViewBase * createView(PlotterBase *)
Creates a new view for the current PlotterBase object and adds it to the list of views.
hippodraw::PlotterBase class interface.
virtual void setAttribute(const std::string &name, bool value)=0
Sets attribute named name to the int value value.