00001
00012 #ifdef _MSC_VER
00013
00014 # pragma warning(disable:4231)
00015
00016
00017 # pragma warning(disable:4251)
00018
00019
00020 # pragma warning(disable:4275)
00021
00022
00023 # pragma warning(disable:4800)
00024 #endif
00025
00026
00027 #include <boost/python.hpp>
00028
00029 #include "minimizers/Fitter.h"
00030 #include "minimizers/FitterFactory.h"
00031
00032 using std::vector;
00033 using namespace boost::python;
00034
00035 namespace hippodraw {
00036 namespace Python {
00037
00038 void
00039 export_FitterFactory()
00040 {
00041 class_ < FitterFactory, bases<>,
00042 FitterFactory, boost::noncopyable >
00043 ( "FitterFactory",
00044 "The factory for returning fitters preloaded with objective functions.",
00045 no_init )
00046
00047 .def ( "instance", &FitterFactory::instance,
00048 return_value_policy < reference_existing_object > (),
00049 "instance () -> FitterFactory\n"
00050 "\n"
00051 "Returns the single instance of the FitterFactory" )
00052
00053 .staticmethod( "instance" )
00054
00055 .def ( "names", &FitterFactory::names,
00056 return_value_policy < copy_const_reference > (),
00057 "names () -> sequence\n"
00058 "\n"
00059 "Returns the names of the available fitters." )
00060
00061 .def ( "create", &FitterFactory::create,
00062 return_value_policy < manage_new_object > (),
00063 "create ( string ) -> Fitter\n"
00064 "\n"
00065 "Returns the newly created fitter object." )
00066
00067 .def ( "setDefault", &FitterFactory::setDefault,
00068 "setDefault ( string ) -> None\n"
00069 "\n"
00070 "Sets the default fitter object. Throws an exception if given\n"
00071 "invalid name." )
00072 ;
00073
00074 }
00075
00076 }
00077 }