OLD | NEW |
1 // This file was GENERATED by command: | 1 // This file was GENERATED by command: |
2 // pump.py callback.h.pump | 2 // pump.py callback.h.pump |
3 // DO NOT EDIT BY HAND!!! | 3 // DO NOT EDIT BY HAND!!! |
4 | 4 |
5 | 5 |
6 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 6 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
7 // Use of this source code is governed by a BSD-style license that can be | 7 // Use of this source code is governed by a BSD-style license that can be |
8 // found in the LICENSE file. | 8 // found in the LICENSE file. |
9 | 9 |
10 #ifndef BASE_CALLBACK_H_ | 10 #ifndef BASE_CALLBACK_H_ |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // pointer. | 116 // pointer. |
117 // | 117 // |
118 // base::Closure cb = base::Bind(&MyClass::MyFunc, this, 23, "hello world"); | 118 // base::Closure cb = base::Bind(&MyClass::MyFunc, this, 23, "hello world"); |
119 // | 119 // |
120 // PARTIAL BINDING OF PARAMETERS | 120 // PARTIAL BINDING OF PARAMETERS |
121 // | 121 // |
122 // You can specify some parameters when you create the callback, and specify | 122 // You can specify some parameters when you create the callback, and specify |
123 // the rest when you execute the callback. | 123 // the rest when you execute the callback. |
124 // | 124 // |
125 // void MyFunc(int i, const std::string& str) {} | 125 // void MyFunc(int i, const std::string& str) {} |
126 // base::Callback<void(int)> cb = base::Bind(&MyFunc, 23); | 126 // base::Callback<void(const std::string)> cb = base::Bind(&MyFunc, 23); |
127 // cb.Run("hello world"); | 127 // cb.Run("hello world"); |
128 // | 128 // |
129 // When calling a function bound parameters are first, followed by unbound | 129 // When calling a function bound parameters are first, followed by unbound |
130 // parameters. | 130 // parameters. |
131 // | 131 // |
132 // | 132 // |
133 // ----------------------------------------------------------------------------- | 133 // ----------------------------------------------------------------------------- |
134 // Quick reference for advanced binding | 134 // Quick reference for advanced binding |
135 // ----------------------------------------------------------------------------- | 135 // ----------------------------------------------------------------------------- |
136 // | 136 // |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 }; | 741 }; |
742 | 742 |
743 | 743 |
744 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it | 744 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it |
745 // will be used in a lot of APIs with delayed execution. | 745 // will be used in a lot of APIs with delayed execution. |
746 typedef Callback<void(void)> Closure; | 746 typedef Callback<void(void)> Closure; |
747 | 747 |
748 } // namespace base | 748 } // namespace base |
749 | 749 |
750 #endif // BASE_CALLBACK_H | 750 #endif // BASE_CALLBACK_H |
OLD | NEW |