| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // A Tuple is a generic templatized container, similar in concept to std::pair. | 5 // A Tuple is a generic templatized container, similar in concept to std::pair. |
| 6 // There are classes Tuple0 to Tuple6, cooresponding to the number of elements | 6 // There are classes Tuple0 to Tuple6, cooresponding to the number of elements |
| 7 // it contains. The convenient MakeTuple() function takes 0 to 6 arguments, | 7 // it contains. The convenient MakeTuple() function takes 0 to 6 arguments, |
| 8 // and will construct and return the appropriate Tuple object. The functions | 8 // and will construct and return the appropriate Tuple object. The functions |
| 9 // DispatchToMethod and DispatchToFunction take a function pointer or instance | 9 // DispatchToMethod and DispatchToFunction take a function pointer or instance |
| 10 // and method pointer, and unpack a tuple into arguments to the call. | 10 // and method pointer, and unpack a tuple into arguments to the call. |
| (...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 class InA, class InB, class InC, class InD, class InE, class InF, | 869 class InA, class InB, class InC, class InD, class InE, class InF, |
| 870 class OutA, class OutB, class OutC, class OutD, class OutE> | 870 class OutA, class OutB, class OutC, class OutD, class OutE> |
| 871 inline void DispatchToMethod(ObjT* obj, Method method, | 871 inline void DispatchToMethod(ObjT* obj, Method method, |
| 872 const Tuple6<InA, InB, InC, InD, InE, InF>& in, | 872 const Tuple6<InA, InB, InC, InD, InE, InF>& in, |
| 873 Tuple5<OutA, OutB, OutC, OutD, OutE>* out) { | 873 Tuple5<OutA, OutB, OutC, OutD, OutE>* out) { |
| 874 (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, | 874 (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, |
| 875 &out->a, &out->b, &out->c, &out->d, &out->e); | 875 &out->a, &out->b, &out->c, &out->d, &out->e); |
| 876 } | 876 } |
| 877 | 877 |
| 878 #endif // BASE_TUPLE_H__ | 878 #endif // BASE_TUPLE_H__ |
| 879 | |
| OLD | NEW |