export_FunctionFactory.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 "functions/FunctionBase.h"
31 
32 using std::vector;
33 using namespace boost::python;
34 
35 namespace hippodraw {
36 namespace Python {
37 
38 void
40 {
41  class_ < FunctionFactory, bases<>,
42  FunctionFactory, boost::noncopyable >
43  ( "FunctionFactory",
44  "The factory for creating derived classes of FunctionBase.",
45  no_init )
46 
47  .def ( "instance", &FunctionFactory::instance,
48  return_value_policy < reference_existing_object > (),
49  "instance () -> FunctionFactory\n"
50  "\n"
51  "Returns the single instance of the FunctionFactory." )
52 
53  .staticmethod( "instance" )
54 
55  .def ( "names", &FunctionFactory::names,
56  return_value_policy < copy_const_reference > (),
57  "names () -> sequence\n"
58  "\n"
59  "Returns the names of the available FunctinBase derived classes." )
60 
61  .def ( "create", &FunctionFactory::create,
62  return_value_policy < reference_existing_object > (),
63  "create ( string ) -> FunctionBase\n"
64  "\n"
65  "Returns the newly created object derived from FunctionBase." )
66 
67  .def ( "add", &FunctionFactory::add,
68  with_custodian_and_ward_postcall < 1, 2 > (),
69  "add ( FunctionBase ) -> None\n"
70  "\n"
71  "Adds the function to the factory." )
72 
73  ;
74 
75 }
76 
77 } // namespace Python
78 } // namespace hippodraw

Generated for HippoDraw Class Library by doxygen