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