Lines Matching defs:factory
2 pybind11/detail/init.h: init factory function implementation and support code.
36 if (!ptr) throw type_error("pybind11::init(): factory function returned nullptr");
66 // an alias to provide only a single Cpp factory function as long as the Alias can be
91 // Pointer return v1: the factory function returns a class pointer for a registered class.
121 // Pointer return v2: a factory that always returns an alias instance ptr. We simply take over
151 "pybind11::init() return-by-value factory function requires a movable class");
164 "pybind11::init() return-by-alias-value factory function requires a movable alias class");
214 struct factory;
218 struct factory<Func, void_type (*)(), Return(Args...)> {
221 factory(Func &&f) : class_factory(std::forward<Func>(f)) { }
223 // The given class either has no alias or has no separate alias factory;
246 struct factory<CFunc, AFunc, CReturn(CArgs...), AReturn(AArgs...)> {
257 factory(CFunc &&c, AFunc &&a)
260 // The class factory is called when the `self` type passed to `__init__` is the direct
261 // class (i.e. not inherited), the alias factory when `self` is a Python-side subtype.