AxisTickXML.cxx
Go to the documentation of this file.
1 
12 #include "AxisTickXML.h"
13 
14 #include "XmlElement.h"
15 
16 #include "axes/AxisTick.h"
17 
18 using std::string;
19 
20 namespace hippodraw {
21 
23 AxisTickXML ( XmlController * controller )
24  : BaseXML ( "AxisTick", controller ),
25  m_value ( "value" ),
26  m_label ( "label" )
27 {
28 }
29 
30 void
33  const AxisTick & tick )
34 {
35  double value = tick.value ();
36  tag.setAttribute ( m_value, value );
37 
38  const string & label = tick.content ();
39  tag.setAttribute ( m_label, label );
40 }
41 
42 void
45  const XmlElement * element )
46 
47 {
48  double value;
49  bool ok = element -> attribute ( m_value, value );
50  tick -> setValue ( value );
51 
52  string label;
53  ok = element -> attribute ( m_label, label );
54  tick -> setContent ( label );
55 }
56 
57 } // namespace hippodraw
58 

Generated for HippoDraw Class Library by doxygen