• Home
  • Raw
  • Download

Lines Matching full:extra

68     template <typename Return, typename... Args, typename... Extra>  in PYBIND11_NAMESPACE_BEGIN()
69 cpp_function(Return (*f)(Args...), const Extra&... extra) { in PYBIND11_NAMESPACE_BEGIN()
70 initialize(f, f, extra...); in PYBIND11_NAMESPACE_BEGIN()
74 template <typename Func, typename... Extra, in PYBIND11_NAMESPACE_BEGIN()
76 cpp_function(Func &&f, const Extra&... extra) { in PYBIND11_NAMESPACE_BEGIN()
78 (detail::function_signature_t<Func> *) nullptr, extra...); in PYBIND11_NAMESPACE_BEGIN()
82 template <typename Return, typename Class, typename... Arg, typename... Extra> in PYBIND11_NAMESPACE_BEGIN()
83 cpp_function(Return (Class::*f)(Arg...), const Extra&... extra) { in PYBIND11_NAMESPACE_BEGIN()
85 (Return (*) (Class *, Arg...)) nullptr, extra...); in PYBIND11_NAMESPACE_BEGIN()
91 template <typename Return, typename Class, typename... Arg, typename... Extra> in PYBIND11_NAMESPACE_BEGIN()
92 cpp_function(Return (Class::*f)(Arg...)&, const Extra&... extra) { in PYBIND11_NAMESPACE_BEGIN()
94 (Return (*) (Class *, Arg...)) nullptr, extra...); in PYBIND11_NAMESPACE_BEGIN()
98 template <typename Return, typename Class, typename... Arg, typename... Extra> in PYBIND11_NAMESPACE_BEGIN()
99 cpp_function(Return (Class::*f)(Arg...) const, const Extra&... extra) { in PYBIND11_NAMESPACE_BEGIN()
101 (Return (*)(const Class *, Arg ...)) nullptr, extra...); in PYBIND11_NAMESPACE_BEGIN()
107 template <typename Return, typename Class, typename... Arg, typename... Extra> in PYBIND11_NAMESPACE_BEGIN()
108 cpp_function(Return (Class::*f)(Arg...) const&, const Extra&... extra) { in PYBIND11_NAMESPACE_BEGIN()
110 (Return (*)(const Class *, Arg ...)) nullptr, extra...); in PYBIND11_NAMESPACE_BEGIN()
130 template <typename Func, typename Return, typename... Args, typename... Extra> in PYBIND11_NAMESPACE_BEGIN()
131 void initialize(Func &&f, Return (*)(Args...), const Extra&... extra) { in PYBIND11_NAMESPACE_BEGIN()
135 … /* Store the function including any extra state it might have (e.g. a lambda capture object) */ in PYBIND11_NAMESPACE_BEGIN()
166 …static_assert(expected_num_args<Extra...>(sizeof...(Args), cast_in::has_args, cast_in::has_kwargs), in PYBIND11_NAMESPACE_BEGIN()
178 process_attributes<Extra...>::precall(call); in PYBIND11_NAMESPACE_BEGIN()
189 using Guard = extract_guard_t<Extra...>; in PYBIND11_NAMESPACE_BEGIN()
196 process_attributes<Extra...>::postcall(call, result); in PYBIND11_NAMESPACE_BEGIN()
202 process_attributes<Extra...>::init(extra..., rec); in PYBIND11_NAMESPACE_BEGIN()
205 constexpr bool has_kw_only_args = any_of<std::is_same<kw_only, Extra>...>::value, in PYBIND11_NAMESPACE_BEGIN()
206 has_pos_only_args = any_of<std::is_same<pos_only, Extra>...>::value, in PYBIND11_NAMESPACE_BEGIN()
208 has_arg_annotations = any_of<is_keyword<Extra>...>::value; in PYBIND11_NAMESPACE_BEGIN()
596 extra tuple or dict at the end of the positional arguments. in PYBIND11_NAMESPACE_BEGIN()
849 "conversions are optional and require extra headers to be included\n" in PYBIND11_NAMESPACE_BEGIN()
958 details on the ``Extra&& ... extra`` argument, see section :ref:`extras`.
960 template <typename Func, typename... Extra>
961 module_ &def(const char *name_, Func &&f, const Extra& ... extra) { in def() argument
963 sibling(getattr(*this, name_, none())), extra...); in def()
1265 template <typename... Extra>
1266 class_(handle scope, const char *name, const Extra &... extra) {
1271 none_of<is_pyobject<Extra>...>::value || // no base class arguments, or:
1272 ( constexpr_sum(is_pyobject<Extra>::value...) == 1 && // Exactly one base
1274 … none_of<std::is_same<multiple_inheritance, Extra>...>::value), // no multiple_inheritance attr
1294 process_attributes<Extra...>::init(extra..., &record);
1314 template <typename Func, typename... Extra>
1315 class_ &def(const char *name_, Func&& f, const Extra&... extra) {
1317 sibling(getattr(*this, name_, none())), extra...);
1322 template <typename Func, typename... Extra> class_ &
1323 def_static(const char *name_, Func &&f, const Extra&... extra) {
1327 sibling(getattr(*this, name_, none())), extra...);
1332 template <detail::op_id id, detail::op_type ot, typename L, typename R, typename... Extra>
1333 class_ &def(const detail::op_<id, ot, L, R> &op, const Extra&... extra) {
1334 op.execute(*this, extra...);
1338 template <detail::op_id id, detail::op_type ot, typename L, typename R, typename... Extra>
1339 class_ & def_cast(const detail::op_<id, ot, L, R> &op, const Extra&... extra) {
1340 op.execute_cast(*this, extra...);
1344 template <typename... Args, typename... Extra>
1345 class_ &def(const detail::initimpl::constructor<Args...> &init, const Extra&... extra) {
1346 init.execute(*this, extra...);
1350 template <typename... Args, typename... Extra>
1351 class_ &def(const detail::initimpl::alias_constructor<Args...> &init, const Extra&... extra) {
1352 init.execute(*this, extra...);
1356 template <typename... Args, typename... Extra>
1357 class_ &def(detail::initimpl::factory<Args...> &&init, const Extra&... extra) {
1358 std::move(init).execute(*this, extra...);
1362 template <typename... Args, typename... Extra>
1363 class_ &def(detail::initimpl::pickle_factory<Args...> &&pf, const Extra &...extra) {
1364 std::move(pf).execute(*this, extra...);
1395 template <typename C, typename D, typename... Extra>
1396 class_ &def_readwrite(const char *name, D C::*pm, const Extra&... extra) {
1400 def_property(name, fget, fset, return_value_policy::reference_internal, extra...);
1404 template <typename C, typename D, typename... Extra>
1405 class_ &def_readonly(const char *name, const D C::*pm, const Extra& ...extra) {
1408 def_property_readonly(name, fget, return_value_policy::reference_internal, extra...);
1412 template <typename D, typename... Extra>
1413 class_ &def_readwrite_static(const char *name, D *pm, const Extra& ...extra) {
1416 def_property_static(name, fget, fset, return_value_policy::reference, extra...);
1420 template <typename D, typename... Extra>
1421 class_ &def_readonly_static(const char *name, const D *pm, const Extra& ...extra) {
1423 def_property_readonly_static(name, fget, return_value_policy::reference, extra...);
1428 template <typename Getter, typename... Extra>
1429 class_ &def_property_readonly(const char *name, const Getter &fget, const Extra& ...extra) {
1431 return_value_policy::reference_internal, extra...);
1435 template <typename... Extra>
1436 … class_ &def_property_readonly(const char *name, const cpp_function &fget, const Extra& ...extra) {
1437 return def_property(name, fget, nullptr, extra...);
1441 template <typename Getter, typename... Extra>
1442 …class_ &def_property_readonly_static(const char *name, const Getter &fget, const Extra& ...extra) {
1443 …n def_property_readonly_static(name, cpp_function(fget), return_value_policy::reference, extra...);
1447 template <typename... Extra>
1448 … &def_property_readonly_static(const char *name, const cpp_function &fget, const Extra& ...extra) {
1449 return def_property_static(name, fget, nullptr, extra...);
1453 template <typename Getter, typename Setter, typename... Extra>
1454 …s_ &def_property(const char *name, const Getter &fget, const Setter &fset, const Extra& ...extra) {
1455 return def_property(name, fget, cpp_function(method_adaptor<type>(fset)), extra...);
1457 template <typename Getter, typename... Extra>
1458 …f_property(const char *name, const Getter &fget, const cpp_function &fset, const Extra& ...extra) {
1460 return_value_policy::reference_internal, extra...);
1464 template <typename... Extra>
1465 …erty(const char *name, const cpp_function &fget, const cpp_function &fset, const Extra& ...extra) {
1466 return def_property_static(name, fget, fset, is_method(*this), extra...);
1470 template <typename Getter, typename... Extra>
1471 …rty_static(const char *name, const Getter &fget, const cpp_function &fset, const Extra& ...extra) {
1472 …turn def_property_static(name, cpp_function(fget), fset, return_value_policy::reference, extra...);
1476 template <typename... Extra>
1477 …atic(const char *name, const cpp_function &fget, const cpp_function &fset, const Extra& ...extra) {
1478 static_assert( 0 == detail::constexpr_sum(std::is_base_of<arg, Extra>::value...),
1483 …char *doc_prev = rec_fget->doc; /* 'extra' field may include a property-specific documentation str…
1484 detail::process_attributes<Extra...>::init(extra..., rec_fget);
1492 detail::process_attributes<Extra...>::init(extra..., rec_fset);
1776 template <typename... Extra>
1777 enum_(const handle &scope, const char *name, const Extra&... extra)
1778 : class_<Type>(scope, name, extra...), m_base(*this, scope) {
1779 constexpr bool is_arithmetic = detail::any_of<std::is_same<arithmetic, Extra>...>::value;
1894 typename... Extra>
1895 iterator make_iterator(Iterator first, Sentinel last, Extra &&... extra) {
1911 }, std::forward<Extra>(extra)..., Policy);
1923 typename... Extra>
1924 iterator make_key_iterator(Iterator first, Sentinel last, Extra &&... extra) {
1940 }, std::forward<Extra>(extra)..., Policy);
1949 typename Type, typename... Extra> iterator make_iterator(Type &value, Extra&&... extra) {
1950 return make_iterator<Policy>(std::begin(value), std::end(value), extra...);
1956 … typename Type, typename... Extra> iterator make_key_iterator(Type &value, Extra&&... extra) {
1957 return make_key_iterator<Policy>(std::begin(value), std::end(value), extra...);