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-2006 Maciej Sobczak, Stephen Hutton
00003 // MySQL backend copyright (C) 2006 Pawel Aleksander Fedorynski
00004 // Distributed under the Boost Software License, Version 1.0.
00005 // (See accompanying file LICENSE_1_0.txt or copy at
00006 // http://www.boost.org/LICENSE_1_0.txt)
00007 //
00008 
00009 #define SOCI_MYSQL_SOURCE
00010 #include "soci-mysql.h"
00011 #include <ciso646>
00012 
00013 #ifdef _MSC_VER
00014 #pragma warning(disable:4355)
00015 #endif
00016 
00017 using namespace soci;
00018 using namespace soci::details;
00019 
00020 
00021 // concrete factory for MySQL concrete strategies
00022 mysql_session_backend * mysql_backend_factory::make_session(
00023      std::string const &connectString) const
00024 {
00025      return new mysql_session_backend(connectString);
00026 }
00027 
00028 mysql_backend_factory const soci::mysql;
00029 
00030 extern "C"
00031 {
00032 
00033 // for dynamic backend loading
00034 SOCI_MYSQL_DECL backend_factory const * factory_mysql()
00035 {
00036     return &soci::mysql;
00037 }
00038 
00039 } // 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