| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // my_callback = Callback1<int, int>(&sqr); | 47 // my_callback = Callback1<int, int>(&sqr); |
| 48 // cout << my_callback.empty() << endl; // false | 48 // cout << my_callback.empty() << endl; // false |
| 49 // cout << my_callback(3) << endl; // 9 | 49 // cout << my_callback(3) << endl; // 9 |
| 50 // | 50 // |
| 51 // my_callback = Callback1<int, int>(add_k); | 51 // my_callback = Callback1<int, int>(add_k); |
| 52 // cout << my_callback(10) << endl; // 15 | 52 // cout << my_callback(10) << endl; // 15 |
| 53 // | 53 // |
| 54 // my_callback = Callback1<int, int>(); | 54 // my_callback = Callback1<int, int>(); |
| 55 // cout << my_callback.empty() << endl; // true | 55 // cout << my_callback.empty() << endl; // true |
| 56 | 56 |
| 57 #ifndef WEBRTC_BASE_CALLBACK_H_ | 57 #ifndef WEBRTC_RTC_BASE_CALLBACK_H_ |
| 58 #define WEBRTC_BASE_CALLBACK_H_ | 58 #define WEBRTC_RTC_BASE_CALLBACK_H_ |
| 59 | 59 |
| 60 #include "webrtc/base/refcount.h" | 60 #include "webrtc/base/refcount.h" |
| 61 #include "webrtc/base/scoped_ref_ptr.h" | 61 #include "webrtc/base/scoped_ref_ptr.h" |
| 62 | 62 |
| 63 namespace rtc { | 63 namespace rtc { |
| 64 | 64 |
| 65 $var n = 5 | 65 $var n = 5 |
| 66 $range i 0..n | 66 $range i 0..n |
| 67 $for i [[ | 67 $for i [[ |
| 68 $range j 1..i | 68 $range j 1..i |
| (...skipping 24 matching lines...) Expand all Loading... |
| 93 return functor_($for j , [[p$j]]); | 93 return functor_($for j , [[p$j]]); |
| 94 } | 94 } |
| 95 T functor_; | 95 T functor_; |
| 96 }; | 96 }; |
| 97 scoped_refptr<Helper> helper_; | 97 scoped_refptr<Helper> helper_; |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 ]] | 100 ]] |
| 101 } // namespace rtc | 101 } // namespace rtc |
| 102 | 102 |
| 103 #endif // WEBRTC_BASE_CALLBACK_H_ | 103 #endif // WEBRTC_RTC_BASE_CALLBACK_H_ |
| OLD | NEW |