Drizzled Public API Documentation

engine.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 Brian Aker
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 <boost/shared_ptr.hpp>
00024 #include <drizzled/identifier/catalog.h>
00025 #include <drizzled/message/catalog.h>
00026 
00027 namespace drizzled {
00028 namespace plugin {
00029 
00030 class Catalog;
00031 
00032 } // namespace plugin
00033 namespace catalog {
00034 
00035 class Engine
00036 {
00037 public:
00038   typedef boost::shared_ptr<Engine> shared_ptr;
00039   typedef std::vector<shared_ptr> vector;
00040 
00041 protected:
00042   friend class drizzled::plugin::Catalog;
00043 
00044   Engine()
00045   { };
00046 
00047   virtual ~Engine()
00048   { };
00049 
00050   // DDL
00051   virtual bool create(identifier::Catalog::const_reference , message::catalog::shared_ptr &)= 0;
00052   virtual bool drop(identifier::Catalog::const_reference)= 0;
00053 
00054   // Get Meta information
00055   virtual bool exist(identifier::Catalog::const_reference identifier)= 0;
00056   virtual void getIdentifiers(identifier::Catalog::vector &identifiers)= 0;
00057   virtual message::catalog::shared_ptr getMessage(identifier::Catalog::const_reference)= 0;
00058   virtual void getMessages(message::catalog::vector &messages)= 0;
00059 };
00060 
00061 } /* namespace catalog */
00062 } /* namespace drizzled */
00063