Drizzled Public API Documentation

access_method_factory.h

00001 /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
00002  *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
00003  *
00004  *  Copyright (C) 2010 Padraig O'Sullivan
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019  */
00020 
00021 #pragma once
00022 
00023 #include <drizzled/definitions.h>
00024 #include <drizzled/error.h>
00025 #include <drizzled/sql_parse.h>
00026 #include <drizzled/sql_base.h>
00027 #include <drizzled/join_table.h>
00028 #include <drizzled/optimizer/access_method.h>
00029 
00030 #include <boost/shared_ptr.hpp>
00031 
00032 /* Forward declarations */
00033 class Table;
00034 class JoinTable;
00035 
00036 namespace drizzled
00037 {
00038 namespace optimizer
00039 {
00040 
00045 class AccessMethodFactory
00046 {
00047 public:
00048 
00049   static AccessMethodFactory &singleton()
00050   {
00051     static AccessMethodFactory fact;
00052     return fact;
00053   }
00054 
00055   boost::shared_ptr<AccessMethod> createAccessMethod(enum access_method type);
00056 
00057 private:
00058   
00059   AccessMethodFactory() {}
00060 
00061   ~AccessMethodFactory() {}
00062 
00063   AccessMethodFactory(const AccessMethodFactory&);
00064 };
00065 
00066 } /* end namespace optimizer */
00067 
00068 } /* end namespace drizzled */
00069