SOCI Logo Get SOCI at SourceForge.net. Fast, secure and Free Open Source software downloads

factory.cpp

Go to the documentation of this file.
00001 //
00002 // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
00003 // Distributed under the Boost Software License, Version 1.0.
00004 // (See accompanying file LICENSE_1_0.txt or copy at
00005 // http://www.boost.org/LICENSE_1_0.txt)
00006 //
00007 
00008 #define SOCI_POSTGRESQL_SOURCE
00009 #include "soci-postgresql.h"
00010 #include <libpq/libpq-fs.h> // libpq
00011 #include <cctype>
00012 #include <cstdio>
00013 #include <cstring>
00014 #include <ctime>
00015 #include <sstream>
00016 
00017 #ifdef SOCI_PGSQL_NOPARAMS
00018 #define SOCI_PGSQL_NOBINDBYNAME
00019 #endif // SOCI_PGSQL_NOPARAMS
00020 
00021 #ifdef _MSC_VER
00022 #pragma warning(disable:4355)
00023 #endif
00024 
00025 using namespace soci;
00026 using namespace soci::details;
00027 
00028 
00029 // concrete factory for Empty concrete strategies
00030 postgresql_session_backend * postgresql_backend_factory::make_session(
00031      std::string const & connectString) const
00032 {
00033      return new postgresql_session_backend(connectString);
00034 }
00035 
00036 postgresql_backend_factory const soci::postgresql;
00037 
00038 extern "C"
00039 {
00040 
00041 // for dynamic backend loading
00042 SOCI_POSTGRESQL_DECL backend_factory const * factory_postgresql()
00043 {
00044     return &soci::postgresql;
00045 }
00046 
00047 } // extern "C"
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
SourceForge Logo

Generated on Sun Oct 3 2010 17:42:16 for EXTRAS-SOCI by Doxygen 1.7.1