00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef RESOURCEPOOL_SQL_FACTORY_HH
00025 #define RESOURCEPOOL_SQL_FACTORY_HH
00026
00027 #include "mm/gc_ptr.hh"
00028 #include "Thread/Lock.hh"
00029
00030 namespace fatalmind {
00031 namespace SQL {
00032
00033 template<class TM = DefaultThreadedModel>
00034 class SQLFactory;
00035
00036 }
00037 }
00038
00039 #include "ResourcePool/SQL/Resource.hh"
00040 #include "ResourcePool/SQL/SQLFactoryInterface.hh"
00041
00042 namespace fatalmind {
00043 namespace SQL {
00044
00045 template<class TM> class SQLFactory_Impl;
00046
00047 template<class TM>
00048 class SQLFactory : public SQLFactoryInterface {
00049 public:
00053 SQLFactory(const std::string& logon);
00054 SQLFactory(const SQLFactory&);
00055 ~SQLFactory() throw();
00056
00057 DummySQLResource<TM>* create_resource() const;
00058
00059 virtual databaseType_t getDatabaseType() const;
00060
00061 protected:
00062 virtual Clone* DoClone() const;
00063
00064 private:
00065 gc_ptr<SQLFactory_Impl<TM> > _realFactory;
00066 databaseType_t resourceTypeCode;
00067 };
00068
00069 }
00070 }
00071
00072 #endif