#ifndef METHOD_FACTORY_H
#define METHOD_FACTORY_H

#ifdef SWIGPYTHON
class AdvMethodFactory;
#else //  SWIGPYTHON

#include "Header.hh"
#include "AdvMethod.hh"
#include "AdvMovingAverage.hh"
#include "AdvBSpline.hh"
//#include "AdvLevmar.hh"
#include "AdvNewLevmar.hh"
//#include "AdvMultiDataLevmar.hh"
#include "AdvMethodType.hh"

class AdvMethodFactory {

    private:
        static const std::string className; //=std::string("AdvMethodFactory");

    private:
        //static AdvMethodFactory *instance = static_cast<AdvMethodFactory*>(NULL);
        //static AdvMethodFactory *instance = NULL;
        static AdvMethodFactory *instance; // = intial value is NULL

    protected:
        /** cefault constructor */
        AdvMethodFactory();

    public:
        /** return singlton instance */
        static AdvMethodFactory *getInstance();

        AdvMethod *createMethod(const AdvMethodType &type);
        AdvMethod *createMethod(std::string methodName);

};

#endif // SWIGPYTHON

#endif // METHOD_FACTORY_H
