PlotFunctionNode.hh 1.57 KB

#ifndef PlotFunctionNODE_HH_
#define PlotFunctionNODE_HH_

#include <boost/smart_ptr/shared_ptr.hpp>
#include <libxml/tree.h>

#include "AbstractPanelPlotNode.hh"
#include "Panel.hh"
#include "PanelPlotOutput.hh"
#include "PlotOutput.hh"

namespace plot
{
/**
 * xml node name, this name is used in both config and request xml files.
 */
#define PlotFunction_NODENAME "plotFunction"
#define PlotFunction_Abscisse "abscisse"
#define PlotFunction_Scale_Abscisse "scale_abscisse"
#define PlotFunction_Scale_Ordonnee "scale_ordonnee"
#define PlotFunction_Abscisse_Frequency "Frequency"
#define PlotFunction_Abscisse_Period "Period"
#define PlotFunction_Abscisse_Time "Time"
#define PlotFunctuion_Type "type"
#define PlotFunctuion_Type_FFT "FFT"
#define PlotFunctuion_Type_SUM "SUM"
#define PlotFunctuion_Type_AVG "AVG"
#define PlotFunctuion_Params_Nb_Points "param_nb_points"
#define PlotFunction_Linear "Linear"
#define PlotFunction_Log "Log"

    class PlotFunctionNode : public plot::AbstractPanelPlotNode
    {
    public:
        PlotFunctionNode();
        virtual ~PlotFunctionNode();

    protected:
        /**
         * @overload plot::AbstractPanelPlotNode::proceed
         */
        boost::shared_ptr<PanelPlotOutput> proceed(xmlNodePtr, PlotOutput *, Panel *);

    private:
        /**
         * constant to uniquely identify this node in the registry
         */
        static const std::string NODENAME;
        /**
         * artificial special attribute to force registering node.
         */
        static std::string _key;
    };

} // namespace plot

#endif /* TIMEPLOTNODE_HH_ */