17 #ifndef PAGESPEED_KERNEL_BASE_CALLBACK_H_
18 #define PAGESPEED_KERNEL_BASE_CALLBACK_H_
22 namespace net_instaweb {
48 virtual void Run(A1) = 0;
55 template<
class C,
class A1,
bool DeleteAfterRun>
58 typedef void (C::*MemberSignature)(A1);
67 (object_->*member_)(t);
75 MemberSignature member_;
79 template <
class T1,
class T2,
class A1>
86 template <
class T1,
class T2,
class A1>
87 typename _MemberCallback_0_1<T1, A1, false>::base*
98 typedef typename remove_reference<T>::type base_type;
99 typedef const base_type& type;
102 template <
class T,
class P1,
class A1,
bool DeleteAfterRun>
106 typedef void (T::*MemberSignature)(P1, A1);
110 MemberSignature member_;
115 MemberSignature member,
116 typename ConstRef<P1>::type p1)
121 virtual void Run(A1 a1) {
122 (object_->*member_)(p1_, a1);
123 if (DeleteAfterRun) {
130 template <
class T1,
class T2,
class P1,
class A1>
133 void (T2::*member)(P1, A1),
134 typename ConstRef<P1>::type p1) {
139 template <
class T1,
class T2,
class P1,
class A1>
140 inline typename _MemberCallback_1_1<T1, P1, A1, false>::base*
142 void (T2::*member)(P1, A1),
143 typename ConstRef<P1>::type p1) {
166 template<
class A1,
class A2>
171 virtual void Run(A1, A2) = 0;
178 template<
class C,
class A1,
class A2,
bool DeleteAfterRun>
181 typedef void (C::*MemberSignature)(A1, A2);
189 void Run(A1 t1, A2 t2) {
190 (object_->*member_)(t1, t2);
191 if (DeleteAfterRun) {
198 MemberSignature member_;
202 template <
class T1,
class T2,
class A1,
class A2>
209 template <
class T1,
class T2,
class A1,
class A2>
210 typename _MemberCallback_0_2<T1, A1, A2, false>::base*
215 template <
class T,
class P1,
class A1,
class A2,
bool DeleteAfterRun>
219 typedef void (T::*MemberSignature)(P1, A1, A2);
223 MemberSignature member_;
228 MemberSignature member,
229 typename ConstRef<P1>::type p1)
234 virtual void Run(A1 a1, A2 a2) {
235 (object_->*member_)(p1_, a1, a2);
236 if (DeleteAfterRun) {
243 template <
class T1,
class T2,
class P1,
class A1,
class A2>
246 void (T2::*member)(P1, A1, A2),
247 typename ConstRef<P1>::type p1) {
252 template <
class T1,
class T2,
class P1,
class A1,
class A2>
253 inline typename _MemberCallback_2_1<T1, P1, A1, A2, false>::base*
255 void (T2::*member)(P1, A1, A2),
256 typename ConstRef<P1>::type p1) {
Definition: callback.h:216
Definition: callback.h:103
Definition: callback.h:167
Definition: callback.h:56
Definition: callback.h:97
_MemberCallback_0_1< T1, A1, true >::base * NewCallback(T1 *obj, void(T2::*member)(A1))
Creates a callback that automatically gets deleted after being run.
Definition: callback.h:81
_MemberCallback_0_1< T1, A1, false >::base * NewPermanentCallback(T1 *obj, void(T2::*member)(A1))
Creates a callback that does not get deleted after being run.
Definition: callback.h:88
Specified by TR1 [4.7.2] Reference modifications.
Definition: callback.h:93
Definition: callback.h:44
Definition: callback.h:179