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 "pattern/Factory.h"
00030 #include "reps/PointRepFactory.h"
00031 #include "reps/RepBase.h"
00032
00033 using std::vector;
00034 using namespace boost::python;
00035
00036 namespace hippodraw {
00037 namespace Python {
00038
00039 void
00040 export_Factory_PointRep ()
00041 {
00042 class_ < Factory < RepBase >,
00043 bases <>,
00044 Factory < RepBase >,
00045 boost::noncopyable >
00046 ( "FactoryPointRep",
00047 "A private base class for PointRepFactory.",
00048 no_init )
00049
00050 ;
00051 }
00052
00053 void
00054 export_PointRepFactory ()
00055 {
00056 class_ < PointRepFactory,
00057 bases < Factory < RepBase > >,
00058 PointRepFactory, boost::noncopyable >
00059 ( "PointRepFactory",
00060 "A factory for creating object whose class derive from PointRep.",
00061 no_init )
00062
00063 .def ( "instance", &PointRepFactory::instance,
00064 return_value_policy < reference_existing_object > (),
00065 "instance () -> PointRepFactory\n"
00066 "\n"
00067 "Returns the instance of the PointRepFactory." )
00068
00069 .staticmethod ( "instance" )
00070
00071 .def ( "names", &PointRepFactory::names,
00072 return_value_policy < copy_const_reference > (),
00073 "names () -> sequence\n"
00074 "\n"
00075 "Returns the names of available PointRep classes." )
00076
00077 .def ( "create", &PointRepFactory::create,
00078 return_value_policy < reference_existing_object > (),
00079 "create ( string ) -> PointRep\n"
00080 "\n"
00081 "Returns a PointRep object of type named in string." )
00082 ;
00083
00084 }
00085
00086 }
00087 }