ViewBaseXML Class Reference

A class XML creation and parsing of XmlElement for ViewBase class. More...

#include <ViewBaseXML.h>

Inheritance diagram for ViewBaseXML:

Inheritance graph
[legend]
Collaboration diagram for ViewBaseXML:

Collaboration graph
[legend]

List of all members.

Public Member Functions

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.
void connectPlotters (const XmlElement *root)
 Connects the plotters that reference each other.
XmlElementcreateElement ()
 Creates a new element node.
XmlElementcreateElement (const ViewBase &view)
 Returns a newly created XmlElement with attributes set for view.
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 XmlElementgetNode (const XmlElement *element) const
 Returns the single child node of element of the type that can be handled by this object.
virtual void getObjects (const XmlElement *element)
 Creates an object derived from ViewBase.
virtual const std::string & tagName () const
 Returns the tag name used by this class.
 ViewBaseXML (XmlController *)
 A default constructor for avoiding creation except by itself or with derived classes.
 ~ViewBaseXML ()
 The destructor.

Protected Types

typedef std::list< XmlElement * > NodeList_t
 The container type for element nodes.

Protected Member Functions

void setId (XmlElement &tag, int id)
 Sets the unique identification of the object.

Protected Attributes

XmlControllerm_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 createChild (XmlElement &tag, const ViewBase &view)
 Create the child element, i.e.
 ViewBaseXML (const ViewBaseXML &)
 A private copy constructor in order to avoid copying.

Private Attributes

std::string m_h
 Attribute name for the height.
PlotterBaseXMLm_plotter_xml
 The PlotterBaseXML instance used by this object.
std::string m_w
 Attribute name for the width.
std::string m_x
 Attribute name for the X coordinate.
std::string m_y
 Attribute name for the Y coordinate.


Detailed Description

A class XML creation and parsing of XmlElement for ViewBase class.

Author:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Definition at line 29 of file ViewBaseXML.h.


Member Typedef Documentation

typedef std::list< XmlElement * > NodeList_t [protected, inherited]

The container type for element nodes.

Definition at line 47 of file BaseXML.h.


Constructor & Destructor Documentation

ViewBaseXML ( const ViewBaseXML  )  [private]

A private copy constructor in order to avoid copying.

ViewBaseXML ( XmlController controller  ) 

A default constructor for avoiding creation except by itself or with derived classes.

Definition at line 31 of file ViewBaseXML.cxx.

References ViewBaseXML::m_plotter_xml.

~ViewBaseXML (  ) 

The destructor.

Definition at line 42 of file ViewBaseXML.cxx.

References ViewBaseXML::m_plotter_xml.


Member Function Documentation

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.

Definition at line 47 of file ViewBaseXML.cxx.

References PlotterBaseXML::areDataSourcesSaved(), ViewBase::getPlotter(), and ViewBaseXML::m_plotter_xml.

Referenced by XmlController::areDataSourcesSaved().

void connectPlotters ( const XmlElement root  ) 

Connects the plotters that reference each other.

Definition at line 108 of file ViewBaseXML.cxx.

References BaseXML::fillNodeList(), BaseXML::m_controller, and ViewBaseXML::m_plotter_xml.

void createChild ( XmlElement tag,
const ViewBase view 
) [private]

Create the child element, i.e.

one of the PlotterBase.

Definition at line 54 of file ViewBaseXML.cxx.

References XmlNode::appendChild(), PlotterBaseXML::createElement(), ViewBase::getPlotter(), and ViewBaseXML::m_plotter_xml.

Referenced by ViewBaseXML::createElement().

XmlElement * createElement (  )  [inherited]

XmlElement * createElement ( const ViewBase view  ) 

void fillNodeList ( const XmlElement element,
std::list< XmlElement * > &  nodelist 
) [inherited]

const XmlElement * getNode ( const XmlElement element  )  const [inherited]

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 53 of file BaseXML.cxx.

References XmlElement::getNode(), and BaseXML::m_tagname.

Referenced by PointRepXML::createObject(), DataRepXML::createObject(), PlotterBaseXML::getObject(), BinningProjectorXML::getObject(), ViewBaseXML::getObjects(), and BinningProjectorXML::setBins().

void getObjects ( const XmlElement element  )  [virtual]

void setId ( XmlElement tag,
int  id 
) [protected, inherited]

const string & tagName (  )  const [virtual, inherited]

Returns the tag name used by this class.

Definition at line 48 of file BaseXML.cxx.

References BaseXML::m_tagname.


Member Data Documentation

XmlController* m_controller [protected, inherited]

std::string m_h [private]

Attribute name for the height.

Definition at line 44 of file ViewBaseXML.h.

Referenced by ViewBaseXML::createElement(), and ViewBaseXML::getObjects().

const std::string m_id [protected, inherited]

The attribute name for the identification of the object.

Definition at line 57 of file BaseXML.h.

Referenced by BaseXML::setId().

const std::string m_tagname [protected, inherited]

The tag name used for elements created by this class.

Definition at line 50 of file BaseXML.h.

Referenced by BaseXML::createElement(), BaseXML::fillNodeList(), BaseXML::getNode(), and BaseXML::tagName().

const std::string m_type [protected, inherited]

std::string m_w [private]

Attribute name for the width.

Definition at line 41 of file ViewBaseXML.h.

Referenced by ViewBaseXML::createElement(), and ViewBaseXML::getObjects().

std::string m_x [private]

Attribute name for the X coordinate.

Definition at line 35 of file ViewBaseXML.h.

Referenced by ViewBaseXML::createElement(), and ViewBaseXML::getObjects().

std::string m_y [private]

Attribute name for the Y coordinate.

Definition at line 38 of file ViewBaseXML.h.

Referenced by ViewBaseXML::createElement(), and ViewBaseXML::getObjects().


The documentation for this class was generated from the following files:

Generated for HippoDraw Class Library by doxygen