1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2009 Sun Microsystems, Inc.
4
* Copyright (C) 2009 Sun Microsystems
6
6
* This program is free software; you can redistribute it and/or modify
7
7
* it under the terms of the GNU General Public License as published by
17
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
20
#ifndef DRIZZLED_PLUGIN_PLUGIN_H
23
21
#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;
36
const std::string name;
39
const std::string type_name;
53
42
Plugin(const Plugin&);
54
43
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);
46
explicit Plugin(std::string in_name, std::string in_type_name);
61
47
virtual ~Plugin() {}
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 &)
91
59
bool isActive() const
96
64
const std::string &getName() const
101
void setModule(module::Module *module)
69
void setModule(Module *module_arg)
106
74
const std::string& getTypeName() const
111
virtual bool removeLast() const
116
79
const std::string& getModuleName() const;