00001
00002
00014 #ifndef _PlotterBaseXML_H_
00015 #define _PlotterBaseXML_H_
00016
00017 #include "BaseXML.h"
00018
00019 #include "axes/AxesType.h"
00020
00021 class AxisModelXML;
00022 class CutPlotter;
00023 class DataRep;
00024 class DataRepXML;
00025 class FontXML;
00026 class PlotterBase;
00027 class PointRepXML;
00028 class TextPlotter;
00029 class TransformXML;
00030 class TupleCutXML;
00031 class XyPlotter;
00032
00039 class MDL_HIPPOPLOT_API PlotterBaseXML : public BaseXML
00040 {
00041
00042 private:
00043
00045 static PlotterBaseXML * s_instance;
00046
00048 AxisModelXML * m_axismodel;
00049
00051 DataRepXML * m_datarep;
00052
00054 PointRepXML * m_pointrep;
00055
00057 TransformXML * m_transform_xml;
00058
00060 TupleCutXML * m_tuple_cut_xml;
00061
00063 FontXML * m_font;
00064
00068 std::string m_axis;
00069
00072 std::string m_title;
00073
00076 std::string m_x_label;
00077
00080 std::string m_y_label;
00081
00084 std::string m_z_label;
00085
00089 std::string m_pindex;
00090
00092 PlotterBaseXML ( const PlotterBaseXML & );
00093
00095 void createAxisModel ( XmlElement &, const PlotterBase &,
00096 hippodraw::Axes::Type axis );
00097
00099 void createAxisModels ( const XmlElement * element, PlotterBase * plotter );
00100
00103 void createFontElements ( XmlElement & tag, const XyPlotter & plotter );
00104
00107 void createFontElement ( XmlElement & tag,
00108 const XyPlotter & plotter,
00109 hippodraw::Axes::Type axis );
00110
00112 void createChildren ( XmlElement &, const PlotterBase & );
00113
00117 void createCutChildren ( XmlElement &, const CutPlotter & plotter );
00118
00122 void createTextChildren ( XmlElement &, const TextPlotter & plotter );
00123
00125 PlotterBase * createPlotter ( const XmlElement * element );
00126
00129 void handleCutPlotter ( const XmlElement * element,
00130 CutPlotter * plotter );
00131
00133 void handleFunction ( const XmlElement * element, DataRep * rep );
00134
00137 int handleTextPlotter ( const XmlElement * element, TextPlotter * plotter );
00138
00141 void getCutTargets ( const XmlElement * element, CutPlotter * plotter );
00142
00143 protected:
00144
00146 PlotterBaseXML ( const std::string &, XmlController * controller );
00147
00150 void createFontObjects ( const XmlElement *, PlotterBase * plotter );
00151
00152 public:
00153
00156 PlotterBaseXML ( XmlController * controller );
00157
00160 bool areDataSourcesSaved ( const PlotterBase & plotter );
00161
00164 XmlElement * createElement ( const PlotterBase & plotter );
00165
00167 virtual PlotterBase * getObject ( const XmlElement * element );
00168
00169 };
00170
00171 #endif // _PlotterBaseXML_H_