1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2009 Sun Microsystems, Inc.
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 2 of the License.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
#ifndef DRIZZLED_PLUGIN_PLUGIN_H
23
#define DRIZZLED_PLUGIN_PLUGIN_H
29
#include "drizzled/visibility.h"
44
class DRIZZLED_API Plugin
47
const std::string _name;
49
module::Module *_module;
50
const std::string _type_name;
53
Plugin(const Plugin&);
54
Plugin& operator=(const Plugin &);
56
typedef std::pair<const std::string, const std::string> map_key;
57
typedef std::map<const map_key, plugin::Plugin *> map;
58
typedef std::vector<Plugin *> vector;
60
explicit Plugin(const std::string &name, const std::string &type_name);
64
* This method is called for all plug-ins on shutdown,
65
* _before_ the plug-ins are deleted. It can be used
66
* when shutdown code references other plug-ins.
68
virtual void shutdownPlugin()
72
// This is run after all plugins have been initialized.
77
virtual void startup(drizzled::Session &)
96
const std::string &getName() const
101
void setModule(module::Module *module)
106
const std::string& getTypeName() const
111
virtual bool removeLast() const
116
const std::string& getModuleName() const;
118
} /* end namespace plugin */
119
} /* end namespace drizzled */
121
#endif /* DRIZZLED_PLUGIN_PLUGIN_H */