RTSQLSelectRow_Impl.hh

00001 //********************************************************************
00002 //*** ResourcePool/SQL/RTSQLSelectRow_Impl.hh
00003 //*** Copyright (c) 2003-2009 by Markus Winand <mws@fatalmind.com>
00004 //*** $Id: RTSQLSelectRow_Impl.hh,v 1.15 2009-03-17 18:06:29 mws Exp $
00005 //********************************************************************
00006 /*
00007 This file is part of ResourcePool.
00008 
00009 ResourcePool is free software; you can redistribute it
00010 and/or modify it under the terms of the GNU General Public License
00011 as published by the Free Software Foundation; either version 2 of
00012 the License, or (at your option) any later version.
00013 
00014 ResourcePool is distributed in the hope that it will be
00015 useful, but WITHOUT ANY WARRANTY; without even the implied warranty
00016 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 GNU General Public License for more details.
00018 
00019 You should have received a copy of the GNU General Public License
00020 along with ResourcePool; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00022 02111-1307  USA */
00023 
00024 #ifndef RESOURCEPOOL_SQL_RTSQLSELECTROW_IMPL_HH
00025 #define RESOURCEPOOL_SQL_RTSQLSELECTROW_IMPL_HH
00026 
00027 #include "ResourcePool/SQL/SQLStatement.hh"
00028 #include "ResourcePool/SQL/RTSQLSelectRow.hh"
00029 #include "ResourcePool/SQL/RTSQLExecute_Impl.hh"
00030 
00031 namespace fatalmind {
00032 namespace SQL {
00033 
00034 
00035 template<class TM, template<class TM2>class B, class RT, class CW, class RTC>
00036 class RTSQLSelectRow_SpecializedImpl
00037 : public RTSQLExecute_SpecializedImpl<TM, B, RT, CW, RTC> 
00038 {
00039         typedef RTSQLExecute_SpecializedImpl<TM, B, RT, CW, RTC> super;
00040         using super::sqlExecute_;
00041     public:
00042         RTSQLSelectRow_SpecializedImpl(RTC& rtc, const SQLStatement& sql, SQL::SQLFetcher& fetcher)
00043         : super(rtc, sql, fetcher)
00044         {
00045         }
00046 
00047         virtual ~RTSQLSelectRow_SpecializedImpl() {
00048         }
00049 
00050         // would like to make a template..
00051         // .. but virtual templates doesn't exists
00052         virtual void bindout(const int pos, char& val, bool& isnull) {
00053             sqlExecute_.bindout(pos, val, isnull);
00054         }
00055 
00056         virtual void bindout(const int pos, signed char& val, bool& isnull) {
00057             sqlExecute_.bindout(pos, val, isnull);
00058         }
00059 
00060         virtual void bindout(const int pos, unsigned char& val, bool& isnull) {
00061             sqlExecute_.bindout(pos, val, isnull);
00062         }
00063 
00064         virtual void bindout(const int pos, short int& val, bool& isnull) {
00065             sqlExecute_.bindout(pos, val, isnull);
00066         }
00067         virtual void bindout(const int pos, int& val, bool& isnull) {
00068             sqlExecute_.bindout(pos, val, isnull);
00069         }
00070         virtual void bindout(const int pos, long int& val, bool& isnull) {
00071             sqlExecute_.bindout(pos, val, isnull);
00072         }
00073         virtual void bindout(const int pos, unsigned short int& val, bool& isnull) {
00074             sqlExecute_.bindout(pos, val, isnull);
00075         }
00076         virtual void bindout(const int pos, unsigned int& val, bool& isnull) {
00077             sqlExecute_.bindout(pos, val, isnull);
00078         }
00079         virtual void bindout(const int pos, unsigned long int& val, bool& isnull) {
00080             sqlExecute_.bindout(pos, val, isnull);
00081         }
00082 
00083         virtual void bindout(const int pos, float& val, bool& isnull) {
00084             sqlExecute_.bindout(pos, val, isnull);
00085         }
00086         virtual void bindout(const int pos, double& val, bool& isnull) {
00087             sqlExecute_.bindout(pos, val, isnull);
00088         }
00089         virtual void bindout(const int pos, long double& val, bool& isnull) {
00090             sqlExecute_.bindout(pos, val, isnull);
00091         }
00092 
00093         virtual void bindout(const int pos, std::string& val, bool& isnull) {
00094             sqlExecute_.bindout(pos, val, isnull);
00095         }
00096 
00097     protected:
00098         virtual Clone* DoClone() const {
00099             return new RTSQLSelectRow_SpecializedImpl<TM, B, RT, CW, RTC>(*this);
00100         }
00101 };
00102 
00103 } // namespace SQL
00104 } // namespace fatalmind
00105 #endif

Generated on Mon Nov 9 16:21:24 2009 for ResourcePool by  doxygen 1.5.3