ResourcePool.hh

00001 //********************************************************************
00002 //*** ResourcePool/mysql/ResourcePool.hh
00003 //*** Copyright (c) 2003-2009 by Markus Winand <mws@fatalmind.com>
00004 //*** $Id: ResourcePool.hh,v 1.21 2009-05-02 18:47:19 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 
00025 #ifndef RESOURCEPOOL_MYSQL_RESOURCEPOOL_HH
00026 #define RESOURCEPOOL_MYSQL_RESOURCEPOOL_HH
00027 
00028 #include "ResourcePool/SQL/SQLBatchCommand.hh"
00029 #include "ResourcePool/IgnoreExceptionCommand.hh"
00030 
00031 #ifndef RESOURCEPOOL_MYSQL_RESOURCE_HH
00032 #include "ResourcePool/mysql/Resource.hh"
00033 #endif
00034 
00035 #ifndef RESOURCEPOOL_MYSQL_FACTORY_HH
00036 #include "ResourcePool/mysql/Factory.hh"
00037 #endif
00038 
00039 #ifndef RESOURCEPOOL_RESOURCEPOOL_HH
00040 #include "ResourcePool/ResourcePool.hh"
00041 #endif
00042 
00043 #ifndef RESOURCEPOOL_MYSQL_MYSQLEXCEPTION_HH
00044 #include "MysqlException.hh"
00045 #endif
00046 
00047 #include "config.h"
00048 
00049 namespace fatalmind {
00050 
00051 // forward declarations
00057 namespace mysql {
00058 
00059 class SQLSelect;
00060 class SQLExecute;
00061 class SQLSelectRow;
00062 
00063 #ifdef RESOURCEPOOL_HAVE_MYSQL_TRANSACTIONS
00064 class Transaction;
00065 #endif
00066 
00067 } // namespace mysql
00068 
00073 namespace ResourceType {
00074 
00075 struct mysqlCommands;
00076 
00080 typedef PoolType<mysqlFactory, mysqlResource, MYSQL, mysqlCommands> mysql;
00081 
00082 struct mysqlCommands {
00083     mysqlCommands(const mysqlFactory&) {
00084     };
00085 
00086     typedef Command<mysql>                 Base;
00087     typedef fatalmind::mysql::SQLExecute   SQLExecute;
00088     typedef fatalmind::mysql::SQLSelect    SQLSelect;
00089     typedef fatalmind::mysql::SQLSelectRow SQLSelectRow;
00090     typedef fatalmind::SQL::SQLBatchCommand<Command<mysql> > SQLBatch;
00091     typedef fatalmind::IgnoreExceptionCommand<Command<mysql> > IgnoreException;
00092 #ifdef RESOURCEPOOL_HAVE_MYSQL_TRANSACTIONS
00093     typedef fatalmind::mysql::Transaction  Transaction; 
00094 #endif
00095 };
00096 
00097 } // namespace ResourceType
00098 
00099 namespace mysql {
00100 
00101 typedef fatalmind::ResourceType::mysql ResourceType;
00102 
00103 } // namespace mysql
00104 } // namespace fatalmind
00105 
00106 #ifndef RESOURCEPOOL_MYSQL_SQLSELECT_HH
00107 #include "SQLSelect.hh"
00108 #endif
00109 
00110 #ifndef RESOURCEPOOL_MYSQL_SQLEXECUTE_HH
00111 #include "SQLExecute.hh"
00112 #endif
00113 
00114 #ifndef RESOURCEPOOL_MYSQL_SQLSelectRow_HH
00115 #include "SQLSelectRow.hh"
00116 #endif
00117 
00118 #ifdef RESOURCEPOOL_HAVE_MYSQL_TRANSACTIONS
00119 #include "ResourcePool/mysql/Transaction.hh"
00120 #endif
00121 
00122 #endif

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