DevTools: consistently use camel case for URL parameter names
[chromium-blink-merge.git] / base / bind_internal_win.h.pump
blob80ee37d70d624302671605f5c31b3dc08a5646ee
1 $$ This is a pump file for generating file templates.  Pump is a python
2 $$ script that is part of the Google Test suite of utilities.  Description
3 $$ can be found here:
4 $$
5 $$ http://code.google.com/p/googletest/wiki/PumpManual
6 $$
8 $var MAX_ARITY = 6
10 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
11 // Use of this source code is governed by a BSD-style license that can be
12 // found in the LICENSE file.
14 // Specializations of FunctionTraits<> for Windows specific calling
15 // conventions.  Please see base/bind_internal.h for more info.
17 #ifndef BASE_BIND_INTERNAL_WIN_H_
18 #define BASE_BIND_INTERNAL_WIN_H_
19 #pragma once
21 // In the x64 architecture in Windows, __fastcall, __stdcall, etc, are all
22 // the same as __cdecl which would turn the following specializations into
23 // multiple definitions.
24 #if !defined(ARCH_CPU_X86_64)
26 namespace base {
27 namespace internal {
29 template <typename Sig>
30 struct FunctionTraits;
32 $range ARITY 0..MAX_ARITY
33 $for ARITY [[
34 $range ARG 1..ARITY
36 // __stdcall Function: Arity $(ARITY).
37 template <typename R[[]]
38 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]>
39 struct FunctionTraits<R(__stdcall *)($for ARG , [[X$(ARG)]])> {
40   typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]);
41   typedef false_type IsMethod;
43   typedef R Return;
45 $if ARITY > 0 [[
47   // Target type for each bound parameter.
49 $for ARG [[
50   typedef X$(ARG) B$(ARG);
52 ]]  $$ for ARG
53 ]]  $$ if ARITY > 0
56 // __fastcall Function: Arity $(ARITY).
57 template <typename R[[]]
58 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]>
59 struct FunctionTraits<R(__fastcall *)($for ARG , [[X$(ARG)]])> {
60   typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]);
61   typedef false_type IsMethod;
63   typedef R Return;
65 $if ARITY > 0 [[
67   // Target type for each bound parameter.
69 $for ARG [[
70   typedef X$(ARG) B$(ARG);
72 ]]  $$ for ARG
73 ]]  $$ if ARITY > 0
76 ]]  $$for ARITY
78 }  // namespace internal
79 }  // namespace base
81 #endif  // !defined(ARCH_CPU_X86_64)
83 #endif  // BASE_BIND_INTERNAL_WIN_H_