protobuf/src/google/protobuf/stubs/callback.h
Go to the documentation of this file.
1 #ifndef GOOGLE_PROTOBUF_STUBS_CALLBACK_H_
2 #define GOOGLE_PROTOBUF_STUBS_CALLBACK_H_
3 
4 #include <type_traits>
5 
6 #include <google/protobuf/stubs/macros.h>
7 
8 #include <google/protobuf/port_def.inc>
9 
10 // ===================================================================
11 // emulates google3/base/callback.h
12 
13 namespace google {
14 namespace protobuf {
15 
16 // Abstract interface for a callback. When calling an RPC, you must provide
17 // a Closure to call when the procedure completes. See the Service interface
18 // in service.h.
19 //
20 // To automatically construct a Closure which calls a particular function or
21 // method with a particular set of parameters, use the NewCallback() function.
22 // Example:
23 // void FooDone(const FooResponse* response) {
24 // ...
25 // }
26 //
27 // void CallFoo() {
28 // ...
29 // // When done, call FooDone() and pass it a pointer to the response.
30 // Closure* callback = NewCallback(&FooDone, response);
31 // // Make the call.
32 // service->Foo(controller, request, response, callback);
33 // }
34 //
35 // Example that calls a method:
36 // class Handler {
37 // public:
38 // ...
39 //
40 // void FooDone(const FooResponse* response) {
41 // ...
42 // }
43 //
44 // void CallFoo() {
45 // ...
46 // // When done, call FooDone() and pass it a pointer to the response.
47 // Closure* callback = NewCallback(this, &Handler::FooDone, response);
48 // // Make the call.
49 // service->Foo(controller, request, response, callback);
50 // }
51 // };
52 //
53 // Currently NewCallback() supports binding zero, one, or two arguments.
54 //
55 // Callbacks created with NewCallback() automatically delete themselves when
56 // executed. They should be used when a callback is to be called exactly
57 // once (usually the case with RPC callbacks). If a callback may be called
58 // a different number of times (including zero), create it with
59 // NewPermanentCallback() instead. You are then responsible for deleting the
60 // callback (using the "delete" keyword as normal).
61 //
62 // Note that NewCallback() is a bit touchy regarding argument types. Generally,
63 // the values you provide for the parameter bindings must exactly match the
64 // types accepted by the callback function. For example:
65 // void Foo(std::string s);
66 // NewCallback(&Foo, "foo"); // WON'T WORK: const char* != string
67 // NewCallback(&Foo, std::string("foo")); // WORKS
68 // Also note that the arguments cannot be references:
69 // void Foo(const std::string& s);
70 // std::string my_str;
71 // NewCallback(&Foo, my_str); // WON'T WORK: Can't use references.
72 // However, correctly-typed pointers will work just fine.
73 class PROTOBUF_EXPORT Closure {
74  public:
75  Closure() {}
76  virtual ~Closure();
77 
78  virtual void Run() = 0;
79 
80  private:
82 };
83 
84 template<typename R>
85 class ResultCallback {
86  public:
88  virtual ~ResultCallback() {}
89 
90  virtual R Run() = 0;
91 
92  private:
94 };
95 
96 template <typename R, typename A1>
97 class PROTOBUF_EXPORT ResultCallback1 {
98  public:
100  virtual ~ResultCallback1() {}
101 
102  virtual R Run(A1) = 0;
103 
104  private:
106 };
107 
108 template <typename R, typename A1, typename A2>
109 class PROTOBUF_EXPORT ResultCallback2 {
110  public:
112  virtual ~ResultCallback2() {}
113 
114  virtual R Run(A1,A2) = 0;
115 
116  private:
118 };
119 
120 namespace internal {
121 
122 class PROTOBUF_EXPORT FunctionClosure0 : public Closure {
123  public:
124  typedef void (*FunctionType)();
125 
126  FunctionClosure0(FunctionType function, bool self_deleting)
127  : function_(function), self_deleting_(self_deleting) {}
128  ~FunctionClosure0();
129 
130  void Run() override {
131  bool needs_delete = self_deleting_; // read in case callback deletes
132  function_();
133  if (needs_delete) delete this;
134  }
135 
136  private:
137  FunctionType function_;
138  bool self_deleting_;
139 };
140 
141 template <typename Class>
142 class MethodClosure0 : public Closure {
143  public:
144  typedef void (Class::*MethodType)();
145 
146  MethodClosure0(Class* object, MethodType method, bool self_deleting)
147  : object_(object), method_(method), self_deleting_(self_deleting) {}
149 
150  void Run() override {
151  bool needs_delete = self_deleting_; // read in case callback deletes
152  (object_->*method_)();
153  if (needs_delete) delete this;
154  }
155 
156  private:
157  Class* object_;
159  bool self_deleting_;
160 };
161 
162 template <typename Arg1>
163 class FunctionClosure1 : public Closure {
164  public:
165  typedef void (*FunctionType)(Arg1 arg1);
166 
167  FunctionClosure1(FunctionType function, bool self_deleting,
168  Arg1 arg1)
169  : function_(function), self_deleting_(self_deleting),
170  arg1_(arg1) {}
172 
173  void Run() override {
174  bool needs_delete = self_deleting_; // read in case callback deletes
175  function_(arg1_);
176  if (needs_delete) delete this;
177  }
178 
179  private:
181  bool self_deleting_;
182  Arg1 arg1_;
183 };
184 
185 template <typename Class, typename Arg1>
186 class MethodClosure1 : public Closure {
187  public:
188  typedef void (Class::*MethodType)(Arg1 arg1);
189 
190  MethodClosure1(Class* object, MethodType method, bool self_deleting,
191  Arg1 arg1)
192  : object_(object), method_(method), self_deleting_(self_deleting),
193  arg1_(arg1) {}
195 
196  void Run() override {
197  bool needs_delete = self_deleting_; // read in case callback deletes
198  (object_->*method_)(arg1_);
199  if (needs_delete) delete this;
200  }
201 
202  private:
203  Class* object_;
205  bool self_deleting_;
206  Arg1 arg1_;
207 };
208 
209 template <typename Arg1, typename Arg2>
210 class FunctionClosure2 : public Closure {
211  public:
212  typedef void (*FunctionType)(Arg1 arg1, Arg2 arg2);
213 
214  FunctionClosure2(FunctionType function, bool self_deleting,
215  Arg1 arg1, Arg2 arg2)
216  : function_(function), self_deleting_(self_deleting),
217  arg1_(arg1), arg2_(arg2) {}
219 
220  void Run() override {
221  bool needs_delete = self_deleting_; // read in case callback deletes
223  if (needs_delete) delete this;
224  }
225 
226  private:
228  bool self_deleting_;
229  Arg1 arg1_;
230  Arg2 arg2_;
231 };
232 
233 template <typename Class, typename Arg1, typename Arg2>
234 class MethodClosure2 : public Closure {
235  public:
236  typedef void (Class::*MethodType)(Arg1 arg1, Arg2 arg2);
237 
238  MethodClosure2(Class* object, MethodType method, bool self_deleting,
239  Arg1 arg1, Arg2 arg2)
240  : object_(object), method_(method), self_deleting_(self_deleting),
241  arg1_(arg1), arg2_(arg2) {}
243 
244  void Run() override {
245  bool needs_delete = self_deleting_; // read in case callback deletes
246  (object_->*method_)(arg1_, arg2_);
247  if (needs_delete) delete this;
248  }
249 
250  private:
251  Class* object_;
253  bool self_deleting_;
254  Arg1 arg1_;
255  Arg2 arg2_;
256 };
257 
258 template<typename R>
259 class FunctionResultCallback_0_0 : public ResultCallback<R> {
260  public:
261  typedef R (*FunctionType)();
262 
263  FunctionResultCallback_0_0(FunctionType function, bool self_deleting)
264  : function_(function), self_deleting_(self_deleting) {}
266 
267  R Run() override {
268  bool needs_delete = self_deleting_; // read in case callback deletes
269  R result = function_();
270  if (needs_delete) delete this;
271  return result;
272  }
273 
274  private:
276  bool self_deleting_;
277 };
278 
279 template<typename R, typename P1>
280 class FunctionResultCallback_1_0 : public ResultCallback<R> {
281  public:
282  typedef R (*FunctionType)(P1);
283 
284  FunctionResultCallback_1_0(FunctionType function, bool self_deleting,
285  P1 p1)
286  : function_(function), self_deleting_(self_deleting), p1_(p1) {}
288 
289  R Run() override {
290  bool needs_delete = self_deleting_; // read in case callback deletes
291  R result = function_(p1_);
292  if (needs_delete) delete this;
293  return result;
294  }
295 
296  private:
298  bool self_deleting_;
299  P1 p1_;
300 };
301 
302 template<typename R, typename Arg1>
303 class FunctionResultCallback_0_1 : public ResultCallback1<R, Arg1> {
304  public:
305  typedef R (*FunctionType)(Arg1 arg1);
306 
307  FunctionResultCallback_0_1(FunctionType function, bool self_deleting)
308  : function_(function), self_deleting_(self_deleting) {}
310 
311  R Run(Arg1 a1) override {
312  bool needs_delete = self_deleting_; // read in case callback deletes
313  R result = function_(a1);
314  if (needs_delete) delete this;
315  return result;
316  }
317 
318  private:
320  bool self_deleting_;
321 };
322 
323 template<typename R, typename P1, typename A1>
324 class FunctionResultCallback_1_1 : public ResultCallback1<R, A1> {
325  public:
326  typedef R (*FunctionType)(P1, A1);
327 
328  FunctionResultCallback_1_1(FunctionType function, bool self_deleting,
329  P1 p1)
330  : function_(function), self_deleting_(self_deleting), p1_(p1) {}
332 
333  R Run(A1 a1) override {
334  bool needs_delete = self_deleting_; // read in case callback deletes
335  R result = function_(p1_, a1);
336  if (needs_delete) delete this;
337  return result;
338  }
339 
340  private:
342  bool self_deleting_;
343  P1 p1_;
344 };
345 
346 template <typename T>
347 struct InternalConstRef {
349  typedef const base_type& type;
350 };
351 
352 template<typename R, typename T>
353 class MethodResultCallback_0_0 : public ResultCallback<R> {
354  public:
355  typedef R (T::*MethodType)();
356  MethodResultCallback_0_0(T* object, MethodType method, bool self_deleting)
357  : object_(object),
358  method_(method),
359  self_deleting_(self_deleting) {}
361 
362  R Run() {
363  bool needs_delete = self_deleting_;
364  R result = (object_->*method_)();
365  if (needs_delete) delete this;
366  return result;
367  }
368 
369  private:
370  T* object_;
372  bool self_deleting_;
373 };
374 
375 template <typename R, typename T, typename P1, typename P2, typename P3,
376  typename P4, typename P5, typename P6, typename A1, typename A2>
377 class MethodResultCallback_6_2 : public ResultCallback2<R, A1, A2> {
378  public:
379  typedef R (T::*MethodType)(P1, P2, P3, P4, P5, P6, A1, A2);
380  MethodResultCallback_6_2(T* object, MethodType method, bool self_deleting,
381  P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
382  : object_(object),
383  method_(method),
384  self_deleting_(self_deleting),
385  p1_(p1),
386  p2_(p2),
387  p3_(p3),
388  p4_(p4),
389  p5_(p5),
390  p6_(p6) {}
392 
393  R Run(A1 a1, A2 a2) override {
394  bool needs_delete = self_deleting_;
395  R result = (object_->*method_)(p1_, p2_, p3_, p4_, p5_, p6_, a1, a2);
396  if (needs_delete) delete this;
397  return result;
398  }
399 
400  private:
401  T* object_;
403  bool self_deleting_;
410 };
411 
412 } // namespace internal
413 
414 // See Closure.
415 inline Closure* NewCallback(void (*function)()) {
416  return new internal::FunctionClosure0(function, true);
417 }
418 
419 // See Closure.
420 inline Closure* NewPermanentCallback(void (*function)()) {
421  return new internal::FunctionClosure0(function, false);
422 }
423 
424 // See Closure.
425 template <typename Class>
426 inline Closure* NewCallback(Class* object, void (Class::*method)()) {
427  return new internal::MethodClosure0<Class>(object, method, true);
428 }
429 
430 // See Closure.
431 template <typename Class>
432 inline Closure* NewPermanentCallback(Class* object, void (Class::*method)()) {
433  return new internal::MethodClosure0<Class>(object, method, false);
434 }
435 
436 // See Closure.
437 template <typename Arg1>
438 inline Closure* NewCallback(void (*function)(Arg1),
439  Arg1 arg1) {
440  return new internal::FunctionClosure1<Arg1>(function, true, arg1);
441 }
442 
443 // See Closure.
444 template <typename Arg1>
445 inline Closure* NewPermanentCallback(void (*function)(Arg1),
446  Arg1 arg1) {
447  return new internal::FunctionClosure1<Arg1>(function, false, arg1);
448 }
449 
450 // See Closure.
451 template <typename Class, typename Arg1>
452 inline Closure* NewCallback(Class* object, void (Class::*method)(Arg1),
453  Arg1 arg1) {
454  return new internal::MethodClosure1<Class, Arg1>(object, method, true, arg1);
455 }
456 
457 // See Closure.
458 template <typename Class, typename Arg1>
459 inline Closure* NewPermanentCallback(Class* object, void (Class::*method)(Arg1),
460  Arg1 arg1) {
461  return new internal::MethodClosure1<Class, Arg1>(object, method, false, arg1);
462 }
463 
464 // See Closure.
465 template <typename Arg1, typename Arg2>
466 inline Closure* NewCallback(void (*function)(Arg1, Arg2),
467  Arg1 arg1, Arg2 arg2) {
468  return new internal::FunctionClosure2<Arg1, Arg2>(
469  function, true, arg1, arg2);
470 }
471 
472 // See Closure.
473 template <typename Arg1, typename Arg2>
474 inline Closure* NewPermanentCallback(void (*function)(Arg1, Arg2),
475  Arg1 arg1, Arg2 arg2) {
476  return new internal::FunctionClosure2<Arg1, Arg2>(
477  function, false, arg1, arg2);
478 }
479 
480 // See Closure.
481 template <typename Class, typename Arg1, typename Arg2>
482 inline Closure* NewCallback(Class* object, void (Class::*method)(Arg1, Arg2),
483  Arg1 arg1, Arg2 arg2) {
484  return new internal::MethodClosure2<Class, Arg1, Arg2>(
485  object, method, true, arg1, arg2);
486 }
487 
488 // See Closure.
489 template <typename Class, typename Arg1, typename Arg2>
490 inline Closure* NewPermanentCallback(
491  Class* object, void (Class::*method)(Arg1, Arg2),
492  Arg1 arg1, Arg2 arg2) {
493  return new internal::MethodClosure2<Class, Arg1, Arg2>(
494  object, method, false, arg1, arg2);
495 }
496 
497 // See ResultCallback
498 template<typename R>
499 inline ResultCallback<R>* NewCallback(R (*function)()) {
500  return new internal::FunctionResultCallback_0_0<R>(function, true);
501 }
502 
503 // See ResultCallback
504 template<typename R>
505 inline ResultCallback<R>* NewPermanentCallback(R (*function)()) {
506  return new internal::FunctionResultCallback_0_0<R>(function, false);
507 }
508 
509 // See ResultCallback
510 template<typename R, typename P1>
511 inline ResultCallback<R>* NewCallback(R (*function)(P1), P1 p1) {
512  return new internal::FunctionResultCallback_1_0<R, P1>(
513  function, true, p1);
514 }
515 
516 // See ResultCallback
517 template<typename R, typename P1>
518 inline ResultCallback<R>* NewPermanentCallback(
519  R (*function)(P1), P1 p1) {
520  return new internal::FunctionResultCallback_1_0<R, P1>(
521  function, false, p1);
522 }
523 
524 // See ResultCallback1
525 template<typename R, typename A1>
526 inline ResultCallback1<R, A1>* NewCallback(R (*function)(A1)) {
527  return new internal::FunctionResultCallback_0_1<R, A1>(function, true);
528 }
529 
530 // See ResultCallback1
531 template<typename R, typename A1>
532 inline ResultCallback1<R, A1>* NewPermanentCallback(R (*function)(A1)) {
533  return new internal::FunctionResultCallback_0_1<R, A1>(function, false);
534 }
535 
536 // See ResultCallback1
537 template<typename R, typename P1, typename A1>
538 inline ResultCallback1<R, A1>* NewCallback(R (*function)(P1, A1), P1 p1) {
539  return new internal::FunctionResultCallback_1_1<R, P1, A1>(
540  function, true, p1);
541 }
542 
543 // See ResultCallback1
544 template<typename R, typename P1, typename A1>
545 inline ResultCallback1<R, A1>* NewPermanentCallback(
546  R (*function)(P1, A1), P1 p1) {
547  return new internal::FunctionResultCallback_1_1<R, P1, A1>(
548  function, false, p1);
549 }
550 
551 // See MethodResultCallback_0_0
552 template <typename R, typename T1, typename T2>
553 inline ResultCallback<R>* NewPermanentCallback(
554  T1* object, R (T2::*function)()) {
555  return new internal::MethodResultCallback_0_0<R, T1>(object, function, false);
556 }
557 
558 // See MethodResultCallback_6_2
559 template <typename R, typename T, typename P1, typename P2, typename P3,
560  typename P4, typename P5, typename P6, typename A1, typename A2>
561 inline ResultCallback2<R, A1, A2>* NewPermanentCallback(
562  T* object, R (T::*function)(P1, P2, P3, P4, P5, P6, A1, A2),
569  return new internal::MethodResultCallback_6_2<R, T, P1, P2, P3, P4, P5, P6,
570  A1, A2>(object, function, false,
571  p1, p2, p3, p4, p5, p6);
572 }
573 
574 // A function which does nothing. Useful for creating no-op callbacks, e.g.:
575 // Closure* nothing = NewCallback(&DoNothing);
576 void PROTOBUF_EXPORT DoNothing();
577 
578 } // namespace protobuf
579 } // namespace google
580 
581 #include <google/protobuf/port_undef.inc>
582 
583 #endif // GOOGLE_PROTOBUF_STUBS_CALLBACK_H_
google::protobuf.internal::MethodClosure1::Run
void Run() override
Definition: protobuf/src/google/protobuf/stubs/callback.h:196
google::protobuf.internal::MethodResultCallback_6_2::p6_
std::remove_reference< P6 >::type p6_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:409
google::protobuf.internal::FunctionResultCallback_1_0::function_
FunctionType function_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:297
_gevent_test_main.result
result
Definition: _gevent_test_main.py:96
google::protobuf.internal::FunctionClosure2::self_deleting_
bool self_deleting_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:228
google::protobuf.internal::FunctionResultCallback_0_0::Run
R Run() override
Definition: protobuf/src/google/protobuf/stubs/callback.h:267
google::protobuf.internal::FunctionClosure2::function_
FunctionType function_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:227
google::protobuf::Closure
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:73
google::protobuf::ResultCallback1
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:97
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
#define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/macros.h:40
google::protobuf.internal::MethodClosure0::Run
void Run() override
Definition: protobuf/src/google/protobuf/stubs/callback.h:150
google::protobuf.internal::InternalConstRef::type
const typedef base_type & type
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:349
google::protobuf.internal::MethodClosure0::self_deleting_
bool self_deleting_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:159
google::protobuf::ResultCallback::GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ResultCallback)
google::protobuf.internal::MethodClosure2::arg1_
Arg1 arg1_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:254
google::protobuf.internal::FunctionClosure2::~FunctionClosure2
~FunctionClosure2()
Definition: protobuf/src/google/protobuf/stubs/callback.h:218
google::protobuf.internal::MethodClosure1::self_deleting_
bool self_deleting_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:205
google::protobuf.internal::MethodClosure1::~MethodClosure1
~MethodClosure1()
Definition: protobuf/src/google/protobuf/stubs/callback.h:194
google::protobuf.internal::MethodResultCallback_0_0::Run
R Run()
Definition: protobuf/src/google/protobuf/stubs/callback.h:362
google::protobuf.internal::MethodClosure2::method_
MethodType method_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:252
google::protobuf.internal::FunctionClosure1::FunctionClosure1
FunctionClosure1(FunctionType function, bool self_deleting, Arg1 arg1)
Definition: protobuf/src/google/protobuf/stubs/callback.h:167
google::protobuf
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:12
google::protobuf.internal::FunctionResultCallback_0_0::~FunctionResultCallback_0_0
~FunctionResultCallback_0_0()
Definition: protobuf/src/google/protobuf/stubs/callback.h:265
google::protobuf.internal::MethodResultCallback_0_0::object_
T * object_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:370
google::protobuf.internal::FunctionResultCallback_0_0::FunctionType
R(* FunctionType)()
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:261
google::protobuf.internal::MethodClosure0::MethodType
void(Class::* MethodType)()
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:144
google::protobuf.internal::MethodClosure1::MethodClosure1
MethodClosure1(Class *object, MethodType method, bool self_deleting, Arg1 arg1)
Definition: protobuf/src/google/protobuf/stubs/callback.h:190
google::protobuf.internal::MethodResultCallback_6_2::p3_
std::remove_reference< P3 >::type p3_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:406
google::protobuf.internal::MethodClosure1::arg1_
Arg1 arg1_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:206
google::protobuf.internal::FunctionResultCallback_0_0::FunctionResultCallback_0_0
FunctionResultCallback_0_0(FunctionType function, bool self_deleting)
Definition: protobuf/src/google/protobuf/stubs/callback.h:263
google::protobuf::ResultCallback2
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:109
google::protobuf.internal::FunctionClosure2::arg1_
Arg1 arg1_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:229
T
#define T(upbtypeconst, upbtype, ctype, default_value)
google::protobuf.internal::InternalConstRef::base_type
std::remove_reference< T >::type base_type
Definition: protobuf/src/google/protobuf/stubs/callback.h:348
google::protobuf::NewCallback
Closure * NewCallback(void(*function)())
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:415
google::protobuf::ResultCallback::ResultCallback
ResultCallback()
Definition: protobuf/src/google/protobuf/stubs/callback.h:87
re2::T1
@ T1
Definition: bloaty/third_party/re2/util/rune.cc:31
google::protobuf.internal::MethodClosure2::object_
Class * object_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:251
google::protobuf.internal::MethodResultCallback_6_2::method_
MethodType method_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:402
google::protobuf.internal::MethodResultCallback_0_0::MethodResultCallback_0_0
MethodResultCallback_0_0(T *object, MethodType method, bool self_deleting)
Definition: protobuf/src/google/protobuf/stubs/callback.h:356
google::protobuf.internal::FunctionResultCallback_0_1::FunctionResultCallback_0_1
FunctionResultCallback_0_1(FunctionType function, bool self_deleting)
Definition: protobuf/src/google/protobuf/stubs/callback.h:307
google::protobuf.internal::FunctionClosure2::FunctionType
void(* FunctionType)(Arg1 arg1, Arg2 arg2)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:212
a2
T::first_type a2
Definition: abseil-cpp/absl/container/internal/hash_function_defaults_test.cc:307
google::protobuf::ResultCallback2::~ResultCallback2
virtual ~ResultCallback2()
Definition: protobuf/src/google/protobuf/stubs/callback.h:112
google::protobuf.internal::MethodClosure2::MethodClosure2
MethodClosure2(Class *object, MethodType method, bool self_deleting, Arg1 arg1, Arg2 arg2)
Definition: protobuf/src/google/protobuf/stubs/callback.h:238
google::protobuf.internal::FunctionResultCallback_1_1::self_deleting_
bool self_deleting_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:342
google::protobuf.internal::FunctionClosure1::FunctionType
void(* FunctionType)(Arg1 arg1)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:165
google::protobuf.internal::FunctionClosure1::function_
FunctionType function_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:180
google::protobuf.internal::MethodResultCallback_6_2::self_deleting_
bool self_deleting_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:403
google::protobuf.internal::FunctionResultCallback_1_0::Run
R Run() override
Definition: protobuf/src/google/protobuf/stubs/callback.h:289
google::protobuf.internal::MethodClosure2::self_deleting_
bool self_deleting_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:253
google::protobuf.internal::MethodClosure0::~MethodClosure0
~MethodClosure0()
Definition: protobuf/src/google/protobuf/stubs/callback.h:148
google::protobuf.internal::MethodResultCallback_6_2::p2_
std::remove_reference< P2 >::type p2_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:405
google::protobuf.internal::MethodResultCallback_6_2::p4_
std::remove_reference< P4 >::type p4_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:407
google::protobuf.internal::MethodResultCallback_0_0
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:353
google::protobuf.internal::MethodClosure2::MethodType
void(Class::* MethodType)(Arg1 arg1, Arg2 arg2)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:236
google::protobuf.internal::MethodClosure1::method_
MethodType method_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:204
google::protobuf.internal::MethodClosure2::arg2_
Arg2 arg2_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:255
google::protobuf.internal::FunctionResultCallback_0_1::FunctionType
R(* FunctionType)(Arg1 arg1)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:305
google::protobuf::NewPermanentCallback
Closure * NewPermanentCallback(void(*function)())
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:420
google::protobuf.internal::FunctionResultCallback_0_1::self_deleting_
bool self_deleting_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:320
a1
T::first_type a1
Definition: abseil-cpp/absl/container/internal/hash_function_defaults_test.cc:305
google::protobuf.internal::FunctionResultCallback_0_1::Run
R Run(Arg1 a1) override
Definition: protobuf/src/google/protobuf/stubs/callback.h:311
google::protobuf::ResultCallback::~ResultCallback
virtual ~ResultCallback()
Definition: protobuf/src/google/protobuf/stubs/callback.h:88
google::protobuf.internal::MethodResultCallback_6_2::object_
T * object_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:401
google::protobuf.internal::MethodResultCallback_6_2::~MethodResultCallback_6_2
~MethodResultCallback_6_2()
Definition: protobuf/src/google/protobuf/stubs/callback.h:391
google::protobuf.internal::MethodClosure1::MethodType
void(Class::* MethodType)(Arg1 arg1)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:188
google::protobuf.internal::FunctionClosure1::~FunctionClosure1
~FunctionClosure1()
Definition: protobuf/src/google/protobuf/stubs/callback.h:171
google::protobuf.internal::FunctionResultCallback_1_1::FunctionType
R(* FunctionType)(P1, A1)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:326
google::protobuf::ResultCallback1::ResultCallback1
ResultCallback1()
Definition: protobuf/src/google/protobuf/stubs/callback.h:99
google::protobuf.internal::MethodClosure0::method_
MethodType method_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:158
google::protobuf.internal::FunctionClosure1::Run
void Run() override
Definition: protobuf/src/google/protobuf/stubs/callback.h:173
google::protobuf.internal::FunctionResultCallback_1_1::FunctionResultCallback_1_1
FunctionResultCallback_1_1(FunctionType function, bool self_deleting, P1 p1)
Definition: protobuf/src/google/protobuf/stubs/callback.h:328
google::protobuf.internal::FunctionClosure2::arg2_
Arg2 arg2_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:230
google::protobuf.internal::FunctionResultCallback_1_0::FunctionType
R(* FunctionType)(P1)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:282
google::protobuf::Closure::Closure
Closure()
Definition: protobuf/src/google/protobuf/stubs/callback.h:75
google::protobuf::DoNothing
void PROTOBUF_EXPORT DoNothing()
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/common.cc:299
google::protobuf.internal::FunctionResultCallback_0_1::function_
FunctionType function_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:319
google::protobuf.internal::FunctionClosure0
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:122
google::protobuf.internal::MethodResultCallback_0_0::MethodType
R(T::* MethodType)()
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:355
google::protobuf.internal::FunctionClosure1::arg1_
Arg1 arg1_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:182
google::protobuf.internal::FunctionResultCallback_1_0::~FunctionResultCallback_1_0
~FunctionResultCallback_1_0()
Definition: protobuf/src/google/protobuf/stubs/callback.h:287
google::protobuf.internal::MethodResultCallback_0_0::~MethodResultCallback_0_0
~MethodResultCallback_0_0()
Definition: protobuf/src/google/protobuf/stubs/callback.h:360
google::protobuf.internal::MethodResultCallback_6_2::MethodResultCallback_6_2
MethodResultCallback_6_2(T *object, MethodType method, bool self_deleting, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
Definition: protobuf/src/google/protobuf/stubs/callback.h:380
google::protobuf.internal::MethodResultCallback_6_2::p5_
std::remove_reference< P5 >::type p5_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:408
re2::T2
@ T2
Definition: bloaty/third_party/re2/util/rune.cc:33
google::protobuf.internal::MethodResultCallback_0_0::self_deleting_
bool self_deleting_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:372
google::protobuf.internal::MethodResultCallback_6_2::Run
R Run(A1 a1, A2 a2) override
Definition: protobuf/src/google/protobuf/stubs/callback.h:393
google::protobuf.internal::MethodResultCallback_6_2::p1_
std::remove_reference< P1 >::type p1_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:404
google::protobuf.internal::FunctionResultCallback_0_0::self_deleting_
bool self_deleting_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:276
google::protobuf.internal::FunctionResultCallback_1_0::FunctionResultCallback_1_0
FunctionResultCallback_1_0(FunctionType function, bool self_deleting, P1 p1)
Definition: protobuf/src/google/protobuf/stubs/callback.h:284
google::protobuf.internal::MethodClosure0::object_
Class * object_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:157
google::protobuf.internal::MethodClosure0::MethodClosure0
MethodClosure0(Class *object, MethodType method, bool self_deleting)
Definition: protobuf/src/google/protobuf/stubs/callback.h:146
google::protobuf.internal::MethodResultCallback_6_2::MethodType
R(T::* MethodType)(P1, P2, P3, P4, P5, P6, A1, A2)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:379
google::protobuf.internal::FunctionClosure1::self_deleting_
bool self_deleting_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:181
google::protobuf.internal::FunctionClosure0::FunctionClosure0
FunctionClosure0(FunctionType function, bool self_deleting)
Definition: protobuf/src/google/protobuf/stubs/callback.h:126
google::protobuf.internal::FunctionResultCallback_1_0::self_deleting_
bool self_deleting_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:298
google::protobuf::ResultCallback
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:85
google::protobuf.internal::FunctionResultCallback_1_1::p1_
P1 p1_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:343
google::protobuf.internal::FunctionClosure0::Run
void Run() override
Definition: protobuf/src/google/protobuf/stubs/callback.h:130
google::protobuf.internal::MethodResultCallback_0_0::method_
MethodType method_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:371
internal
Definition: benchmark/test/output_test_helper.cc:20
google::protobuf.internal::MethodClosure2::Run
void Run() override
Definition: protobuf/src/google/protobuf/stubs/callback.h:244
google::protobuf::ResultCallback2::ResultCallback2
ResultCallback2()
Definition: protobuf/src/google/protobuf/stubs/callback.h:111
google::protobuf.internal::FunctionResultCallback_0_0::function_
FunctionType function_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:275
google::protobuf.internal::MethodClosure1::object_
Class * object_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:203
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
google::protobuf.internal::FunctionResultCallback_0_1::~FunctionResultCallback_0_1
~FunctionResultCallback_0_1()
Definition: protobuf/src/google/protobuf/stubs/callback.h:309
google::protobuf.internal::MethodClosure2::~MethodClosure2
~MethodClosure2()
Definition: protobuf/src/google/protobuf/stubs/callback.h:242
googletest-break-on-failure-unittest.Run
def Run(command)
Definition: bloaty/third_party/googletest/googletest/test/googletest-break-on-failure-unittest.py:76
function
std::function< bool(GrpcTool *, int, const char **, const CliCredentials &, GrpcToolOutputCallback)> function
Definition: grpc_tool.cc:250
google::protobuf.internal::FunctionResultCallback_1_0::p1_
P1 p1_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:299
google::protobuf::ResultCallback::Run
virtual R Run()=0
google::protobuf.internal::FunctionResultCallback_1_1::function_
FunctionType function_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/callback.h:341
google::protobuf::ResultCallback1::~ResultCallback1
virtual ~ResultCallback1()
Definition: protobuf/src/google/protobuf/stubs/callback.h:100
google::protobuf.internal::FunctionClosure2::Run
void Run() override
Definition: protobuf/src/google/protobuf/stubs/callback.h:220
google
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:11
google::protobuf.internal::FunctionResultCallback_1_1::~FunctionResultCallback_1_1
~FunctionResultCallback_1_1()
Definition: protobuf/src/google/protobuf/stubs/callback.h:331
google::protobuf::method
const Descriptor::ReservedRange const EnumValueDescriptor method
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1973
google::protobuf.internal::FunctionResultCallback_1_1::Run
R Run(A1 a1) override
Definition: protobuf/src/google/protobuf/stubs/callback.h:333
google::protobuf.internal::FunctionClosure2::FunctionClosure2
FunctionClosure2(FunctionType function, bool self_deleting, Arg1 arg1, Arg2 arg2)
Definition: protobuf/src/google/protobuf/stubs/callback.h:214


grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:51