12#include <boost/python/class.hpp>
13#include <boost/python/return_value_policy.hpp>
24 class_<UnitFactoryImpl, boost::noncopyable>(
"UnitFactoryImpl", no_init)
26 "Creates a named unit if it exists in the factory")
29 "Returns a list of units available from the factory")
31 .def(
"Instance", &UnitFactory::Instance, return_value_policy<reference_existing_object>(),
32 "Returns a reference to the UnitFactory singleton")
33 .staticmethod(
"Instance");
#define GET_POINTER_SPECIALIZATION(TYPE)
void export_UnitFactory()
virtual std::shared_ptr< Unit > create(const std::string &className) const
Creates a new instance of the class with the given name.
virtual const std::vector< std::string > getKeys() const
Returns the keys in the map.
Manage the lifetime of a class intended to be a singleton.
Creates instances of concrete units.