library of assembled shared sources

http://lass.cocamware.com

py_tuple.h

Go to the documentation of this file.
00001 /*
00002  * *** ATTENTION!  DO NOT MODIFY THIS FILE DIRECTLY! ***
00003  * 
00004  * It has automatically been generated from py_tuple.tmpl.h
00005  * by param_expander.py on Sun Nov 09 16:55:51 2008.
00006  */
00007 
00008 /** @file
00009  *  @author Bram de Greve (bramz@users.sourceforge.net)
00010  *  @author Tom De Muer (tomdemuer@users.sourceforge.net)
00011  *
00012  *  *** BEGIN LICENSE INFORMATION ***
00013  *  
00014  *  The contents of this file are subject to the Common Public Attribution License 
00015  *  Version 1.0 (the "License"); you may not use this file except in compliance with 
00016  *  the License. You may obtain a copy of the License at 
00017  *  http://lass.sourceforge.net/cpal-license. The License is based on the 
00018  *  Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover 
00019  *  use of software over a computer network and provide for limited attribution for 
00020  *  the Original Developer. In addition, Exhibit A has been modified to be consistent 
00021  *  with Exhibit B.
00022  *  
00023  *  Software distributed under the License is distributed on an "AS IS" basis, WITHOUT 
00024  *  WARRANTY OF ANY KIND, either express or implied. See the License for the specific 
00025  *  language governing rights and limitations under the License.
00026  *  
00027  *  The Original Code is LASS - Library of Assembled Shared Sources.
00028  *  
00029  *  The Initial Developer of the Original Code is Bram de Greve and Tom De Muer.
00030  *  The Original Developer is the Initial Developer.
00031  *  
00032  *  All portions of the code written by the Initial Developer are:
00033  *  Copyright (C) 2004-2007 the Initial Developer.
00034  *  All Rights Reserved.
00035  *  
00036  *  Contributor(s):
00037  *
00038  *  Alternatively, the contents of this file may be used under the terms of the 
00039  *  GNU General Public License Version 2 or later (the GPL), in which case the 
00040  *  provisions of GPL are applicable instead of those above.  If you wish to allow use
00041  *  of your version of this file only under the terms of the GPL and not to allow 
00042  *  others to use your version of this file under the CPAL, indicate your decision by 
00043  *  deleting the provisions above and replace them with the notice and other 
00044  *  provisions required by the GPL License. If you do not delete the provisions above,
00045  *  a recipient may use your version of this file under either the CPAL or the GPL.
00046  *  
00047  *  *** END LICENSE INFORMATION ***
00048  */
00049 
00050 #ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_PY_TUPLE_H
00051 #define LASS_GUARDIAN_OF_INCLUSION_UTIL_PY_TUPLE_H
00052 
00053 #include "util_common.h"
00054 #include "pyobject_plus.h"
00055 
00056 #if LASS_COMPILER_TYPE == LASS_COMPILER_TYPE_MSVC
00057 #   pragma warning(push)
00058 #   pragma warning(disable: 4267) // conversion from 'size_t' to 'unsigned int', possible loss of data
00059 #endif
00060 
00061 namespace lass
00062 {
00063 namespace python
00064 {
00065 namespace impl
00066 {
00067     /** @ingroup Python
00068      *  @internal
00069      */
00070     template <typename P>
00071     inline bool decodeObject(PyObject* in, P& out, int index)
00072     {
00073         if (lass::python::pyGetSimpleObject(in, out) != 0)
00074         {
00075             std::ostringstream buffer;
00076             buffer << "Bad Argument on " << index << "th position";
00077             impl::addMessageHeader(buffer.str());
00078             return false;
00079         }
00080         return true;
00081     }
00082 }
00083 
00084 /** @ingroup Python
00085  */
00086 inline const TPyObjPtr makeTuple()
00087 {
00088     return TPyObjPtr(PyTuple_New(0));
00089 }
00090 
00091 // we don't use PyTuple_Pack, because we want to steal references from pyBuildSimpleObject [Bramz]
00092 
00093 /** @ingroup Python
00094  */
00095 template <typename P1>
00096 const TPyObjPtr makeTuple(const P1& iP1)
00097 {
00098     TPyObjPtr tuple(PyTuple_New(1));
00099     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00100     
00101     return tuple;
00102 }
00103 
00104 /** @ingroup Python
00105  */
00106 template <typename P1, typename P2>
00107 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2)
00108 {
00109     TPyObjPtr tuple(PyTuple_New(2));
00110     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00111     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00112     
00113     return tuple;
00114 }
00115 
00116 /** @ingroup Python
00117  */
00118 template <typename P1, typename P2, typename P3>
00119 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3)
00120 {
00121     TPyObjPtr tuple(PyTuple_New(3));
00122     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00123     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00124     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00125     
00126     return tuple;
00127 }
00128 
00129 /** @ingroup Python
00130  */
00131 template <typename P1, typename P2, typename P3, typename P4>
00132 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4)
00133 {
00134     TPyObjPtr tuple(PyTuple_New(4));
00135     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00136     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00137     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00138     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00139     
00140     return tuple;
00141 }
00142 
00143 /** @ingroup Python
00144  */
00145 template <typename P1, typename P2, typename P3, typename P4, typename P5>
00146 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5)
00147 {
00148     TPyObjPtr tuple(PyTuple_New(5));
00149     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00150     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00151     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00152     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00153     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00154     
00155     return tuple;
00156 }
00157 
00158 /** @ingroup Python
00159  */
00160 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
00161 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6)
00162 {
00163     TPyObjPtr tuple(PyTuple_New(6));
00164     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00165     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00166     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00167     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00168     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00169     if (PyTuple_SetItem(tuple.get(), 5, pyBuildSimpleObject(iP6)) != 0) return TPyObjPtr();
00170     
00171     return tuple;
00172 }
00173 
00174 /** @ingroup Python
00175  */
00176 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
00177 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7)
00178 {
00179     TPyObjPtr tuple(PyTuple_New(7));
00180     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00181     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00182     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00183     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00184     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00185     if (PyTuple_SetItem(tuple.get(), 5, pyBuildSimpleObject(iP6)) != 0) return TPyObjPtr();
00186     if (PyTuple_SetItem(tuple.get(), 6, pyBuildSimpleObject(iP7)) != 0) return TPyObjPtr();
00187     
00188     return tuple;
00189 }
00190 
00191 /** @ingroup Python
00192  */
00193 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
00194 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8)
00195 {
00196     TPyObjPtr tuple(PyTuple_New(8));
00197     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00198     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00199     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00200     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00201     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00202     if (PyTuple_SetItem(tuple.get(), 5, pyBuildSimpleObject(iP6)) != 0) return TPyObjPtr();
00203     if (PyTuple_SetItem(tuple.get(), 6, pyBuildSimpleObject(iP7)) != 0) return TPyObjPtr();
00204     if (PyTuple_SetItem(tuple.get(), 7, pyBuildSimpleObject(iP8)) != 0) return TPyObjPtr();
00205     
00206     return tuple;
00207 }
00208 
00209 /** @ingroup Python
00210  */
00211 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9>
00212 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9)
00213 {
00214     TPyObjPtr tuple(PyTuple_New(9));
00215     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00216     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00217     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00218     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00219     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00220     if (PyTuple_SetItem(tuple.get(), 5, pyBuildSimpleObject(iP6)) != 0) return TPyObjPtr();
00221     if (PyTuple_SetItem(tuple.get(), 6, pyBuildSimpleObject(iP7)) != 0) return TPyObjPtr();
00222     if (PyTuple_SetItem(tuple.get(), 7, pyBuildSimpleObject(iP8)) != 0) return TPyObjPtr();
00223     if (PyTuple_SetItem(tuple.get(), 8, pyBuildSimpleObject(iP9)) != 0) return TPyObjPtr();
00224     
00225     return tuple;
00226 }
00227 
00228 /** @ingroup Python
00229  */
00230 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10>
00231 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10)
00232 {
00233     TPyObjPtr tuple(PyTuple_New(10));
00234     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00235     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00236     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00237     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00238     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00239     if (PyTuple_SetItem(tuple.get(), 5, pyBuildSimpleObject(iP6)) != 0) return TPyObjPtr();
00240     if (PyTuple_SetItem(tuple.get(), 6, pyBuildSimpleObject(iP7)) != 0) return TPyObjPtr();
00241     if (PyTuple_SetItem(tuple.get(), 7, pyBuildSimpleObject(iP8)) != 0) return TPyObjPtr();
00242     if (PyTuple_SetItem(tuple.get(), 8, pyBuildSimpleObject(iP9)) != 0) return TPyObjPtr();
00243     if (PyTuple_SetItem(tuple.get(), 9, pyBuildSimpleObject(iP10)) != 0) return TPyObjPtr();
00244     
00245     return tuple;
00246 }
00247 
00248 /** @ingroup Python
00249  */
00250 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11>
00251 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11)
00252 {
00253     TPyObjPtr tuple(PyTuple_New(11));
00254     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00255     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00256     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00257     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00258     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00259     if (PyTuple_SetItem(tuple.get(), 5, pyBuildSimpleObject(iP6)) != 0) return TPyObjPtr();
00260     if (PyTuple_SetItem(tuple.get(), 6, pyBuildSimpleObject(iP7)) != 0) return TPyObjPtr();
00261     if (PyTuple_SetItem(tuple.get(), 7, pyBuildSimpleObject(iP8)) != 0) return TPyObjPtr();
00262     if (PyTuple_SetItem(tuple.get(), 8, pyBuildSimpleObject(iP9)) != 0) return TPyObjPtr();
00263     if (PyTuple_SetItem(tuple.get(), 9, pyBuildSimpleObject(iP10)) != 0) return TPyObjPtr();
00264     if (PyTuple_SetItem(tuple.get(), 10, pyBuildSimpleObject(iP11)) != 0) return TPyObjPtr();
00265     
00266     return tuple;
00267 }
00268 
00269 /** @ingroup Python
00270  */
00271 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12>
00272 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12)
00273 {
00274     TPyObjPtr tuple(PyTuple_New(12));
00275     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00276     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00277     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00278     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00279     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00280     if (PyTuple_SetItem(tuple.get(), 5, pyBuildSimpleObject(iP6)) != 0) return TPyObjPtr();
00281     if (PyTuple_SetItem(tuple.get(), 6, pyBuildSimpleObject(iP7)) != 0) return TPyObjPtr();
00282     if (PyTuple_SetItem(tuple.get(), 7, pyBuildSimpleObject(iP8)) != 0) return TPyObjPtr();
00283     if (PyTuple_SetItem(tuple.get(), 8, pyBuildSimpleObject(iP9)) != 0) return TPyObjPtr();
00284     if (PyTuple_SetItem(tuple.get(), 9, pyBuildSimpleObject(iP10)) != 0) return TPyObjPtr();
00285     if (PyTuple_SetItem(tuple.get(), 10, pyBuildSimpleObject(iP11)) != 0) return TPyObjPtr();
00286     if (PyTuple_SetItem(tuple.get(), 11, pyBuildSimpleObject(iP12)) != 0) return TPyObjPtr();
00287     
00288     return tuple;
00289 }
00290 
00291 /** @ingroup Python
00292  */
00293 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13>
00294 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12, const P13& iP13)
00295 {
00296     TPyObjPtr tuple(PyTuple_New(13));
00297     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00298     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00299     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00300     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00301     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00302     if (PyTuple_SetItem(tuple.get(), 5, pyBuildSimpleObject(iP6)) != 0) return TPyObjPtr();
00303     if (PyTuple_SetItem(tuple.get(), 6, pyBuildSimpleObject(iP7)) != 0) return TPyObjPtr();
00304     if (PyTuple_SetItem(tuple.get(), 7, pyBuildSimpleObject(iP8)) != 0) return TPyObjPtr();
00305     if (PyTuple_SetItem(tuple.get(), 8, pyBuildSimpleObject(iP9)) != 0) return TPyObjPtr();
00306     if (PyTuple_SetItem(tuple.get(), 9, pyBuildSimpleObject(iP10)) != 0) return TPyObjPtr();
00307     if (PyTuple_SetItem(tuple.get(), 10, pyBuildSimpleObject(iP11)) != 0) return TPyObjPtr();
00308     if (PyTuple_SetItem(tuple.get(), 11, pyBuildSimpleObject(iP12)) != 0) return TPyObjPtr();
00309     if (PyTuple_SetItem(tuple.get(), 12, pyBuildSimpleObject(iP13)) != 0) return TPyObjPtr();
00310     
00311     return tuple;
00312 }
00313 
00314 /** @ingroup Python
00315  */
00316 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14>
00317 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12, const P13& iP13, const P14& iP14)
00318 {
00319     TPyObjPtr tuple(PyTuple_New(14));
00320     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00321     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00322     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00323     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00324     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00325     if (PyTuple_SetItem(tuple.get(), 5, pyBuildSimpleObject(iP6)) != 0) return TPyObjPtr();
00326     if (PyTuple_SetItem(tuple.get(), 6, pyBuildSimpleObject(iP7)) != 0) return TPyObjPtr();
00327     if (PyTuple_SetItem(tuple.get(), 7, pyBuildSimpleObject(iP8)) != 0) return TPyObjPtr();
00328     if (PyTuple_SetItem(tuple.get(), 8, pyBuildSimpleObject(iP9)) != 0) return TPyObjPtr();
00329     if (PyTuple_SetItem(tuple.get(), 9, pyBuildSimpleObject(iP10)) != 0) return TPyObjPtr();
00330     if (PyTuple_SetItem(tuple.get(), 10, pyBuildSimpleObject(iP11)) != 0) return TPyObjPtr();
00331     if (PyTuple_SetItem(tuple.get(), 11, pyBuildSimpleObject(iP12)) != 0) return TPyObjPtr();
00332     if (PyTuple_SetItem(tuple.get(), 12, pyBuildSimpleObject(iP13)) != 0) return TPyObjPtr();
00333     if (PyTuple_SetItem(tuple.get(), 13, pyBuildSimpleObject(iP14)) != 0) return TPyObjPtr();
00334     
00335     return tuple;
00336 }
00337 
00338 /** @ingroup Python
00339  */
00340 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15>
00341 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12, const P13& iP13, const P14& iP14, const P15& iP15)
00342 {
00343     TPyObjPtr tuple(PyTuple_New(15));
00344     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00345     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00346     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00347     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00348     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00349     if (PyTuple_SetItem(tuple.get(), 5, pyBuildSimpleObject(iP6)) != 0) return TPyObjPtr();
00350     if (PyTuple_SetItem(tuple.get(), 6, pyBuildSimpleObject(iP7)) != 0) return TPyObjPtr();
00351     if (PyTuple_SetItem(tuple.get(), 7, pyBuildSimpleObject(iP8)) != 0) return TPyObjPtr();
00352     if (PyTuple_SetItem(tuple.get(), 8, pyBuildSimpleObject(iP9)) != 0) return TPyObjPtr();
00353     if (PyTuple_SetItem(tuple.get(), 9, pyBuildSimpleObject(iP10)) != 0) return TPyObjPtr();
00354     if (PyTuple_SetItem(tuple.get(), 10, pyBuildSimpleObject(iP11)) != 0) return TPyObjPtr();
00355     if (PyTuple_SetItem(tuple.get(), 11, pyBuildSimpleObject(iP12)) != 0) return TPyObjPtr();
00356     if (PyTuple_SetItem(tuple.get(), 12, pyBuildSimpleObject(iP13)) != 0) return TPyObjPtr();
00357     if (PyTuple_SetItem(tuple.get(), 13, pyBuildSimpleObject(iP14)) != 0) return TPyObjPtr();
00358     if (PyTuple_SetItem(tuple.get(), 14, pyBuildSimpleObject(iP15)) != 0) return TPyObjPtr();
00359     
00360     return tuple;
00361 }
00362 
00363 /** @ingroup Python
00364  */
00365 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16>
00366 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12, const P13& iP13, const P14& iP14, const P15& iP15, const P16& iP16)
00367 {
00368     TPyObjPtr tuple(PyTuple_New(16));
00369     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00370     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00371     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00372     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00373     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00374     if (PyTuple_SetItem(tuple.get(), 5, pyBuildSimpleObject(iP6)) != 0) return TPyObjPtr();
00375     if (PyTuple_SetItem(tuple.get(), 6, pyBuildSimpleObject(iP7)) != 0) return TPyObjPtr();
00376     if (PyTuple_SetItem(tuple.get(), 7, pyBuildSimpleObject(iP8)) != 0) return TPyObjPtr();
00377     if (PyTuple_SetItem(tuple.get(), 8, pyBuildSimpleObject(iP9)) != 0) return TPyObjPtr();
00378     if (PyTuple_SetItem(tuple.get(), 9, pyBuildSimpleObject(iP10)) != 0) return TPyObjPtr();
00379     if (PyTuple_SetItem(tuple.get(), 10, pyBuildSimpleObject(iP11)) != 0) return TPyObjPtr();
00380     if (PyTuple_SetItem(tuple.get(), 11, pyBuildSimpleObject(iP12)) != 0) return TPyObjPtr();
00381     if (PyTuple_SetItem(tuple.get(), 12, pyBuildSimpleObject(iP13)) != 0) return TPyObjPtr();
00382     if (PyTuple_SetItem(tuple.get(), 13, pyBuildSimpleObject(iP14)) != 0) return TPyObjPtr();
00383     if (PyTuple_SetItem(tuple.get(), 14, pyBuildSimpleObject(iP15)) != 0) return TPyObjPtr();
00384     if (PyTuple_SetItem(tuple.get(), 15, pyBuildSimpleObject(iP16)) != 0) return TPyObjPtr();
00385     
00386     return tuple;
00387 }
00388 
00389 /** @ingroup Python
00390  */
00391 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16, typename P17>
00392 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12, const P13& iP13, const P14& iP14, const P15& iP15, const P16& iP16, const P17& iP17)
00393 {
00394     TPyObjPtr tuple(PyTuple_New(17));
00395     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00396     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00397     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00398     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00399     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00400     if (PyTuple_SetItem(tuple.get(), 5, pyBuildSimpleObject(iP6)) != 0) return TPyObjPtr();
00401     if (PyTuple_SetItem(tuple.get(), 6, pyBuildSimpleObject(iP7)) != 0) return TPyObjPtr();
00402     if (PyTuple_SetItem(tuple.get(), 7, pyBuildSimpleObject(iP8)) != 0) return TPyObjPtr();
00403     if (PyTuple_SetItem(tuple.get(), 8, pyBuildSimpleObject(iP9)) != 0) return TPyObjPtr();
00404     if (PyTuple_SetItem(tuple.get(), 9, pyBuildSimpleObject(iP10)) != 0) return TPyObjPtr();
00405     if (PyTuple_SetItem(tuple.get(), 10, pyBuildSimpleObject(iP11)) != 0) return TPyObjPtr();
00406     if (PyTuple_SetItem(tuple.get(), 11, pyBuildSimpleObject(iP12)) != 0) return TPyObjPtr();
00407     if (PyTuple_SetItem(tuple.get(), 12, pyBuildSimpleObject(iP13)) != 0) return TPyObjPtr();
00408     if (PyTuple_SetItem(tuple.get(), 13, pyBuildSimpleObject(iP14)) != 0) return TPyObjPtr();
00409     if (PyTuple_SetItem(tuple.get(), 14, pyBuildSimpleObject(iP15)) != 0) return TPyObjPtr();
00410     if (PyTuple_SetItem(tuple.get(), 15, pyBuildSimpleObject(iP16)) != 0) return TPyObjPtr();
00411     if (PyTuple_SetItem(tuple.get(), 16, pyBuildSimpleObject(iP17)) != 0) return TPyObjPtr();
00412     
00413     return tuple;
00414 }
00415 
00416 /** @ingroup Python
00417  */
00418 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16, typename P17, typename P18>
00419 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12, const P13& iP13, const P14& iP14, const P15& iP15, const P16& iP16, const P17& iP17, const P18& iP18)
00420 {
00421     TPyObjPtr tuple(PyTuple_New(18));
00422     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00423     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00424     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00425     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00426     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00427     if (PyTuple_SetItem(tuple.get(), 5, pyBuildSimpleObject(iP6)) != 0) return TPyObjPtr();
00428     if (PyTuple_SetItem(tuple.get(), 6, pyBuildSimpleObject(iP7)) != 0) return TPyObjPtr();
00429     if (PyTuple_SetItem(tuple.get(), 7, pyBuildSimpleObject(iP8)) != 0) return TPyObjPtr();
00430     if (PyTuple_SetItem(tuple.get(), 8, pyBuildSimpleObject(iP9)) != 0) return TPyObjPtr();
00431     if (PyTuple_SetItem(tuple.get(), 9, pyBuildSimpleObject(iP10)) != 0) return TPyObjPtr();
00432     if (PyTuple_SetItem(tuple.get(), 10, pyBuildSimpleObject(iP11)) != 0) return TPyObjPtr();
00433     if (PyTuple_SetItem(tuple.get(), 11, pyBuildSimpleObject(iP12)) != 0) return TPyObjPtr();
00434     if (PyTuple_SetItem(tuple.get(), 12, pyBuildSimpleObject(iP13)) != 0) return TPyObjPtr();
00435     if (PyTuple_SetItem(tuple.get(), 13, pyBuildSimpleObject(iP14)) != 0) return TPyObjPtr();
00436     if (PyTuple_SetItem(tuple.get(), 14, pyBuildSimpleObject(iP15)) != 0) return TPyObjPtr();
00437     if (PyTuple_SetItem(tuple.get(), 15, pyBuildSimpleObject(iP16)) != 0) return TPyObjPtr();
00438     if (PyTuple_SetItem(tuple.get(), 16, pyBuildSimpleObject(iP17)) != 0) return TPyObjPtr();
00439     if (PyTuple_SetItem(tuple.get(), 17, pyBuildSimpleObject(iP18)) != 0) return TPyObjPtr();
00440     
00441     return tuple;
00442 }
00443 
00444 /** @ingroup Python
00445  */
00446 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16, typename P17, typename P18, typename P19>
00447 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12, const P13& iP13, const P14& iP14, const P15& iP15, const P16& iP16, const P17& iP17, const P18& iP18, const P19& iP19)
00448 {
00449     TPyObjPtr tuple(PyTuple_New(19));
00450     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00451     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00452     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00453     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00454     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00455     if (PyTuple_SetItem(tuple.get(), 5, pyBuildSimpleObject(iP6)) != 0) return TPyObjPtr();
00456     if (PyTuple_SetItem(tuple.get(), 6, pyBuildSimpleObject(iP7)) != 0) return TPyObjPtr();
00457     if (PyTuple_SetItem(tuple.get(), 7, pyBuildSimpleObject(iP8)) != 0) return TPyObjPtr();
00458     if (PyTuple_SetItem(tuple.get(), 8, pyBuildSimpleObject(iP9)) != 0) return TPyObjPtr();
00459     if (PyTuple_SetItem(tuple.get(), 9, pyBuildSimpleObject(iP10)) != 0) return TPyObjPtr();
00460     if (PyTuple_SetItem(tuple.get(), 10, pyBuildSimpleObject(iP11)) != 0) return TPyObjPtr();
00461     if (PyTuple_SetItem(tuple.get(), 11, pyBuildSimpleObject(iP12)) != 0) return TPyObjPtr();
00462     if (PyTuple_SetItem(tuple.get(), 12, pyBuildSimpleObject(iP13)) != 0) return TPyObjPtr();
00463     if (PyTuple_SetItem(tuple.get(), 13, pyBuildSimpleObject(iP14)) != 0) return TPyObjPtr();
00464     if (PyTuple_SetItem(tuple.get(), 14, pyBuildSimpleObject(iP15)) != 0) return TPyObjPtr();
00465     if (PyTuple_SetItem(tuple.get(), 15, pyBuildSimpleObject(iP16)) != 0) return TPyObjPtr();
00466     if (PyTuple_SetItem(tuple.get(), 16, pyBuildSimpleObject(iP17)) != 0) return TPyObjPtr();
00467     if (PyTuple_SetItem(tuple.get(), 17, pyBuildSimpleObject(iP18)) != 0) return TPyObjPtr();
00468     if (PyTuple_SetItem(tuple.get(), 18, pyBuildSimpleObject(iP19)) != 0) return TPyObjPtr();
00469     
00470     return tuple;
00471 }
00472 
00473 /** @ingroup Python
00474  */
00475 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16, typename P17, typename P18, typename P19, typename P20>
00476 const TPyObjPtr makeTuple(const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12, const P13& iP13, const P14& iP14, const P15& iP15, const P16& iP16, const P17& iP17, const P18& iP18, const P19& iP19, const P20& iP20)
00477 {
00478     TPyObjPtr tuple(PyTuple_New(20));
00479     if (PyTuple_SetItem(tuple.get(), 0, pyBuildSimpleObject(iP1)) != 0) return TPyObjPtr();
00480     if (PyTuple_SetItem(tuple.get(), 1, pyBuildSimpleObject(iP2)) != 0) return TPyObjPtr();
00481     if (PyTuple_SetItem(tuple.get(), 2, pyBuildSimpleObject(iP3)) != 0) return TPyObjPtr();
00482     if (PyTuple_SetItem(tuple.get(), 3, pyBuildSimpleObject(iP4)) != 0) return TPyObjPtr();
00483     if (PyTuple_SetItem(tuple.get(), 4, pyBuildSimpleObject(iP5)) != 0) return TPyObjPtr();
00484     if (PyTuple_SetItem(tuple.get(), 5, pyBuildSimpleObject(iP6)) != 0) return TPyObjPtr();
00485     if (PyTuple_SetItem(tuple.get(), 6, pyBuildSimpleObject(iP7)) != 0) return TPyObjPtr();
00486     if (PyTuple_SetItem(tuple.get(), 7, pyBuildSimpleObject(iP8)) != 0) return TPyObjPtr();
00487     if (PyTuple_SetItem(tuple.get(), 8, pyBuildSimpleObject(iP9)) != 0) return TPyObjPtr();
00488     if (PyTuple_SetItem(tuple.get(), 9, pyBuildSimpleObject(iP10)) != 0) return TPyObjPtr();
00489     if (PyTuple_SetItem(tuple.get(), 10, pyBuildSimpleObject(iP11)) != 0) return TPyObjPtr();
00490     if (PyTuple_SetItem(tuple.get(), 11, pyBuildSimpleObject(iP12)) != 0) return TPyObjPtr();
00491     if (PyTuple_SetItem(tuple.get(), 12, pyBuildSimpleObject(iP13)) != 0) return TPyObjPtr();
00492     if (PyTuple_SetItem(tuple.get(), 13, pyBuildSimpleObject(iP14)) != 0) return TPyObjPtr();
00493     if (PyTuple_SetItem(tuple.get(), 14, pyBuildSimpleObject(iP15)) != 0) return TPyObjPtr();
00494     if (PyTuple_SetItem(tuple.get(), 15, pyBuildSimpleObject(iP16)) != 0) return TPyObjPtr();
00495     if (PyTuple_SetItem(tuple.get(), 16, pyBuildSimpleObject(iP17)) != 0) return TPyObjPtr();
00496     if (PyTuple_SetItem(tuple.get(), 17, pyBuildSimpleObject(iP18)) != 0) return TPyObjPtr();
00497     if (PyTuple_SetItem(tuple.get(), 18, pyBuildSimpleObject(iP19)) != 0) return TPyObjPtr();
00498     if (PyTuple_SetItem(tuple.get(), 19, pyBuildSimpleObject(iP20)) != 0) return TPyObjPtr();
00499     
00500     return tuple;
00501 }
00502 
00503 
00504 /** @ingroup Python
00505  */
00506 inline int decodeTuple(PyObject* iTuple)
00507 {
00508     LASS_ASSERT(iTuple);
00509     return impl::checkSequenceSize(iTuple, 0) ? 0 : 1;
00510 }
00511 
00512 /** @ingroup Python
00513  */
00514 inline int decodeTuple(const TPyObjPtr& iTuple)
00515 {
00516     return decodeTuple(iTuple.get());
00517 }
00518 
00519 
00520 /** @ingroup Python
00521  */
00522 template <typename P1>
00523 int decodeTuple(PyObject* iTuple, P1& oP1)
00524 {
00525     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 1);
00526     if (!tuple)
00527     {
00528         return 1;
00529     }
00530     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
00531     return true
00532         && impl::decodeObject(objects[0], oP1, 1) 
00533         ? 0 : 1;
00534 
00535 }
00536 
00537 /** @ingroup Python
00538  */
00539 template <typename P1> inline
00540 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1)
00541 {
00542     return decodeTuple(iTuple.get(), oP1);
00543 }
00544 
00545 /** @ingroup Python
00546  */
00547 template <typename P1, typename P2>
00548 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2)
00549 {
00550     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 2);
00551     if (!tuple)
00552     {
00553         return 1;
00554     }
00555     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
00556     return true
00557         && impl::decodeObject(objects[0], oP1, 1) 
00558         && impl::decodeObject(objects[1], oP2, 2) 
00559         ? 0 : 1;
00560 
00561 }
00562 
00563 /** @ingroup Python
00564  */
00565 template <typename P1, typename P2> inline
00566 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2)
00567 {
00568     return decodeTuple(iTuple.get(), oP1, oP2);
00569 }
00570 
00571 /** @ingroup Python
00572  */
00573 template <typename P1, typename P2, typename P3>
00574 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3)
00575 {
00576     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 3);
00577     if (!tuple)
00578     {
00579         return 1;
00580     }
00581     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
00582     return true
00583         && impl::decodeObject(objects[0], oP1, 1) 
00584         && impl::decodeObject(objects[1], oP2, 2) 
00585         && impl::decodeObject(objects[2], oP3, 3) 
00586         ? 0 : 1;
00587 
00588 }
00589 
00590 /** @ingroup Python
00591  */
00592 template <typename P1, typename P2, typename P3> inline
00593 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3)
00594 {
00595     return decodeTuple(iTuple.get(), oP1, oP2, oP3);
00596 }
00597 
00598 /** @ingroup Python
00599  */
00600 template <typename P1, typename P2, typename P3, typename P4>
00601 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4)
00602 {
00603     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 4);
00604     if (!tuple)
00605     {
00606         return 1;
00607     }
00608     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
00609     return true
00610         && impl::decodeObject(objects[0], oP1, 1) 
00611         && impl::decodeObject(objects[1], oP2, 2) 
00612         && impl::decodeObject(objects[2], oP3, 3) 
00613         && impl::decodeObject(objects[3], oP4, 4) 
00614         ? 0 : 1;
00615 
00616 }
00617 
00618 /** @ingroup Python
00619  */
00620 template <typename P1, typename P2, typename P3, typename P4> inline
00621 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4)
00622 {
00623     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4);
00624 }
00625 
00626 /** @ingroup Python
00627  */
00628 template <typename P1, typename P2, typename P3, typename P4, typename P5>
00629 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5)
00630 {
00631     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 5);
00632     if (!tuple)
00633     {
00634         return 1;
00635     }
00636     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
00637     return true
00638         && impl::decodeObject(objects[0], oP1, 1) 
00639         && impl::decodeObject(objects[1], oP2, 2) 
00640         && impl::decodeObject(objects[2], oP3, 3) 
00641         && impl::decodeObject(objects[3], oP4, 4) 
00642         && impl::decodeObject(objects[4], oP5, 5) 
00643         ? 0 : 1;
00644 
00645 }
00646 
00647 /** @ingroup Python
00648  */
00649 template <typename P1, typename P2, typename P3, typename P4, typename P5> inline
00650 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5)
00651 {
00652     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5);
00653 }
00654 
00655 /** @ingroup Python
00656  */
00657 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
00658 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6)
00659 {
00660     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 6);
00661     if (!tuple)
00662     {
00663         return 1;
00664     }
00665     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
00666     return true
00667         && impl::decodeObject(objects[0], oP1, 1) 
00668         && impl::decodeObject(objects[1], oP2, 2) 
00669         && impl::decodeObject(objects[2], oP3, 3) 
00670         && impl::decodeObject(objects[3], oP4, 4) 
00671         && impl::decodeObject(objects[4], oP5, 5) 
00672         && impl::decodeObject(objects[5], oP6, 6) 
00673         ? 0 : 1;
00674 
00675 }
00676 
00677 /** @ingroup Python
00678  */
00679 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> inline
00680 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6)
00681 {
00682     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5, oP6);
00683 }
00684 
00685 /** @ingroup Python
00686  */
00687 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
00688 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7)
00689 {
00690     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 7);
00691     if (!tuple)
00692     {
00693         return 1;
00694     }
00695     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
00696     return true
00697         && impl::decodeObject(objects[0], oP1, 1) 
00698         && impl::decodeObject(objects[1], oP2, 2) 
00699         && impl::decodeObject(objects[2], oP3, 3) 
00700         && impl::decodeObject(objects[3], oP4, 4) 
00701         && impl::decodeObject(objects[4], oP5, 5) 
00702         && impl::decodeObject(objects[5], oP6, 6) 
00703         && impl::decodeObject(objects[6], oP7, 7) 
00704         ? 0 : 1;
00705 
00706 }
00707 
00708 /** @ingroup Python
00709  */
00710 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7> inline
00711 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7)
00712 {
00713     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5, oP6, oP7);
00714 }
00715 
00716 /** @ingroup Python
00717  */
00718 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
00719 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8)
00720 {
00721     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 8);
00722     if (!tuple)
00723     {
00724         return 1;
00725     }
00726     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
00727     return true
00728         && impl::decodeObject(objects[0], oP1, 1) 
00729         && impl::decodeObject(objects[1], oP2, 2) 
00730         && impl::decodeObject(objects[2], oP3, 3) 
00731         && impl::decodeObject(objects[3], oP4, 4) 
00732         && impl::decodeObject(objects[4], oP5, 5) 
00733         && impl::decodeObject(objects[5], oP6, 6) 
00734         && impl::decodeObject(objects[6], oP7, 7) 
00735         && impl::decodeObject(objects[7], oP8, 8) 
00736         ? 0 : 1;
00737 
00738 }
00739 
00740 /** @ingroup Python
00741  */
00742 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8> inline
00743 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8)
00744 {
00745     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5, oP6, oP7, oP8);
00746 }
00747 
00748 /** @ingroup Python
00749  */
00750 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9>
00751 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9)
00752 {
00753     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 9);
00754     if (!tuple)
00755     {
00756         return 1;
00757     }
00758     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
00759     return true
00760         && impl::decodeObject(objects[0], oP1, 1) 
00761         && impl::decodeObject(objects[1], oP2, 2) 
00762         && impl::decodeObject(objects[2], oP3, 3) 
00763         && impl::decodeObject(objects[3], oP4, 4) 
00764         && impl::decodeObject(objects[4], oP5, 5) 
00765         && impl::decodeObject(objects[5], oP6, 6) 
00766         && impl::decodeObject(objects[6], oP7, 7) 
00767         && impl::decodeObject(objects[7], oP8, 8) 
00768         && impl::decodeObject(objects[8], oP9, 9) 
00769         ? 0 : 1;
00770 
00771 }
00772 
00773 /** @ingroup Python
00774  */
00775 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9> inline
00776 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9)
00777 {
00778     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5, oP6, oP7, oP8, oP9);
00779 }
00780 
00781 /** @ingroup Python
00782  */
00783 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10>
00784 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10)
00785 {
00786     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 10);
00787     if (!tuple)
00788     {
00789         return 1;
00790     }
00791     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
00792     return true
00793         && impl::decodeObject(objects[0], oP1, 1) 
00794         && impl::decodeObject(objects[1], oP2, 2) 
00795         && impl::decodeObject(objects[2], oP3, 3) 
00796         && impl::decodeObject(objects[3], oP4, 4) 
00797         && impl::decodeObject(objects[4], oP5, 5) 
00798         && impl::decodeObject(objects[5], oP6, 6) 
00799         && impl::decodeObject(objects[6], oP7, 7) 
00800         && impl::decodeObject(objects[7], oP8, 8) 
00801         && impl::decodeObject(objects[8], oP9, 9) 
00802         && impl::decodeObject(objects[9], oP10, 10) 
00803         ? 0 : 1;
00804 
00805 }
00806 
00807 /** @ingroup Python
00808  */
00809 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10> inline
00810 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10)
00811 {
00812     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5, oP6, oP7, oP8, oP9, oP10);
00813 }
00814 
00815 /** @ingroup Python
00816  */
00817 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11>
00818 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11)
00819 {
00820     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 11);
00821     if (!tuple)
00822     {
00823         return 1;
00824     }
00825     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
00826     return true
00827         && impl::decodeObject(objects[0], oP1, 1) 
00828         && impl::decodeObject(objects[1], oP2, 2) 
00829         && impl::decodeObject(objects[2], oP3, 3) 
00830         && impl::decodeObject(objects[3], oP4, 4) 
00831         && impl::decodeObject(objects[4], oP5, 5) 
00832         && impl::decodeObject(objects[5], oP6, 6) 
00833         && impl::decodeObject(objects[6], oP7, 7) 
00834         && impl::decodeObject(objects[7], oP8, 8) 
00835         && impl::decodeObject(objects[8], oP9, 9) 
00836         && impl::decodeObject(objects[9], oP10, 10) 
00837         && impl::decodeObject(objects[10], oP11, 11) 
00838         ? 0 : 1;
00839 
00840 }
00841 
00842 /** @ingroup Python
00843  */
00844 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11> inline
00845 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11)
00846 {
00847     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5, oP6, oP7, oP8, oP9, oP10, oP11);
00848 }
00849 
00850 /** @ingroup Python
00851  */
00852 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12>
00853 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12)
00854 {
00855     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 12);
00856     if (!tuple)
00857     {
00858         return 1;
00859     }
00860     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
00861     return true
00862         && impl::decodeObject(objects[0], oP1, 1) 
00863         && impl::decodeObject(objects[1], oP2, 2) 
00864         && impl::decodeObject(objects[2], oP3, 3) 
00865         && impl::decodeObject(objects[3], oP4, 4) 
00866         && impl::decodeObject(objects[4], oP5, 5) 
00867         && impl::decodeObject(objects[5], oP6, 6) 
00868         && impl::decodeObject(objects[6], oP7, 7) 
00869         && impl::decodeObject(objects[7], oP8, 8) 
00870         && impl::decodeObject(objects[8], oP9, 9) 
00871         && impl::decodeObject(objects[9], oP10, 10) 
00872         && impl::decodeObject(objects[10], oP11, 11) 
00873         && impl::decodeObject(objects[11], oP12, 12) 
00874         ? 0 : 1;
00875 
00876 }
00877 
00878 /** @ingroup Python
00879  */
00880 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12> inline
00881 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12)
00882 {
00883     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5, oP6, oP7, oP8, oP9, oP10, oP11, oP12);
00884 }
00885 
00886 /** @ingroup Python
00887  */
00888 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13>
00889 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13)
00890 {
00891     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 13);
00892     if (!tuple)
00893     {
00894         return 1;
00895     }
00896     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
00897     return true
00898         && impl::decodeObject(objects[0], oP1, 1) 
00899         && impl::decodeObject(objects[1], oP2, 2) 
00900         && impl::decodeObject(objects[2], oP3, 3) 
00901         && impl::decodeObject(objects[3], oP4, 4) 
00902         && impl::decodeObject(objects[4], oP5, 5) 
00903         && impl::decodeObject(objects[5], oP6, 6) 
00904         && impl::decodeObject(objects[6], oP7, 7) 
00905         && impl::decodeObject(objects[7], oP8, 8) 
00906         && impl::decodeObject(objects[8], oP9, 9) 
00907         && impl::decodeObject(objects[9], oP10, 10) 
00908         && impl::decodeObject(objects[10], oP11, 11) 
00909         && impl::decodeObject(objects[11], oP12, 12) 
00910         && impl::decodeObject(objects[12], oP13, 13) 
00911         ? 0 : 1;
00912 
00913 }
00914 
00915 /** @ingroup Python
00916  */
00917 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13> inline
00918 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13)
00919 {
00920     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5, oP6, oP7, oP8, oP9, oP10, oP11, oP12, oP13);
00921 }
00922 
00923 /** @ingroup Python
00924  */
00925 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14>
00926 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13, P14& oP14)
00927 {
00928     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 14);
00929     if (!tuple)
00930     {
00931         return 1;
00932     }
00933     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
00934     return true
00935         && impl::decodeObject(objects[0], oP1, 1) 
00936         && impl::decodeObject(objects[1], oP2, 2) 
00937         && impl::decodeObject(objects[2], oP3, 3) 
00938         && impl::decodeObject(objects[3], oP4, 4) 
00939         && impl::decodeObject(objects[4], oP5, 5) 
00940         && impl::decodeObject(objects[5], oP6, 6) 
00941         && impl::decodeObject(objects[6], oP7, 7) 
00942         && impl::decodeObject(objects[7], oP8, 8) 
00943         && impl::decodeObject(objects[8], oP9, 9) 
00944         && impl::decodeObject(objects[9], oP10, 10) 
00945         && impl::decodeObject(objects[10], oP11, 11) 
00946         && impl::decodeObject(objects[11], oP12, 12) 
00947         && impl::decodeObject(objects[12], oP13, 13) 
00948         && impl::decodeObject(objects[13], oP14, 14) 
00949         ? 0 : 1;
00950 
00951 }
00952 
00953 /** @ingroup Python
00954  */
00955 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14> inline
00956 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13, P14& oP14)
00957 {
00958     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5, oP6, oP7, oP8, oP9, oP10, oP11, oP12, oP13, oP14);
00959 }
00960 
00961 /** @ingroup Python
00962  */
00963 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15>
00964 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13, P14& oP14, P15& oP15)
00965 {
00966     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 15);
00967     if (!tuple)
00968     {
00969         return 1;
00970     }
00971     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
00972     return true
00973         && impl::decodeObject(objects[0], oP1, 1) 
00974         && impl::decodeObject(objects[1], oP2, 2) 
00975         && impl::decodeObject(objects[2], oP3, 3) 
00976         && impl::decodeObject(objects[3], oP4, 4) 
00977         && impl::decodeObject(objects[4], oP5, 5) 
00978         && impl::decodeObject(objects[5], oP6, 6) 
00979         && impl::decodeObject(objects[6], oP7, 7) 
00980         && impl::decodeObject(objects[7], oP8, 8) 
00981         && impl::decodeObject(objects[8], oP9, 9) 
00982         && impl::decodeObject(objects[9], oP10, 10) 
00983         && impl::decodeObject(objects[10], oP11, 11) 
00984         && impl::decodeObject(objects[11], oP12, 12) 
00985         && impl::decodeObject(objects[12], oP13, 13) 
00986         && impl::decodeObject(objects[13], oP14, 14) 
00987         && impl::decodeObject(objects[14], oP15, 15) 
00988         ? 0 : 1;
00989 
00990 }
00991 
00992 /** @ingroup Python
00993  */
00994 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15> inline
00995 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13, P14& oP14, P15& oP15)
00996 {
00997     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5, oP6, oP7, oP8, oP9, oP10, oP11, oP12, oP13, oP14, oP15);
00998 }
00999 
01000 /** @ingroup Python
01001  */
01002 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16>
01003 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13, P14& oP14, P15& oP15, P16& oP16)
01004 {
01005     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 16);
01006     if (!tuple)
01007     {
01008         return 1;
01009     }
01010     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
01011     return true
01012         && impl::decodeObject(objects[0], oP1, 1) 
01013         && impl::decodeObject(objects[1], oP2, 2) 
01014         && impl::decodeObject(objects[2], oP3, 3) 
01015         && impl::decodeObject(objects[3], oP4, 4) 
01016         && impl::decodeObject(objects[4], oP5, 5) 
01017         && impl::decodeObject(objects[5], oP6, 6) 
01018         && impl::decodeObject(objects[6], oP7, 7) 
01019         && impl::decodeObject(objects[7], oP8, 8) 
01020         && impl::decodeObject(objects[8], oP9, 9) 
01021         && impl::decodeObject(objects[9], oP10, 10) 
01022         && impl::decodeObject(objects[10], oP11, 11) 
01023         && impl::decodeObject(objects[11], oP12, 12) 
01024         && impl::decodeObject(objects[12], oP13, 13) 
01025         && impl::decodeObject(objects[13], oP14, 14) 
01026         && impl::decodeObject(objects[14], oP15, 15) 
01027         && impl::decodeObject(objects[15], oP16, 16) 
01028         ? 0 : 1;
01029 
01030 }
01031 
01032 /** @ingroup Python
01033  */
01034 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16> inline
01035 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13, P14& oP14, P15& oP15, P16& oP16)
01036 {
01037     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5, oP6, oP7, oP8, oP9, oP10, oP11, oP12, oP13, oP14, oP15, oP16);
01038 }
01039 
01040 /** @ingroup Python
01041  */
01042 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16, typename P17>
01043 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13, P14& oP14, P15& oP15, P16& oP16, P17& oP17)
01044 {
01045     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 17);
01046     if (!tuple)
01047     {
01048         return 1;
01049     }
01050     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
01051     return true
01052         && impl::decodeObject(objects[0], oP1, 1) 
01053         && impl::decodeObject(objects[1], oP2, 2) 
01054         && impl::decodeObject(objects[2], oP3, 3) 
01055         && impl::decodeObject(objects[3], oP4, 4) 
01056         && impl::decodeObject(objects[4], oP5, 5) 
01057         && impl::decodeObject(objects[5], oP6, 6) 
01058         && impl::decodeObject(objects[6], oP7, 7) 
01059         && impl::decodeObject(objects[7], oP8, 8) 
01060         && impl::decodeObject(objects[8], oP9, 9) 
01061         && impl::decodeObject(objects[9], oP10, 10) 
01062         && impl::decodeObject(objects[10], oP11, 11) 
01063         && impl::decodeObject(objects[11], oP12, 12) 
01064         && impl::decodeObject(objects[12], oP13, 13) 
01065         && impl::decodeObject(objects[13], oP14, 14) 
01066         && impl::decodeObject(objects[14], oP15, 15) 
01067         && impl::decodeObject(objects[15], oP16, 16) 
01068         && impl::decodeObject(objects[16], oP17, 17) 
01069         ? 0 : 1;
01070 
01071 }
01072 
01073 /** @ingroup Python
01074  */
01075 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16, typename P17> inline
01076 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13, P14& oP14, P15& oP15, P16& oP16, P17& oP17)
01077 {
01078     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5, oP6, oP7, oP8, oP9, oP10, oP11, oP12, oP13, oP14, oP15, oP16, oP17);
01079 }
01080 
01081 /** @ingroup Python
01082  */
01083 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16, typename P17, typename P18>
01084 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13, P14& oP14, P15& oP15, P16& oP16, P17& oP17, P18& oP18)
01085 {
01086     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 18);
01087     if (!tuple)
01088     {
01089         return 1;
01090     }
01091     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
01092     return true
01093         && impl::decodeObject(objects[0], oP1, 1) 
01094         && impl::decodeObject(objects[1], oP2, 2) 
01095         && impl::decodeObject(objects[2], oP3, 3) 
01096         && impl::decodeObject(objects[3], oP4, 4) 
01097         && impl::decodeObject(objects[4], oP5, 5) 
01098         && impl::decodeObject(objects[5], oP6, 6) 
01099         && impl::decodeObject(objects[6], oP7, 7) 
01100         && impl::decodeObject(objects[7], oP8, 8) 
01101         && impl::decodeObject(objects[8], oP9, 9) 
01102         && impl::decodeObject(objects[9], oP10, 10) 
01103         && impl::decodeObject(objects[10], oP11, 11) 
01104         && impl::decodeObject(objects[11], oP12, 12) 
01105         && impl::decodeObject(objects[12], oP13, 13) 
01106         && impl::decodeObject(objects[13], oP14, 14) 
01107         && impl::decodeObject(objects[14], oP15, 15) 
01108         && impl::decodeObject(objects[15], oP16, 16) 
01109         && impl::decodeObject(objects[16], oP17, 17) 
01110         && impl::decodeObject(objects[17], oP18, 18) 
01111         ? 0 : 1;
01112 
01113 }
01114 
01115 /** @ingroup Python
01116  */
01117 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16, typename P17, typename P18> inline
01118 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13, P14& oP14, P15& oP15, P16& oP16, P17& oP17, P18& oP18)
01119 {
01120     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5, oP6, oP7, oP8, oP9, oP10, oP11, oP12, oP13, oP14, oP15, oP16, oP17, oP18);
01121 }
01122 
01123 /** @ingroup Python
01124  */
01125 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16, typename P17, typename P18, typename P19>
01126 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13, P14& oP14, P15& oP15, P16& oP16, P17& oP17, P18& oP18, P19& oP19)
01127 {
01128     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 19);
01129     if (!tuple)
01130     {
01131         return 1;
01132     }
01133     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
01134     return true
01135         && impl::decodeObject(objects[0], oP1, 1) 
01136         && impl::decodeObject(objects[1], oP2, 2) 
01137         && impl::decodeObject(objects[2], oP3, 3) 
01138         && impl::decodeObject(objects[3], oP4, 4) 
01139         && impl::decodeObject(objects[4], oP5, 5) 
01140         && impl::decodeObject(objects[5], oP6, 6) 
01141         && impl::decodeObject(objects[6], oP7, 7) 
01142         && impl::decodeObject(objects[7], oP8, 8) 
01143         && impl::decodeObject(objects[8], oP9, 9) 
01144         && impl::decodeObject(objects[9], oP10, 10) 
01145         && impl::decodeObject(objects[10], oP11, 11) 
01146         && impl::decodeObject(objects[11], oP12, 12) 
01147         && impl::decodeObject(objects[12], oP13, 13) 
01148         && impl::decodeObject(objects[13], oP14, 14) 
01149         && impl::decodeObject(objects[14], oP15, 15) 
01150         && impl::decodeObject(objects[15], oP16, 16) 
01151         && impl::decodeObject(objects[16], oP17, 17) 
01152         && impl::decodeObject(objects[17], oP18, 18) 
01153         && impl::decodeObject(objects[18], oP19, 19) 
01154         ? 0 : 1;
01155 
01156 }
01157 
01158 /** @ingroup Python
01159  */
01160 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16, typename P17, typename P18, typename P19> inline
01161 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13, P14& oP14, P15& oP15, P16& oP16, P17& oP17, P18& oP18, P19& oP19)
01162 {
01163     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5, oP6, oP7, oP8, oP9, oP10, oP11, oP12, oP13, oP14, oP15, oP16, oP17, oP18, oP19);
01164 }
01165 
01166 /** @ingroup Python
01167  */
01168 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16, typename P17, typename P18, typename P19, typename P20>
01169 int decodeTuple(PyObject* iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13, P14& oP14, P15& oP15, P16& oP16, P17& oP17, P18& oP18, P19& oP19, P20& oP20)
01170 {
01171     const TPyObjPtr tuple = impl::checkedFastSequence(iTuple, 20);
01172     if (!tuple)
01173     {
01174         return 1;
01175     }
01176     PyObject** objects = PySequence_Fast_ITEMS(tuple.get());
01177     return true
01178         && impl::decodeObject(objects[0], oP1, 1) 
01179         && impl::decodeObject(objects[1], oP2, 2) 
01180         && impl::decodeObject(objects[2], oP3, 3) 
01181         && impl::decodeObject(objects[3], oP4, 4) 
01182         && impl::decodeObject(objects[4], oP5, 5) 
01183         && impl::decodeObject(objects[5], oP6, 6) 
01184         && impl::decodeObject(objects[6], oP7, 7) 
01185         && impl::decodeObject(objects[7], oP8, 8) 
01186         && impl::decodeObject(objects[8], oP9, 9) 
01187         && impl::decodeObject(objects[9], oP10, 10) 
01188         && impl::decodeObject(objects[10], oP11, 11) 
01189         && impl::decodeObject(objects[11], oP12, 12) 
01190         && impl::decodeObject(objects[12], oP13, 13) 
01191         && impl::decodeObject(objects[13], oP14, 14) 
01192         && impl::decodeObject(objects[14], oP15, 15) 
01193         && impl::decodeObject(objects[15], oP16, 16) 
01194         && impl::decodeObject(objects[16], oP17, 17) 
01195         && impl::decodeObject(objects[17], oP18, 18) 
01196         && impl::decodeObject(objects[18], oP19, 19) 
01197         && impl::decodeObject(objects[19], oP20, 20) 
01198         ? 0 : 1;
01199 
01200 }
01201 
01202 /** @ingroup Python
01203  */
01204 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16, typename P17, typename P18, typename P19, typename P20> inline
01205 int decodeTuple(const TPyObjPtr& iTuple, P1& oP1, P2& oP2, P3& oP3, P4& oP4, P5& oP5, P6& oP6, P7& oP7, P8& oP8, P9& oP9, P10& oP10, P11& oP11, P12& oP12, P13& oP13, P14& oP14, P15& oP15, P16& oP16, P17& oP17, P18& oP18, P19& oP19, P20& oP20)
01206 {
01207     return decodeTuple(iTuple.get(), oP1, oP2, oP3, oP4, oP5, oP6, oP7, oP8, oP9, oP10, oP11, oP12, oP13, oP14, oP15, oP16, oP17, oP18, oP19, oP20);
01208 }
01209 
01210 
01211 }
01212 
01213 }
01214 
01215 #if LASS_COMPILER_TYPE == LASS_COMPILER_TYPE_MSVC
01216 #   pragma warning(pop)
01217 #endif
01218 
01219 #endif
01220 
01221 // EOF

Generated on Mon Nov 10 14:21:05 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo