41 INLINE Type *make_instance(
const std::string &type_name,
49 make_instance_more_general(
const std::string &type_name,
53 void *user_data =
nullptr);
A Factory can be used to create an instance of a particular subclass of some general base class.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
A Factory can be used to create an instance of a particular subclass of some general base class.
Type * make_instance_more_general(TypeHandle handle, const FactoryParams ¶ms=FactoryParams())
Attempts to create an instance of the type requested, or some base type of the type requested.
Type * make_instance(TypeHandle handle, const FactoryParams ¶ms=FactoryParams())
Attempts to create a new instance of some class of the indicated type, or some derivative if necessar...
void register_factory(TypeHandle handle, CreateFunc *func, void *user_data=nullptr)
Registers a new kind of thing the Factory will be able to create.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.