1
2
3
4
5
6 """contains classes that allow to configure code generation for free\\member functions, operators and etc."""
7
8 import os
9 import user_text
10 import algorithm
11 import decl_wrapper
12 from pyplusplus import messages
13 from pygccxml import declarations
14 from pyplusplus import function_transformers as ft
15
16 -class calldef_t(decl_wrapper.decl_wrapper_t):
17 """base class, for code generator configration, for function declaration classes."""
18
19 BOOST_PYTHON_MAX_ARITY = 10
20 """Boost.Python configuration macro value.
21
22 A function has more than BOOST_PYTHON_MAX_ARITY arguments, will not compile.
23 You should adjust BOOST_PYTHON_MAX_ARITY macro.
24 For more information see: http://mail.python.org/pipermail/c++-sig/2002-June/001554.html
25 """
26
27 - def __init__(self, *arguments, **keywords):
28 decl_wrapper.decl_wrapper_t.__init__( self, *arguments, **keywords )
29
30 self._call_policies = None
31 self._use_keywords = True
32 self._use_default_arguments = True
33 self._create_with_signature = None
34 self._overridable = None
35 self._non_overridable_reason = None
36 self._transformations = None
37
39 return self._call_policies
42 call_policies = property( get_call_policies, set_call_policies
43 , doc="reference to L{call policies<call_policy_t>} class." \
44 +"Default value is calculated at runtime, based on return value.")
45
47 return self._use_keywords and bool( self.arguments )
50 use_keywords = property( _get_use_keywords, _set_use_keywords
51 , doc="boolean, if True, allows to call function from Python using keyword arguments." \
52 +"Default value is True.")
53
73
76 create_with_signature = property( _get_create_with_signature, _set_create_with_signature
77 , doc="boolean, if True Py++ will generate next code: def( ..., function type( function ref )"\
78 +"Thus, the generated code is safe, when a user creates function overloading." \
79 +"Default value is computed, based on information from the declarations tree" )
80
82 return self._use_default_arguments
85 use_default_arguments = property( _get_use_default_arguments, _set_use_default_arguments
86 , doc="boolean, if True Py++ will generate code that will set default arguments" \
87 +"Default value is True.")
88
103
116
119
120 overridable = property