14 #include "msdevstudio/MSconfig.h" 37 :
BaseXML (
"PointRep", controller ),
40 a_xerror (
"xerror" ),
41 a_yerror (
"yerror" ),
43 a_value_transform (
"value_transform" )
68 tag -> appendChild ( *element );
80 const void * addr = reinterpret_cast <
const void * > ( & rep );
88 string value = rep.
xError() ?
"yes" :
"no";
90 value = rep.
yError() ?
"yes" :
"no";
106 rep = factory->
create ( type );
109 rep = factory->
create ( type );
112 if ( rep == 0 )
return 0;
119 if ( btc_element != 0 ) {
121 rep -> setValueTransform ( btc );
128 unsigned int style = 0;
129 ok = element -> attribute (
a_style, style );
130 if ( ok ) rep -> setStyle ( style );
132 string xerror =
"no";
134 if ( xerror ==
"yes" ) {
138 string yerror =
"no";
140 if ( yerror ==
"yes" ) {
156 BinToColor * btc = factory -> create ( transform );
157 rep -> setValueTransform ( btc );
hippodraw::RepBase class interface
virtual bool attribute(const std::string &name, bool &value) const =0
Sets value to the attribute name's value.
const std::string & getText() const
Gets the text.
ColorXML class interface.
XmlController * m_controller
The singleton XML controller object.
const std::string & name() const
Returns the name of the representation.
A base class that is the interface between GUI and the XML serialization and deserialization.
virtual void setColor(const Color &)
Sets the color of the representation.
void setAttributes(XmlElement &tag, const RepBase &rep)
Sets the attributes of a PointRep element tag.
virtual void setSize(float value)
Sets the size of the representation.
static PointRepFactory * instance()
Returns a pointer to the singleton instance.
virtual bool yError() const
Returns true if the point representation displays error on the Y axis.
Color * createObject(const XmlElement *element)
Sets the attributes of the object from the element values.
RepBase * createObject(const XmlElement *element)
Creates an object derived from RepBase from information in the XmlElement.
hippodraw::BinToColor class interface
A base class of XML element controllers.
const XmlElement * getNode(const XmlElement *element) const
Returns the single child node of element of the type that can be handled by this object.
const std::string m_type
The attribute name for the type of object.
static BinToColorFactory * instance()
Returns a pointer to the singleton instance.
XmlElement * createElement(const Color &color)
Create a Color XML element.
PointRepXML class interface.
A singleton class that is does XML serialization and deserialization of derived classes of Color with...
void setText(const std::string &text)
Sets the text.
PointRepXML(const PointRepXML &)
A private copy constructor in order to avoid copying.
virtual unsigned int getStyle() const
Returns the style of the point representation.
std::string a_value_transform
The type of value transform.
A factory for textual representations.
intp size(numeric::array arr)
The base class for the point representation hierarchy.
virtual bool xError() const
Returns true if the point representation displays error on the X axis.
Type * create(const std::string &name)
Creates a new object from a prototype named name.
A Color class for creating the color object following the standard RGB color space.
BinToColorFactory class interface.
virtual void setAttribute(const std::string &name, bool value)=0
Sets attribute named name to the int value value.
std::string a_yerror
The y error attribute name.
PointRepFactory class interface.
PyArray_TYPES type(numeric::array arr)
float size() const
Returns the size of the representation.
BinToColorXML * m_bintocolor_xml
The BinToColorXML instance used by this object.
std::string a_text
The text attribute name.
hippodraw::TextRepFactory class interface
A factory for creation of objects whose class is derived from BinToColor.
virtual const BinToColor * getValueTransform() const
Returns the value transform.
A pure virtual base class of XML element wrapper.
A singleton class that is does XML serialization and deserialization of derived classes of BinToColor...
An exception class that is thrown when the factory fails to find the request class by its name...
virtual const Color & getColor() const
Get the color of the representation.
BinToColorXML class interface.
std::string a_style
The style attribute name.
~PointRepXML()
The destructor.
static TextRepFactory * instance()
Returns a pointer to the singleton instance.
XmlController class interface.
A factory for creation of objects whose class is derived from PointRepBase.
std::string a_xerror
The x error attribute name.
std::string a_size
The size attribute name.
void setId(XmlElement &tag, int id)
Sets the unique identification of the object.
XmlElement class interface.
XmlElement * createElement()
Creates a new element node.
The base class for the value to the color transformation.
virtual void setErrorOn(hippodraw::Axes::Type axis, bool yes=true)
Sets the error representation on specified axis, if any, to yes.
virtual void appendChild(const XmlNode &child)=0
Appends a child element to the element.
ColorXML * m_color_xml
The ColorXML instance used by this object.