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_ |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 typename internal::BindState< | 58 typename internal::BindState< |
59 typename internal::FunctorTraits<Functor>::RunnableType, | 59 typename internal::FunctorTraits<Functor>::RunnableType, |
60 typename internal::FunctorTraits<Functor>::RunType, | 60 typename internal::FunctorTraits<Functor>::RunType, |
61 void()> | 61 void()> |
62 ::UnboundRunType> | 62 ::UnboundRunType> |
63 Bind(Functor functor) { | 63 Bind(Functor functor) { |
64 // Typedefs for how to store and run the functor. | 64 // Typedefs for how to store and run the functor. |
65 typedef typename internal::FunctorTraits<Functor>::RunnableType RunnableType; | 65 typedef typename internal::FunctorTraits<Functor>::RunnableType RunnableType; |
66 typedef typename internal::FunctorTraits<Functor>::RunType RunType; | 66 typedef typename internal::FunctorTraits<Functor>::RunType RunType; |
67 | 67 |
68 // Use RunnableType::RunType instead of RunType above because our | |
69 // checks should below for bound references need to know what the actual | |
70 // functor is going to interpret the argument as. | |
71 typedef internal::FunctionTraits<typename RunnableType::RunType> | |
72 BoundFunctorTraits; | |
73 | |
74 typedef internal::BindState<RunnableType, RunType, void()> BindState; | 68 typedef internal::BindState<RunnableType, RunType, void()> BindState; |
75 | 69 |
76 | 70 |
77 return Callback<typename BindState::UnboundRunType>( | 71 return Callback<typename BindState::UnboundRunType>( |
78 new BindState(internal::MakeRunnable(functor))); | 72 new BindState(internal::MakeRunnable(functor))); |
79 } | 73 } |
80 | 74 |
81 template <typename Functor, typename P1> | 75 template <typename Functor, typename P1> |
82 base::Callback< | 76 base::Callback< |
83 typename internal::BindState< | 77 typename internal::BindState< |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 | 502 |
509 | 503 |
510 return Callback<typename BindState::UnboundRunType>( | 504 return Callback<typename BindState::UnboundRunType>( |
511 new BindState(internal::MakeRunnable(functor), p1, p2, p3, p4, p5, p6, | 505 new BindState(internal::MakeRunnable(functor), p1, p2, p3, p4, p5, p6, |
512 p7)); | 506 p7)); |
513 } | 507 } |
514 | 508 |
515 } // namespace base | 509 } // namespace base |
516 | 510 |
517 #endif // BASE_BIND_H_ | 511 #endif // BASE_BIND_H_ |
OLD | NEW |