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 (c) 2011 The Chromium Authors. All rights reserved. | 6 // Copyright (c) 2011 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_BIND_H_ | 10 #ifndef BASE_BIND_H_ |
11 #define BASE_BIND_H_ | 11 #define BASE_BIND_H_ |
12 #pragma once | 12 #pragma once |
13 | 13 |
14 #include "base/bind_internal.h" | 14 #include "base/bind_internal.h" |
15 #include "base/callback_internal.h" | 15 #include "base/callback_internal.h" |
16 | 16 |
17 // See base/callback.h for how to use these functions. If reading the | 17 // ----------------------------------------------------------------------------- |
18 // implementation, before proceeding further, you should read the top | 18 // Usage documentation |
19 // comment of base/bind_internal.h for a definition of common terms and | 19 // ----------------------------------------------------------------------------- |
20 // concepts. | |
21 // | 20 // |
22 // IMPLEMENTATION NOTE | 21 // See base/callback.h for documentation. |
| 22 // |
| 23 // |
| 24 // ----------------------------------------------------------------------------- |
| 25 // Implementation notes |
| 26 // ----------------------------------------------------------------------------- |
| 27 // |
| 28 // If you're reading the implementation, before proceeding further, you should |
| 29 // read the top comment of base/bind_internal.h for a definition of common |
| 30 // terms and concepts. |
| 31 // |
| 32 // RETURN TYPES |
| 33 // |
23 // Though Bind()'s result is meant to be stored in a Callback<> type, it | 34 // Though Bind()'s result is meant to be stored in a Callback<> type, it |
24 // cannot actually return the exact type without requiring a large amount | 35 // cannot actually return the exact type without requiring a large amount |
25 // of extra template specializations. The problem is that in order to | 36 // of extra template specializations. The problem is that in order to |
26 // discern the correct specialization of Callback<>, Bind would need to | 37 // discern the correct specialization of Callback<>, Bind would need to |
27 // unwrap the function signature to determine the signature's arity, and | 38 // unwrap the function signature to determine the signature's arity, and |
28 // whether or not it is a method. | 39 // whether or not it is a method. |
29 // | 40 // |
30 // Each unique combination of (arity, function_type, num_prebound) where | 41 // Each unique combination of (arity, function_type, num_prebound) where |
31 // function_type is one of {function, method, const_method} would require | 42 // function_type is one of {function, method, const_method} would require |
32 // one specialization. We eventually have to do a similar number of | 43 // one specialization. We eventually have to do a similar number of |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 | 509 |
499 | 510 |
500 return Callback<typename BindState::UnboundRunType>( | 511 return Callback<typename BindState::UnboundRunType>( |
501 new BindState(internal::MakeRunnable(functor), p1, p2, p3, p4, p5, p6, | 512 new BindState(internal::MakeRunnable(functor), p1, p2, p3, p4, p5, p6, |
502 p7)); | 513 p7)); |
503 } | 514 } |
504 | 515 |
505 } // namespace base | 516 } // namespace base |
506 | 517 |
507 #endif // BASE_BIND_H_ | 518 #endif // BASE_BIND_H_ |
OLD | NEW |