Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

export_FunctionFactory.cxx

Go to the documentation of this file.
00001 
00012 #ifdef _MSC_VER
00013 // nonstandard extension used 'extern' before...
00014 # pragma warning(disable:4231)  
00015 
00016 // needs to have dll-interface used by client
00017 # pragma warning(disable:4251)  
00018 
00019 // non dll-interface struct
00020 # pragma warning(disable:4275)  
00021 
00022 // 'int' : forcing value to bool 'true' or 'false' (performance warning)
00023 # pragma warning(disable:4800)  
00024 #endif
00025 
00026 #include "functions/FunctionBase.h"
00027 #include "functions/FunctionFactory.h"
00028 
00029 #include <boost/python.hpp>
00030 
00031 using std::vector;
00032 using namespace boost::python;
00033 
00034 namespace hippodraw {
00035 namespace Python {
00036 
00037 void 
00038 export_FunctionFactory()
00039 {
00040   class_ < FunctionFactory, bases<>,
00041     FunctionFactory, boost::noncopyable >
00042     ( "FunctionFactory",
00043       "The factory for creating derived classes of FunctionBase.",
00044       no_init )
00045 
00046     .def ( "instance",  &FunctionFactory::instance,
00047            return_value_policy < reference_existing_object >  (),
00048            "instance () -> FunctionFactory\n"
00049            "\n"
00050            "Returns the single instance of the FunctionFactory." )
00051 
00052     .staticmethod( "instance" )
00053 
00054     .def ( "names", &FunctionFactory::names,
00055            return_value_policy < copy_const_reference > (),
00056            "names () -> sequence\n"
00057            "\n"
00058            "Returns the names of the available FunctinBase derived classes." )
00059 
00060     .def ( "create", &FunctionFactory::create,
00061            return_value_policy < reference_existing_object > (),
00062            "create ( string ) -> FunctionBase\n"
00063            "\n"
00064            "Returns the newly created object derived from FunctionBase." )
00065 
00066     .def ( "add", &FunctionFactory::add,
00067            "add ( FunctionBase ) -> None\n"
00068            "\n"
00069            "Adds the function to the factory." )
00070 
00071     ;
00072 
00073 }
00074 
00075 } // namespace Python
00076 } // namespace hippodraw

Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3