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
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
20
#ifndef DRIZZLED_MODULE_MODULE_H
21
#define DRIZZLED_MODULE_MODULE_H
24
* @file Defines a Plugin Module
26
* A plugin::Module is the fundamental functional element of the plugin system.
27
* Plugins are inited and deinited by module. A module init can register one
28
* or more plugin::Plugin objects.
33
#include <boost/program_options.hpp>
35
#include "drizzled/module/manifest.h"
36
#include "drizzled/module/registry.h"
43
void module_shutdown(module::Registry ®istry);
53
const std::string name;
54
const Manifest *manifest;
57
typedef std::vector<sys_var *> Variables;
60
Variables system_vars; /* server variables for this plugin */
62
Module(const Manifest *manifest_arg,
63
Library *library_arg) :
64
name(manifest_arg->name),
65
manifest(manifest_arg),
66
plugin_dl(library_arg),
71
assert(manifest != NULL);
76
const std::string& getName() const
81
const Manifest& getManifest() const
86
void addMySysVar(sys_var *var)
88
sys_vars.push_back(var);
92
void addSysVar(sys_var *var)
94
system_vars.push_back(var);
97
Variables &getSysVars()
103
} /* namespace module */
104
} /* namespace drizzled */
106
#endif /* DRIZZLED_MODULE_MODULE_H */