gmock-generated-internal-utils.h
Go to the documentation of this file.
00001 // This file was GENERATED by command:
00002 //     pump.py gmock-generated-internal-utils.h.pump
00003 // DO NOT EDIT BY HAND!!!
00004 
00005 // Copyright 2007, Google Inc.
00006 // All rights reserved.
00007 //
00008 // Redistribution and use in source and binary forms, with or without
00009 // modification, are permitted provided that the following conditions are
00010 // met:
00011 //
00012 //     * Redistributions of source code must retain the above copyright
00013 // notice, this list of conditions and the following disclaimer.
00014 //     * Redistributions in binary form must reproduce the above
00015 // copyright notice, this list of conditions and the following disclaimer
00016 // in the documentation and/or other materials provided with the
00017 // distribution.
00018 //     * Neither the name of Google Inc. nor the names of its
00019 // contributors may be used to endorse or promote products derived from
00020 // this software without specific prior written permission.
00021 //
00022 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00023 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00024 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00025 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00026 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00027 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00028 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00029 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00030 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00031 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00032 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00033 //
00034 // Author: wan@google.com (Zhanyong Wan)
00035 
00036 // Google Mock - a framework for writing C++ mock classes.
00037 //
00038 // This file contains template meta-programming utility classes needed
00039 // for implementing Google Mock.
00040 
00041 #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
00042 #define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
00043 
00044 #include "gmock/internal/gmock-port.h"
00045 
00046 namespace testing {
00047 
00048 template <typename T>
00049 class Matcher;
00050 
00051 namespace internal {
00052 
00053 // An IgnoredValue object can be implicitly constructed from ANY value.
00054 // This is used in implementing the IgnoreResult(a) action.
00055 class IgnoredValue {
00056  public:
00057   // This constructor template allows any value to be implicitly
00058   // converted to IgnoredValue.  The object has no data member and
00059   // doesn't try to remember anything about the argument.  We
00060   // deliberately omit the 'explicit' keyword in order to allow the
00061   // conversion to be implicit.
00062   template <typename T>
00063   IgnoredValue(const T& /* ignored */) {}  // NOLINT(runtime/explicit)
00064 };
00065 
00066 // MatcherTuple<T>::type is a tuple type where each field is a Matcher
00067 // for the corresponding field in tuple type T.
00068 template <typename Tuple>
00069 struct MatcherTuple;
00070 
00071 template <>
00072 struct MatcherTuple< ::std::tr1::tuple<> > {
00073   typedef ::std::tr1::tuple< > type;
00074 };
00075 
00076 template <typename A1>
00077 struct MatcherTuple< ::std::tr1::tuple<A1> > {
00078   typedef ::std::tr1::tuple<Matcher<A1> > type;
00079 };
00080 
00081 template <typename A1, typename A2>
00082 struct MatcherTuple< ::std::tr1::tuple<A1, A2> > {
00083   typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2> > type;
00084 };
00085 
00086 template <typename A1, typename A2, typename A3>
00087 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3> > {
00088   typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3> > type;
00089 };
00090 
00091 template <typename A1, typename A2, typename A3, typename A4>
00092 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4> > {
00093   typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>,
00094       Matcher<A4> > type;
00095 };
00096 
00097 template <typename A1, typename A2, typename A3, typename A4, typename A5>
00098 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5> > {
00099   typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
00100       Matcher<A5> > type;
00101 };
00102 
00103 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00104     typename A6>
00105 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6> > {
00106   typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
00107       Matcher<A5>, Matcher<A6> > type;
00108 };
00109 
00110 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00111     typename A6, typename A7>
00112 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7> > {
00113   typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
00114       Matcher<A5>, Matcher<A6>, Matcher<A7> > type;
00115 };
00116 
00117 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00118     typename A6, typename A7, typename A8>
00119 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
00120   typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
00121       Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8> > type;
00122 };
00123 
00124 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00125     typename A6, typename A7, typename A8, typename A9>
00126 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
00127   typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
00128       Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8>, Matcher<A9> > type;
00129 };
00130 
00131 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00132     typename A6, typename A7, typename A8, typename A9, typename A10>
00133 struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
00134     A10> > {
00135   typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
00136       Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8>, Matcher<A9>,
00137       Matcher<A10> > type;
00138 };
00139 
00140 // Template struct Function<F>, where F must be a function type, contains
00141 // the following typedefs:
00142 //
00143 //   Result:               the function's return type.
00144 //   ArgumentN:            the type of the N-th argument, where N starts with 1.
00145 //   ArgumentTuple:        the tuple type consisting of all parameters of F.
00146 //   ArgumentMatcherTuple: the tuple type consisting of Matchers for all
00147 //                         parameters of F.
00148 //   MakeResultVoid:       the function type obtained by substituting void
00149 //                         for the return type of F.
00150 //   MakeResultIgnoredValue:
00151 //                         the function type obtained by substituting Something
00152 //                         for the return type of F.
00153 template <typename F>
00154 struct Function;
00155 
00156 template <typename R>
00157 struct Function<R()> {
00158   typedef R Result;
00159   typedef ::std::tr1::tuple<> ArgumentTuple;
00160   typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
00161   typedef void MakeResultVoid();
00162   typedef IgnoredValue MakeResultIgnoredValue();
00163 };
00164 
00165 template <typename R, typename A1>
00166 struct Function<R(A1)>
00167     : Function<R()> {
00168   typedef A1 Argument1;
00169   typedef ::std::tr1::tuple<A1> ArgumentTuple;
00170   typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
00171   typedef void MakeResultVoid(A1);
00172   typedef IgnoredValue MakeResultIgnoredValue(A1);
00173 };
00174 
00175 template <typename R, typename A1, typename A2>
00176 struct Function<R(A1, A2)>
00177     : Function<R(A1)> {
00178   typedef A2 Argument2;
00179   typedef ::std::tr1::tuple<A1, A2> ArgumentTuple;
00180   typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
00181   typedef void MakeResultVoid(A1, A2);
00182   typedef IgnoredValue MakeResultIgnoredValue(A1, A2);
00183 };
00184 
00185 template <typename R, typename A1, typename A2, typename A3>
00186 struct Function<R(A1, A2, A3)>
00187     : Function<R(A1, A2)> {
00188   typedef A3 Argument3;
00189   typedef ::std::tr1::tuple<A1, A2, A3> ArgumentTuple;
00190   typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
00191   typedef void MakeResultVoid(A1, A2, A3);
00192   typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3);
00193 };
00194 
00195 template <typename R, typename A1, typename A2, typename A3, typename A4>
00196 struct Function<R(A1, A2, A3, A4)>
00197     : Function<R(A1, A2, A3)> {
00198   typedef A4 Argument4;
00199   typedef ::std::tr1::tuple<A1, A2, A3, A4> ArgumentTuple;
00200   typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
00201   typedef void MakeResultVoid(A1, A2, A3, A4);
00202   typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4);
00203 };
00204 
00205 template <typename R, typename A1, typename A2, typename A3, typename A4,
00206     typename A5>
00207 struct Function<R(A1, A2, A3, A4, A5)>
00208     : Function<R(A1, A2, A3, A4)> {
00209   typedef A5 Argument5;
00210   typedef ::std::tr1::tuple<A1, A2, A3, A4, A5> ArgumentTuple;
00211   typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
00212   typedef void MakeResultVoid(A1, A2, A3, A4, A5);
00213   typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5);
00214 };
00215 
00216 template <typename R, typename A1, typename A2, typename A3, typename A4,
00217     typename A5, typename A6>
00218 struct Function<R(A1, A2, A3, A4, A5, A6)>
00219     : Function<R(A1, A2, A3, A4, A5)> {
00220   typedef A6 Argument6;
00221   typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6> ArgumentTuple;
00222   typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
00223   typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6);
00224   typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6);
00225 };
00226 
00227 template <typename R, typename A1, typename A2, typename A3, typename A4,
00228     typename A5, typename A6, typename A7>
00229 struct Function<R(A1, A2, A3, A4, A5, A6, A7)>
00230     : Function<R(A1, A2, A3, A4, A5, A6)> {
00231   typedef A7 Argument7;
00232   typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7> ArgumentTuple;
00233   typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
00234   typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7);
00235   typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7);
00236 };
00237 
00238 template <typename R, typename A1, typename A2, typename A3, typename A4,
00239     typename A5, typename A6, typename A7, typename A8>
00240 struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8)>
00241     : Function<R(A1, A2, A3, A4, A5, A6, A7)> {
00242   typedef A8 Argument8;
00243   typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8> ArgumentTuple;
00244   typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
00245   typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8);
00246   typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8);
00247 };
00248 
00249 template <typename R, typename A1, typename A2, typename A3, typename A4,
00250     typename A5, typename A6, typename A7, typename A8, typename A9>
00251 struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)>
00252     : Function<R(A1, A2, A3, A4, A5, A6, A7, A8)> {
00253   typedef A9 Argument9;
00254   typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> ArgumentTuple;
00255   typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
00256   typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9);
00257   typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8,
00258       A9);
00259 };
00260 
00261 template <typename R, typename A1, typename A2, typename A3, typename A4,
00262     typename A5, typename A6, typename A7, typename A8, typename A9,
00263     typename A10>
00264 struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)>
00265     : Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
00266   typedef A10 Argument10;
00267   typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
00268       A10> ArgumentTuple;
00269   typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
00270   typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10);
00271   typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8,
00272       A9, A10);
00273 };
00274 
00275 }  // namespace internal
00276 
00277 }  // namespace testing
00278 
00279 #endif  // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_


ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Sat Jun 8 2019 18:24:41