export_FitterFactory.cxx
Go to the documentation of this file.
1 
12 #ifdef _MSC_VER
13 // nonstandard extension used 'extern' before...
14 # pragma warning(disable:4231)
15 
16 // needs to have dll-interface used by client
17 # pragma warning(disable:4251)
18 
19 // non dll-interface struct
20 # pragma warning(disable:4275)
21 
22 // 'int' : forcing value to bool 'true' or 'false' (performance warning)
23 # pragma warning(disable:4800)
24 #endif
25 
26 // include first to avoid _POSIX_C_SOURCE warning.
27 #include <boost/python.hpp>
28 
29 #include "minimizers/Fitter.h"
31 
32 using std::vector;
33 using namespace boost::python;
34 
35 namespace hippodraw {
36 namespace Python {
37 
38 void
40 {
41  class_ < FitterFactory, bases<>,
42  FitterFactory, boost::noncopyable >
43  ( "FitterFactory",
44  "The factory for returning fitters preloaded with objective functions.",
45  no_init )
46 
47  .def ( "instance", &FitterFactory::instance,
48  return_value_policy < reference_existing_object > (),
49  "instance () -> FitterFactory\n"
50  "\n"
51  "Returns the single instance of the FitterFactory" )
52 
53  .staticmethod( "instance" )
54 
55  .def ( "names", &FitterFactory::names,
56  return_value_policy < copy_const_reference > (),
57  "names () -> sequence\n"
58  "\n"
59  "Returns the names of the available fitters." )
60 
61  .def ( "create", &FitterFactory::create,
62  return_value_policy < manage_new_object > (),
63  "create ( string ) -> Fitter\n"
64  "\n"
65  "Returns the newly created fitter object." )
66 
67  .def ( "setDefault", &FitterFactory::setDefault,
68  "setDefault ( string ) -> None\n"
69  "\n"
70  "Sets the default fitter object. Throws an exception if given\n"
71  "invalid name." )
72  ;
73 
74 }
75 
76 } // namespace Python
77 } // namespace hippodraw

Generated for HippoDraw Class Library by doxygen