OLD | NEW |
1 // This file was GENERATED by command: | 1 // This file was GENERATED by command: |
2 // pump.py sigslottester.h.pump | 2 // pump.py sigslottester.h.pump |
3 // DO NOT EDIT BY HAND!!! | 3 // DO NOT EDIT BY HAND!!! |
4 | 4 |
5 /* | 5 /* |
6 * Copyright 2014 The WebRTC Project Authors. All rights reserved. | 6 * Copyright 2014 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 21 matching lines...) Expand all Loading... |
32 // /* We want to monitor foo in some test. Note how signal argument is | 32 // /* We want to monitor foo in some test. Note how signal argument is |
33 // const std::string&, but capture-type is std::string. Capture type | 33 // const std::string&, but capture-type is std::string. Capture type |
34 // must be type that can be assigned to. */ | 34 // must be type that can be assigned to. */ |
35 // std::string capture; | 35 // std::string capture; |
36 // SigslotTester1<const std::string&, std::string> slot(&foo, &capture); | 36 // SigslotTester1<const std::string&, std::string> slot(&foo, &capture); |
37 // foo.emit("hello"); | 37 // foo.emit("hello"); |
38 // EXPECT_EQ(1, slot.callback_count()); | 38 // EXPECT_EQ(1, slot.callback_count()); |
39 // EXPECT_EQ("hello", capture); | 39 // EXPECT_EQ("hello", capture); |
40 // /* See unit-tests for more examples */ | 40 // /* See unit-tests for more examples */ |
41 | 41 |
42 #include "webrtc/base/constructormagic.h" | 42 #include "webrtc/rtc_base/constructormagic.h" |
43 #include "webrtc/base/sigslot.h" | 43 #include "webrtc/rtc_base/sigslot.h" |
44 | 44 |
45 namespace rtc { | 45 namespace rtc { |
46 | 46 |
47 // Base version for testing signals that passes no arguments. | 47 // Base version for testing signals that passes no arguments. |
48 class SigslotTester0 : public sigslot::has_slots<> { | 48 class SigslotTester0 : public sigslot::has_slots<> { |
49 public: | 49 public: |
50 explicit SigslotTester0(sigslot::signal0<>* signal) : callback_count_(0) { | 50 explicit SigslotTester0(sigslot::signal0<>* signal) : callback_count_(0) { |
51 signal->connect(this, &SigslotTester0::OnSignalCallback); | 51 signal->connect(this, &SigslotTester0::OnSignalCallback); |
52 } | 52 } |
53 | 53 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 C2* capture2_; | 207 C2* capture2_; |
208 C3* capture3_; | 208 C3* capture3_; |
209 C4* capture4_; | 209 C4* capture4_; |
210 C5* capture5_; | 210 C5* capture5_; |
211 | 211 |
212 RTC_DISALLOW_COPY_AND_ASSIGN(SigslotTester5); | 212 RTC_DISALLOW_COPY_AND_ASSIGN(SigslotTester5); |
213 }; | 213 }; |
214 } // namespace rtc | 214 } // namespace rtc |
215 | 215 |
216 #endif // WEBRTC_RTC_BASE_SIGSLOTTESTER_H_ | 216 #endif // WEBRTC_RTC_BASE_SIGSLOTTESTER_H_ |
OLD | NEW |