/* * PlotConfigurationLoader.hh * * Created on: 8 nov. 2013 * Author: guillaume */ #ifndef PLOTCONFIGURATIONLOADER_HH_ #define PLOTCONFIGURATIONLOADER_HH_ #include "PlotLogger.hh" #include "tuple" #include "map" #include #include "NodeCfg.hh" #include "AxesNode.hh" #include "TimeAxis.hh" #include "EpochAxis.hh" #include "ColorAxis.hh" #include "DigitalAxis.hh" namespace plot { using namespace AMDA::XMLConfigurator; class DefaultPlotConfiguration; class ColormapManager; class PlotConfigurationLoader { typedef std::tuple NodeLoader; typedef std::map NodeMapLoader; public: PlotConfigurationLoader(); virtual ~PlotConfigurationLoader(); template void load(T* pObject) { AMDA::Parameters::CfgContext ctx; // GetLoader. _nodeLoader = _nodeMapLoader[typeid(T).name()]; // Push object to load ctx.push(pObject); initParser(ctx); } private: void initParser(const AMDA::Parameters::CfgContext&); NodeMapLoader _nodeMapLoader; NodeLoader _nodeLoader; }; class EmptyNode: public NodeGrpCfg { public: EmptyNode() { } virtual ~EmptyNode() { } void proceed(xmlNodePtr, const AMDA::Parameters::CfgContext&) { } }; class RootNode: public NodeGrpCfg { typedef std::tuple NodeLoader; public: RootNode(const NodeLoader& pNodeLoader); virtual ~RootNode(); void proceed(xmlNodePtr pNode, const AMDA::Parameters::CfgContext& pCtx); }; class DefaultNode: public NodeGrpCfg { public: DefaultNode(); virtual ~DefaultNode(); void proceed(xmlNodePtr pNode, const AMDA::Parameters::CfgContext& pCtx); }; class DefaultPageNode: public NodeGrpCfg { public: DefaultPageNode(); virtual ~DefaultPageNode(); void proceed(xmlNodePtr pNode, const AMDA::Parameters::CfgContext& pCtx); }; class DefaultPanelNode: public NodeGrpCfg { public: DefaultPanelNode(); virtual ~DefaultPanelNode(); void proceed(xmlNodePtr pNode, const AMDA::Parameters::CfgContext& pCtx); }; class DefaultDigitalAxisNode: public AnyAxisNode { public: DefaultDigitalAxisNode() : AnyAxisNode() { } virtual ~DefaultDigitalAxisNode() { } void proceed(xmlNodePtr pNode, const AMDA::Parameters::CfgContext& pCtx); }; class DefaultTimeAxisNode: public AnyAxisNode { public: DefaultTimeAxisNode() : AnyAxisNode() { } virtual ~DefaultTimeAxisNode() { } void proceed(xmlNodePtr pNode, const AMDA::Parameters::CfgContext& pCtx); }; class DefaultEpochAxisNode: public AnyAxisNode { public: DefaultEpochAxisNode() : AnyAxisNode() { } virtual ~DefaultEpochAxisNode() { } void proceed(xmlNodePtr pNode, const AMDA::Parameters::CfgContext& pCtx); }; class DefaultColorAxisNode: public AnyAxisNode { public: DefaultColorAxisNode() : AnyAxisNode() { } virtual ~DefaultColorAxisNode() { } void proceed(xmlNodePtr pNode, const AMDA::Parameters::CfgContext& pCtx); }; class ColormapNode: public NodeGrpCfg { public: ColormapNode(); virtual ~ColormapNode(); void proceed(xmlNodePtr pNode, const AMDA::Parameters::CfgContext& pCtx); }; class GrayscaleNode: public NodeGrpCfg { public: GrayscaleNode(); virtual ~GrayscaleNode(); void proceed(xmlNodePtr pNode, const AMDA::Parameters::CfgContext& pCtx); }; class ColorscaleNode: public NodeGrpCfg { public: ColorscaleNode(); virtual ~ColorscaleNode(); void proceed(xmlNodePtr pNode, const AMDA::Parameters::CfgContext& pCtx); }; class ColormapAxisNode: public NodeGrpCfg { public: ColormapAxisNode(); virtual ~ColormapAxisNode(); void proceed(xmlNodePtr pNode, const AMDA::Parameters::CfgContext& pCtx); }; class ColorFileNode: public NodeGrpCfg { public: ColorFileNode(); virtual ~ColorFileNode(); void proceed(xmlNodePtr pNode, const AMDA::Parameters::CfgContext& pCtx); }; //class DefaultPlotConfigsNode: public NodeGrpCfg{ //public: // DefaultPlotConfigsNode(); // virtual ~DefaultPlotConfigsNode(); // // void proceed(xmlNodePtr pNode_, const AMDA::Parameters::CfgContext& context_); //}; } /* namespace plot */ #endif /* PLOTCONFIGURATIONLOADER_HH_ */