@@ -45,14 +45,20 @@ public:
45
45
*/
46
46
explicit [ $2 ] mem_functor$1 (function_type _A_func) : func_ptr_(_A_func) {}
47
47
48
+ #ifndef SIGCXX_DISABLE_DEPRECATED
48
49
/** Execute the wrapped method operating on the passed instance.
50
+ *
51
+ * @deprecated Please use the constructor that takes the object by reference
52
+ * instead.
53
+ *
49
54
* @param _A_obj Pointer to instance the method should operate on.dnl
50
55
FOR(1, $1 ,[
51
56
* @param _A_a%1 Argument to be passed on to the method.] )
52
57
* @return The return value of the method invocation.
53
58
*/
54
59
T_return operator()(LIST($3 T_obj* _A_obj, LOOP(type_trait_take_t<T_arg%1> _A_a%1, $1 ))) const
55
60
{ return (_A_obj->*(this->func_ptr_))(LOOP(_A_a%1, $1 )); }
61
+ #endif //SIGCXX_DISABLE_DEPRECATED
56
62
57
63
/** Execute the wrapped method operating on the passed instance.
58
64
* @param _A_obj Reference to instance the method should operate on.dnl
@@ -89,14 +95,20 @@ class bound_[$2]mem_functor$1
89
95
public:
90
96
typedef typename base_type_::function_type function_type;
91
97
98
+ #ifndef SIGCXX_DISABLE_DEPRECATED
92
99
/** Constructs a bound_[ $2 ] mem_functor$1 object that wraps the passed method.
100
+ *
101
+ * @deprecated Please use the constructor that takes the object by reference
102
+ * instead.
103
+ *
93
104
* @param _A_obj Pointer to instance the method will operate on.
94
105
* @param _A_func Pointer to method will be invoked from operator()().
95
106
*/
96
107
bound_[ $2 ] mem_functor$1 ($3 T_obj* _A_obj, function_type _A_func)
97
108
: base_type_(_A_func),
98
109
obj_(*_A_obj)
99
110
{}
111
+ #endif // SIGCXX_DISABLE_DEPRECATED
100
112
101
113
/** Constructs a bound_[ $2 ] mem_functor$1 object that wraps the passed method.
102
114
* @param _A_obj Reference to instance the method will operate on.
@@ -156,7 +168,11 @@ mem_fun[]ifelse($2,, $1)(T_return (T_obj::*_A_func)(LOOP(T_arg%1,$1)) $5)
156
168
157
169
] )
158
170
define ( [ BOUND_MEM_FUN] ,[ dnl
171
+ #ifndef SIGCXX_DISABLE_DEPRECATED
159
172
/** Creates a functor of type sigc::bound_[ $3 ] mem_functor$1 which encapsulates a method and an object instance.
173
+ *
174
+ * @deprecated Please use the version that takes the object by reference instead.
175
+ *
160
176
* @param _A_obj Pointer to object instance the functor should operate on.
161
177
* @param _A_func Pointer to method that should be wrapped.
162
178
* @return Functor that executes @e _A_func on invokation.
@@ -167,6 +183,7 @@ template <LIST(LOOP(class T_arg%1, $1), class T_return, class T_obj, class T_obj
167
183
inline bound_[ $3 ] mem_functor$1 <LIST(T_return, T_obj, LOOP(T_arg%1, $1 ))>
168
184
mem_fun[ ] ifelse ( $2 ,, $1 ) (/*$4 */ T_obj* _A_obj, T_return (T_obj2::*_A_func)(LOOP(T_arg%1,$1 )) $5 )
169
185
{ return bound_[ $3 ] mem_functor$1 <LIST(T_return, T_obj, LOOP(T_arg%1, $1 ))>(_A_obj, _A_func); }
186
+ #endif //SIGCXX_DISABLE_DEPRECATED
170
187
171
188
/** Creates a functor of type sigc::bound_[ $3 ] mem_functor$1 which encapsulates a method and an object instance.
172
189
* @param _A_obj Reference to object instance the functor should operate on.
0 commit comments