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