#include <PlotterBaseXML.h>
Inheritance diagram for PlotterBaseXML:
Definition at line 39 of file PlotterBaseXML.h.
Public Member Functions | |
bool | areDataSourcesSaved (const PlotterBase &plotter) |
Returns true if all the NTuple objects used by the plotter are save to or read from a file. | |
XmlElement * | createElement () |
Creates a new element node. | |
XmlElement * | createElement (const PlotterBase &plotter) |
Returns a newly created XmlElement with attributes set for plotter. | |
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 object. | |
const XmlElement * | getNode (const XmlElement *element) const |
Returns the single child node of element of the type that can be handled by this object. | |
virtual PlotterBase * | getObject (const XmlElement *element) |
Returns the PlotterBase object represented by the element. | |
PlotterBaseXML (XmlController *controller) | |
The only public constructor. | |
virtual const std::string & | tagName () const |
Returns the tag name used by this class. | |
Protected Types | |
typedef std::list< XmlElement * > | NodeList_t |
The container type for element nodes. | |
Protected Member Functions | |
void | createFontObjects (const XmlElement *, PlotterBase *plotter) |
Creates the FontBase objects, if any. | |
PlotterBaseXML (const std::string &, XmlController *controller) | |
A constructor used by derived class to override the node name. | |
void | setId (XmlElement &tag, int id) |
Sets the unique identification of the object. | |
Protected Attributes | |
XmlController * | m_controller |
The singleton XML controller object. | |
const std::string | m_id |
The attribute name for the identification of the object. | |
const std::string | m_tagname |
The tag name used for elements created by this class. | |
const std::string | m_type |
The attribute name for the type of object. | |
Private Member Functions | |
void | createAxisModel (XmlElement &, const PlotterBase &, hippodraw::Axes::Type axis) |
Creates an AxisModel child element for the specified axis. | |
void | createAxisModels (const XmlElement *element, PlotterBase *plotter) |
Re-creates AxisModelBase objects from the XML element. | |
void | createChildren (XmlElement &, const PlotterBase &) |
Creates the children elements. | |
void | createCutChildren (XmlElement &, const CutPlotter &plotter) |
Creates the child elements for the special case when the plotter is a derived class of CutPlotter. | |
void | createFontElement (XmlElement &tag, const XyPlotter &plotter, hippodraw::Axes::Type axis) |
Creates an element for label font. | |
void | createFontElements (XmlElement &tag, const XyPlotter &plotter) |
Creates all the font elements, if needed. | |
PlotterBase * | createPlotter (const XmlElement *element) |
Creates the plotter object from the XML element. | |
void | createTextChildren (XmlElement &, const TextPlotter &plotter) |
Creates the child elements for the special case when the plotter is a TextPlotter. | |
void | getCutTargets (const XmlElement *element, CutPlotter *plotter) |
Searches for and connects up the target DataRep objects of the plotter. | |
void | handleCutPlotter (const XmlElement *element, CutPlotter *plotter) |
Handles the Cut attributes from the XML element. | |
void | handleFunction (const XmlElement *element, DataRep *rep) |
Handles the DataRep object if it is FunctionRep. | |
int | handleTextPlotter (const XmlElement *element, TextPlotter *plotter) |
Handles the TextPlotter special attributes from the XML element. | |
PlotterBaseXML (const PlotterBaseXML &) | |
A private copy constructor in order to avoid copying. | |
Private Attributes | |
std::string | m_axis |
The attribute name of labeling an axis for the AxisModelBase elements. | |
AxisModelXML * | m_axismodel |
The AxisModelXML instance used by this object. | |
DataRepXML * | m_datarep |
The DataRepXML instance used by this object. | |
FontXML * | m_font |
The FontXML instance used by this object. | |
std::string | m_pindex |
The attribute name used to save and restore index of parent DataRep. | |
PointRepXML * | m_pointrep |
The PointRepXML instance used by this object. | |
std::string | m_title |
The attribute name for the plot title. | |
TransformXML * | m_transform_xml |
The TransfromXML instance used by this object. | |
TupleCutXML * | m_tuple_cut_xml |
The TupleCutXML instance used by this object. | |
std::string | m_x_label |
The attribute name for X axis label. | |
std::string | m_y_label |
The attribute name for Y axis label. | |
std::string | m_z_label |
The attribute name for Z axis label. | |
Static Private Attributes | |
static PlotterBaseXML * | s_instance |
The pointer to the singleton object. |
|
The container type for element nodes.
|
|
A private copy constructor in order to avoid copying.
|
|
A constructor used by derived class to override the node name.
Definition at line 68 of file PlotterBaseXML.cxx. References m_axismodel, m_datarep, and m_font. |
|
The only public constructor. The parameter controller must object of class derived from XMLController. Definition at line 50 of file PlotterBaseXML.cxx. References m_axismodel, m_datarep, m_font, m_pointrep, m_transform_xml, and m_tuple_cut_xml. |
|
Returns
Definition at line 78 of file PlotterBaseXML.cxx. References DisplayController::areDataSourcesSaved(), and DisplayController::instance(). Referenced by ViewBaseXML::areDataSourcesSaved(). |
|
Creates an AxisModel child element for the specified axis.
Definition at line 237 of file PlotterBaseXML.cxx. References XmlNode::appendChild(), BaseXML::createElement(), PlotterBase::getAxisModel(), m_axis, m_axismodel, AxisModelXML::setAttributes(), hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z. Referenced by createChildren(). |
|
Re-creates AxisModelBase objects from the XML element.
Definition at line 375 of file PlotterBaseXML.cxx. References BaseXML::fillNodeList(), AxisModelXML::getAxis(), PlotterBase::getAxisModel(), AxisModelBase::getLabelLocation(), AxisModelBase::getScaleLocation(), AxisModelXML::isLog(), m_axis, m_axismodel, AxisModelXML::setAttributes(), PlotterBase::setAxisModel(), std::swap(), and hippodraw::Axes::Z. Referenced by getObject(). |
|
Creates the children elements.
Definition at line 85 of file PlotterBaseXML.cxx. References XmlNode::appendChild(), createAxisModel(), createCutChildren(), DataRepXML::createElement(), TransformXML::createElement(), createFontElements(), createTextChildren(), PlotterBase::getDataRep(), PlotterBase::getNumDataReps(), PlotterBase::getTransform(), PlotterBase::hasAxis(), m_datarep, m_transform_xml, hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z. Referenced by createElement(). |
|
Creates the child elements for the special case when the plotter is a derived class of CutPlotter.
Definition at line 142 of file PlotterBaseXML.cxx. References XmlNode::appendChild(), XmlDocument::createElement(), BaseXML::createElement(), CutPlotter::getCuts(), CutPlotter::getCutTargets(), BaseXML::m_controller, m_tuple_cut_xml, XmlController::m_xml_doc, and XmlElement::setAttribute(). Referenced by createChildren(). |
|
Creates a new element node. Uses the current document as determined by the XMLController. Definition at line 41 of file BaseXML.cxx. References XmlDocument::createElement(), BaseXML::m_tagname, and XmlController::m_xml_doc. Referenced by createAxisModel(), DataRepXML::createChildren(), BinningProjectorXML::createChildren(), AxisModelXML::createChildren(), NTupleXML::createChildren2D(), createCutChildren(), ViewBaseXML::createElement(), TupleCutXML::createElement(), TransformXML::createElement(), PointRepXML::createElement(), createElement(), NTupleXML::createElement(), NTupleProjectorXML::createElement(), MapMatrixProjectorXML::createElement(), HiNTupleXML::createElement(), FunctionProjectorXML::createElement(), DataRepXML::createElement(), ColorXML::createElement(), BinToColorXML::createElement(), BinsBaseXML::createElement(), BinningProjectorXML::createElement(), BinnerAxisXML::createElement(), createFontElement(), and createFontElements(). |
|
Returns a newly created XmlElement with attributes set for plotter.
Definition at line 260 of file PlotterBaseXML.cxx. References createChildren(), BaseXML::createElement(), PlotterBase::getInternalLabel(), PlotterBase::getInternalTitle(), PlotterBase::getParentDataRepIndex(), PlotterBase::getParentPlotter(), BaseXML::m_controller, m_pindex, m_title, BaseXML::m_type, m_x_label, m_y_label, m_z_label, PlotterBase::name(), XmlElement::setAttribute(), BaseXML::setId(), hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z. Referenced by ViewBaseXML::createChild(). |
|
Creates an element for label font.
Definition at line 205 of file PlotterBaseXML.cxx. References XmlNode::appendChild(), BaseXML::createElement(), XyPlotter::labelFont(), m_axis, m_font, hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z. Referenced by createFontElements(). |
|
Creates all the font elements, if needed.
Definition at line 185 of file PlotterBaseXML.cxx. References XmlNode::appendChild(), hippodraw::Axes::convert(), BaseXML::createElement(), createFontElement(), m_axis, m_font, XyPlotter::titleFont(), and num_util::type(). Referenced by createChildren(). |
|
Creates the FontBase objects, if any.
Definition at line 348 of file PlotterBaseXML.cxx. References BaseXML::fillNodeList(), m_axis, BaseXML::m_controller, m_font, and hippodraw::Axes::T. Referenced by getObject(). |
|
Creates the plotter object from the XML element.
Definition at line 405 of file PlotterBaseXML.cxx. References XmlElement::attribute(), Factory< Type >::create(), PlotterFactory::instance(), BaseXML::m_controller, m_pindex, m_title, BaseXML::m_type, m_x_label, m_y_label, m_z_label, PlotterBase::setEnableZ(), num_util::type(), hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z. Referenced by getObject(). |
|
Creates the child elements for the special case when the plotter is a TextPlotter. It adds a element reference the target DataRep of its own TextDataRep object. Definition at line 170 of file PlotterBaseXML.cxx. References XmlNode::appendChild(), XmlDocument::createElement(), TextPlotter::getParentDataRep(), BaseXML::m_controller, XmlController::m_xml_doc, and XmlElement::setAttribute(). Referenced by createChildren(). |
|
Fills the nodelist with immediate child nodes of element with nodes that can be handled by this object.
Definition at line 56 of file BaseXML.cxx. References XmlElement::fillNodeList(), and BaseXML::m_tagname. Referenced by ViewBaseXML::connectPlotters(), createAxisModels(), AxisModelXML::createChildren(), createFontObjects(), BinToColorXML::createObject(), BinsBaseXML::createObject(), XmlController::getDataReps(), getObject(), TupleCutXML::getObjects(), XmlController::getTupleCuts(), XmlController::getViews(), XmlController::openNTuples(), and TupleCutXML::setAttributes(). |
|
Searches for and connects up the target DataRep objects of the plotter.
Definition at line 449 of file PlotterBaseXML.cxx. References CutPlotter::addCutTarget(), XmlElement::fillNodeList(), XmlController::getDataRep(), XmlElement::getID(), and BaseXML::m_controller. Referenced by handleCutPlotter(). |
|
Returns the single child node of element of the type that can be handled by this object. If no such node exists, returns a null pointer. Definition at line 51 of file BaseXML.cxx. References XmlElement::getNode(), and BaseXML::m_tagname. Referenced by PointRepXML::createObject(), DataRepXML::createObject(), getObject(), BinningProjectorXML::getObject(), ViewBaseXML::getObjects(), handleCutPlotter(), and BinningProjectorXML::setBins(). |
|
Returns the PlotterBase object represented by the element.
Definition at line 293 of file PlotterBaseXML.cxx. References FunctionController::addDataRep(), createAxisModels(), createFontObjects(), TransformXML::createObject(), createPlotter(), BaseXML::fillNodeList(), XmlController::getDataRep(), XmlElement::getID(), BaseXML::getNode(), handleCutPlotter(), handleFunction(), handleTextPlotter(), FunctionController::instance(), BaseXML::m_controller, m_datarep, m_transform_xml, and PlotterBase::setTransform(). Referenced by ViewBaseXML::getObjects(). |
|
Handles the Cut attributes from the XML element.
Definition at line 489 of file PlotterBaseXML.cxx. References getCutTargets(), XmlElement::getID(), BaseXML::getNode(), XmlController::getTupleCut(), BaseXML::m_controller, m_pointrep, m_tuple_cut_xml, and CutPlotter::setCuts(). Referenced by getObject(). |
|
Handles the DataRep object if it is FunctionRep.
Definition at line 471 of file PlotterBaseXML.cxx. References XmlController::getDataRep(), XmlElement::getID(), XmlElement::getNode(), BaseXML::m_controller, and FunctionRep::setTarget(). Referenced by getObject(). |
|
Handles the TextPlotter special attributes from the XML element. Returns 1 if successful, 0 otherwise. Definition at line 513 of file PlotterBaseXML.cxx. References XmlController::getDataRep(), XmlElement::getID(), XmlElement::getNode(), BaseXML::m_controller, and TextPlotter::setParentDataRep(). Referenced by getObject(). |
|
Sets the unique identification of the object.
Definition at line 62 of file BaseXML.cxx. References BaseXML::m_id, and XmlElement::setAttribute(). Referenced by ViewBaseXML::createElement(), TupleCutXML::createElement(), createElement(), NTupleProjectorXML::createElement(), MapMatrixProjectorXML::createElement(), HiNTupleXML::createElement(), FunctionProjectorXML::createElement(), DataRepXML::createElement(), BinningProjectorXML::createElement(), PointRepXML::setAttributes(), and NTupleXML::setAttributes(). |
|
Returns the tag name used by this class.
Definition at line 46 of file BaseXML.cxx. References BaseXML::m_tagname. |
|
The attribute name of labeling an axis for the AxisModelBase elements.
Definition at line 68 of file PlotterBaseXML.h. Referenced by createAxisModel(), createAxisModels(), createFontElement(), createFontElements(), and createFontObjects(). |
|
The AxisModelXML instance used by this object.
Definition at line 48 of file PlotterBaseXML.h. Referenced by createAxisModel(), createAxisModels(), and PlotterBaseXML(). |
|
|
The DataRepXML instance used by this object.
Definition at line 51 of file PlotterBaseXML.h. Referenced by createChildren(), getObject(), and PlotterBaseXML(). |
|
The FontXML instance used by this object.
Definition at line 63 of file PlotterBaseXML.h. Referenced by createFontElement(), createFontElements(), createFontObjects(), and PlotterBaseXML(). |
|
The attribute name for the identification of the object.
Definition at line 55 of file BaseXML.h. Referenced by BaseXML::setId(). |
|
The attribute name used to save and restore index of parent DataRep.
Definition at line 89 of file PlotterBaseXML.h. Referenced by createElement(), and createPlotter(). |
|
The PointRepXML instance used by this object.
Definition at line 54 of file PlotterBaseXML.h. Referenced by handleCutPlotter(), and PlotterBaseXML(). |
|
The tag name used for elements created by this class.
Definition at line 48 of file BaseXML.h. Referenced by BaseXML::createElement(), BaseXML::fillNodeList(), BaseXML::getNode(), and BaseXML::tagName(). |
|
The attribute name for the plot title.
Definition at line 72 of file PlotterBaseXML.h. Referenced by createElement(), and createPlotter(). |
|
The TransfromXML instance used by this object.
Definition at line 57 of file PlotterBaseXML.h. Referenced by createChildren(), getObject(), and PlotterBaseXML(). |
|
The TupleCutXML instance used by this object.
Definition at line 60 of file PlotterBaseXML.h. Referenced by createCutChildren(), handleCutPlotter(), and PlotterBaseXML(). |
|
The attribute name for the type of object. Used to create object from one of the classes derived from Factory. Definition at line 52 of file BaseXML.h. Referenced by DataRepXML::createDataRep(), TransformXML::createElement(), createElement(), DataRepXML::createElement(), BinToColorXML::createElement(), BinsBaseXML::createElement(), TransformXML::createObject(), PointRepXML::createObject(), DataRepXML::createObject(), BinToColorXML::createObject(), BinsBaseXML::createObject(), BinnerAxisXML::createObject(), createPlotter(), PointRepXML::setAttributes(), and BinnerAxisXML::setAttributes(). |
|
The attribute name for X axis label.
Definition at line 76 of file PlotterBaseXML.h. Referenced by createElement(), and createPlotter(). |
|
The attribute name for Y axis label.
Definition at line 80 of file PlotterBaseXML.h. Referenced by createElement(), and createPlotter(). |
|
The attribute name for Z axis label.
Definition at line 84 of file PlotterBaseXML.h. Referenced by createElement(), and createPlotter(). |
|
The pointer to the singleton object.
Definition at line 45 of file PlotterBaseXML.h. |