OLD | NEW |
1 // This file was GENERATED by command: | 1 // This file was GENERATED by command: |
2 // pump.py bind.h.pump | 2 // pump.py bind.h.pump |
3 // DO NOT EDIT BY HAND!!! | 3 // DO NOT EDIT BY HAND!!! |
4 | 4 |
5 /* | 5 /* |
6 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 6 * Copyright 2012 The WebRTC Project Authors. All rights reserved. |
7 * | 7 * |
8 * Use of this source code is governed by a BSD-style license | 8 * Use of this source code is governed by a BSD-style license |
9 * that can be found in the LICENSE file in the root of the source | 9 * that can be found in the LICENSE file in the root of the source |
10 * tree. An additional intellectual property rights grant can be found | 10 * tree. An additional intellectual property rights grant can be found |
(...skipping 30 matching lines...) Expand all Loading... |
41 // } | 41 // } |
42 // | 42 // |
43 // Example usage of ref counted objects: | 43 // Example usage of ref counted objects: |
44 // struct Bar { | 44 // struct Bar { |
45 // int AddRef(); | 45 // int AddRef(); |
46 // int Release(); | 46 // int Release(); |
47 // | 47 // |
48 // void Test() {} | 48 // void Test() {} |
49 // void BindThis() { | 49 // void BindThis() { |
50 // // The functor passed to AsyncInvoke() will keep this object alive. | 50 // // The functor passed to AsyncInvoke() will keep this object alive. |
51 // invoker.AsyncInvoke(rtc::Bind(&Bar::Test, this)); | 51 // invoker.AsyncInvoke(RTC_FROM_HERE,rtc::Bind(&Bar::Test, this)); |
52 // } | 52 // } |
53 // }; | 53 // }; |
54 // | 54 // |
55 // int main() { | 55 // int main() { |
56 // rtc::scoped_refptr<Bar> bar = new rtc::RefCountedObject<Bar>(); | 56 // rtc::scoped_refptr<Bar> bar = new rtc::RefCountedObject<Bar>(); |
57 // auto functor = rtc::Bind(&Bar::Test, bar); | 57 // auto functor = rtc::Bind(&Bar::Test, bar); |
58 // bar = nullptr; | 58 // bar = nullptr; |
59 // // The functor stores an internal scoped_refptr<Bar>, so this is safe. | 59 // // The functor stores an internal scoped_refptr<Bar>, so this is safe. |
60 // functor(); | 60 // functor(); |
61 // } | 61 // } |
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1533 function, p1, p2, p3, p4, p5, p6, p7, p8, p9); | 1533 function, p1, p2, p3, p4, p5, p6, p7, p8, p9); |
1534 } | 1534 } |
1535 | 1535 |
1536 #undef FP_T | 1536 #undef FP_T |
1537 | 1537 |
1538 } // namespace rtc | 1538 } // namespace rtc |
1539 | 1539 |
1540 #undef NONAME | 1540 #undef NONAME |
1541 | 1541 |
1542 #endif // WEBRTC_BASE_BIND_H_ | 1542 #endif // WEBRTC_BASE_BIND_H_ |
OLD | NEW |