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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 // - Performing compile-time asserts to avoid error-prone behavior | 262 // - Performing compile-time asserts to avoid error-prone behavior |
263 // - Returning an Callback<> with an arity matching the number of unbound | 263 // - Returning an Callback<> with an arity matching the number of unbound |
264 // parameters and that knows the correct refcounting semantics for the | 264 // parameters and that knows the correct refcounting semantics for the |
265 // target object if we are binding a method. | 265 // target object if we are binding a method. |
266 // | 266 // |
267 // The Bind functions do the above using type-inference, and template | 267 // The Bind functions do the above using type-inference, and template |
268 // specializations. | 268 // specializations. |
269 // | 269 // |
270 // By default Bind() will store copies of all bound parameters, and attempt | 270 // By default Bind() will store copies of all bound parameters, and attempt |
271 // to refcount a target object if the function being bound is a class method. | 271 // to refcount a target object if the function being bound is a class method. |
272 // These copies are created even if the function takes parameters as const or | 272 // These copies are created even if the function takes parameters as const |
273 // non-const references. | 273 // references. (Binding to non-const references is forbidden, see bind.h) |
274 // | 274 // |
275 // To change this behavior, we introduce a set of argument wrappers | 275 // To change this behavior, we introduce a set of argument wrappers |
276 // (e.g., Unretained(), and ConstRef()). These are simple container templates | 276 // (e.g., Unretained(), and ConstRef()). These are simple container templates |
277 // that are passed by value, and wrap a pointer to argument. See the | 277 // that are passed by value, and wrap a pointer to argument. See the |
278 // file-level comment in base/bind_helpers.h for more info. | 278 // file-level comment in base/bind_helpers.h for more info. |
279 // | 279 // |
280 // These types are passed to the Unwrap() functions, and the MaybeRefcount() | 280 // These types are passed to the Unwrap() functions, and the MaybeRefcount() |
281 // functions respectively to modify the behavior of Bind(). The Unwrap() | 281 // functions respectively to modify the behavior of Bind(). The Unwrap() |
282 // and MaybeRefcount() functions change behavior by doing partial | 282 // and MaybeRefcount() functions change behavior by doing partial |
283 // specialization based on whether or not a parameter is a wrapper type. | 283 // specialization based on whether or not a parameter is a wrapper type. |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 }; | 751 }; |
752 | 752 |
753 | 753 |
754 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it | 754 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it |
755 // will be used in a lot of APIs with delayed execution. | 755 // will be used in a lot of APIs with delayed execution. |
756 typedef Callback<void(void)> Closure; | 756 typedef Callback<void(void)> Closure; |
757 | 757 |
758 } // namespace base | 758 } // namespace base |
759 | 759 |
760 #endif // BASE_CALLBACK_H | 760 #endif // BASE_CALLBACK_H |
OLD | NEW |