| Index: webrtc/base/callback.h
|
| diff --git a/webrtc/rtc_base/callback.h.pump b/webrtc/base/callback.h
|
| similarity index 68%
|
| copy from webrtc/rtc_base/callback.h.pump
|
| copy to webrtc/base/callback.h
|
| index cceddf7343adb2efafc74b50487948a6a6b5d49d..4da1e6dfab7e3da099ef6cdd048773b1836099c2 100644
|
| --- a/webrtc/rtc_base/callback.h.pump
|
| +++ b/webrtc/base/callback.h
|
| @@ -1,3 +1,7 @@
|
| +// This file was GENERATED by command:
|
| +// pump.py callback.h.pump
|
| +// DO NOT EDIT BY HAND!!!
|
| +
|
| /*
|
| * Copyright 2012 The WebRTC Project Authors. All rights reserved.
|
| *
|
| @@ -27,7 +31,8 @@
|
| // all platforms we support) and a lightweight alternative to sigslots. Since
|
| // they effectively hide the type of the object they call, they're useful in
|
| // breaking dependencies between objects that need to interact with one another.
|
| -// Notably, they can hold the results of Bind(), std::bind*, etc, without needing
|
| +// Notably, they can hold the results of Bind(), std::bind*, etc, without
|
| +// needing
|
| // to know the resulting object type of those calls.
|
| //
|
| // Sigslots, on the other hand, provide a fuller feature set, such as multiple
|
| @@ -54,50 +59,12 @@
|
| // my_callback = Callback1<int, int>();
|
| // cout << my_callback.empty() << endl; // true
|
|
|
| -#ifndef WEBRTC_RTC_BASE_CALLBACK_H_
|
| -#define WEBRTC_RTC_BASE_CALLBACK_H_
|
| -
|
| -#include "webrtc/rtc_base/refcount.h"
|
| -#include "webrtc/rtc_base/scoped_ref_ptr.h"
|
| -
|
| -namespace rtc {
|
| -
|
| -$var n = 5
|
| -$range i 0..n
|
| -$for i [[
|
| -$range j 1..i
|
| -
|
| -template <class R$for j [[,
|
| - class P$j]]>
|
| -class Callback$i {
|
| - public:
|
| - // Default copy operations are appropriate for this class.
|
| - Callback$i() {}
|
| - template <class T> Callback$i(const T& functor)
|
| - : helper_(new RefCountedObject< HelperImpl<T> >(functor)) {}
|
| - R operator()($for j , [[P$j p$j]]) {
|
| - if (empty())
|
| - return R();
|
| - return helper_->Run($for j , [[p$j]]);
|
| - }
|
| - bool empty() const { return !helper_; }
|
| +#ifndef WEBRTC_BASE_CALLBACK_H_
|
| +#define WEBRTC_BASE_CALLBACK_H_
|
|
|
| - private:
|
| - struct Helper : RefCountInterface {
|
| - virtual ~Helper() {}
|
| - virtual R Run($for j , [[P$j p$j]]) = 0;
|
| - };
|
| - template <class T> struct HelperImpl : Helper {
|
| - explicit HelperImpl(const T& functor) : functor_(functor) {}
|
| - virtual R Run($for j , [[P$j p$j]]) {
|
| - return functor_($for j , [[p$j]]);
|
| - }
|
| - T functor_;
|
| - };
|
| - scoped_refptr<Helper> helper_;
|
| -};
|
|
|
| -]]
|
| -} // namespace rtc
|
| +// This header is deprecated and is just left here temporarily during
|
| +// refactoring. See https://bugs.webrtc.org/7634 for more details.
|
| +#include "webrtc/rtc_base/callback.h"
|
|
|
| -#endif // WEBRTC_RTC_BASE_CALLBACK_H_
|
| +#endif // WEBRTC_BASE_CALLBACK_H_
|
|
|