diff --git a/doc/v2/class.html b/doc/v2/class.html index d2e2d032..768a1444 100644 --- a/doc/v2/class.html +++ b/doc/v2/class.html @@ -64,41 +64,6 @@ bases synopsis - -
Class template init
- -
-
-
Class template - init synopsis
- -
Class init - constructors
- -
init-expressions
-
-
- -
Class template - optional
- -
-
-
Class template - optional synopsis
-
-
- -
Class template - init_with_call_policies
- -
-
-
Class - template init_with_call_policies synopsis
-
-
@@ -208,14 +173,14 @@ HeldType instance, as shown in this example. This argument is not included in the init-expression passed to def(init_expr), below, nor is - it passed explicitly by users when Python instances of T - are created. This idiom allows C++ virtual functions which will be - overridden in Python to access the Python object so the Python method - can be invoked. Boost.Python automatically registers additional - converters which allow wrapped instances of T to be passed - to wrapped C++ functions expecting HeldType + "init.html#init-expressions">init-expression passed to def(init_expr), below, + nor is it passed explicitly by users when Python instances of + T are created. This idiom allows C++ virtual functions + which will be overridden in Python to access the Python object so the + Python method can be invoked. Boost.Python automatically registers + additional converters which allow wrapped instances of T + to be passed to wrapped C++ functions expecting HeldType arguments.
  • Because Boost.Python will always allow wrapped instances of @@ -247,7 +212,7 @@ namespace boost { namespace python { template <class T - , class Bases = bases<> + , class Bases = bases<> , class HeldType = T , class NonCopyable = unspecified > @@ -326,7 +291,7 @@ class_(char const* name, char const* docstring, Init init_spec); ntbs. If init_spec is supplied, it must be either the special enumeration constant no_init or an init-expression compatible with + "init.html#init-expression">init-expression compatible with T.
    Effects: Constructs a class_ object holding a @@ -370,10 +335,10 @@ class_& def(Init init_expr);
    Requires: init_expr is the result of an init-expression compatible with + href="init.html#init-expression">init-expression compatible with T.
    -
    Effects: For each valid +
    Effects: For each valid prefix P of Init, adds an __init__(...) function overload to the extension class accepting P as arguments. Each overload @@ -414,9 +379,9 @@ class_& def(char const* name, Fn fn, A1 const& a1, A2 const& a2, A3
  • If a1 is the result of an overload-dispatch-expression, - only the second is allowed and fn must be a pointer to - function or pointer to member function whose signature is - compatible with A1. + only the second is allowed and fn must be a pointer to function + or pointer to member function whose signature is compatible with + A1.
    Effects: For each -

    Class template init<T1 = - unspecified, T2 = - unspecified,...Tn = - unspecified>

    - -

    A MPL sequence which - can be used to specify a family of one or more __init__ - functions. Only the last Ti supplied - may be an instantiation of optional<...>.

    - -

    Class template init - synopsis

    -
    -namespace boost { namespace python
    -{
    -  template <T1 = unspecified,...Tn = unspecified>
    -  struct init
    -  {
    -      init(char const* doc = 0);
    -      template <class Keywords> init(Keywords const& kw, char const* doc = 0);
    -      template <class Keywords> init(char const* doc, Keywords const& kw);
    -
    -      template <class CallPolicies>
    -      unspecified operator[](CallPolicies const& policies) const
    -  };
    -}}
    -
    - -

    Class template init - constructors

    -
    -init(char const* doc = 0);
    -template <class Keywords> init(Keywords const& kw, char const* doc = 0);
    -template <class Keywords> init(char const* doc, Keywords const& kw);
    -
    - -
    -
    Requires: If supplied, doc is an ntbs. If supplied, kw is the - result of a
    - -
    Effects: The result is an init-expression whose - docstring is doc and whose keywords are - a reference to kw. If the first form is used, the - resulting expression's keywords are empty. The expression's - call policies are an instance of default_call_policies. - If Tn is optional<U1, U2,... - Um>, the - expression's valid prefixes are given by:
    - -
    -
    - (T1, T2,...Tn-1), - (T1, T2,...Tn-1 - , U1), - (T1, T2,...Tn-1 - , U1, U2), - ...(T1, T2,...Tn-1 - , U1, U2,...Um). -
    - Otherwise, the expression has one valid prefix given by the - the template arguments the user specified. -
    -
    - -

    Class template init - observer functions

    -
    -template <class Policies>
    -unspecified operator[](Policies const& policies) const
    -
    - -
    -
    Requires: Policies is a model of CallPolicies.
    - -
    Effects: Returns a new init-expression with all the same - properties as the init object except that its - call policies are replaced by a reference to - policies.
    -
    - -

    init-expressions

    - An init-expression is a transport vehicle for the following - properties, used to describe a family of __init__ methods to - be generated for an extension class: - -
    -
    -
    docstring: An ntbs - whose value will bound to the method's __doc__ - attribute
    - -
    keywords: A keyword-expression which will be - used to name (a trailing subsequence of) the arguments to the - generated __init__ function(s).
    - -
    call policies: An instance of a model of CallPolicies.
    - -
    argument types: An MPL sequence of C++ argument types - which will be used to construct the wrapped C++ object. An init - expression has one or more valid prefixes which are given by a - sequence of prefixes of its argument types.
    -
    -
    - -

    Class template optional<T1 - = unspecified, T2 = - unspecified,...Tn = - unspecified>

    - -

    A MPL sequence which - can be used to specify the optional arguments to an __init__ - function.

    - -

    Class template - optional synopsis

    -
    -namespace boost { namespace python
    -{
    -  template <T1 = unspecified,...Tn = unspecified>
    -  struct optional {};
    -}}
    -
    -

    Class template bases<T1, T2,...TN>