Drizzled Public API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
context.h
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
*
4
* Copyright (C) 2010 Monty Taylor
5
*
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.
9
*
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.
14
*
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
18
*/
19
20
#pragma once
21
37
#include <boost/noncopyable.hpp>
38
#include <drizzled/module/registry.h>
39
#include <
drizzled/visibility.h
>
40
41
namespace
drizzled {
42
namespace
module {
43
44
class
DRIZZLED_API
Context
: boost::noncopyable
45
{
46
public
:
47
48
Context
(
module::Registry
®istry_arg,
49
module::Module
*module_arg) :
50
registry(registry_arg),
51
module(module_arg)
52
{ }
53
54
template
<
class
T>
55
void
add(T *plugin)
56
{
57
plugin->setModule(module);
58
registry.add(plugin);
59
}
60
61
template
<
class
T>
62
void
remove
(T *plugin)
63
{
64
registry.remove(plugin);
65
}
66
67
void
registerVariable(
sys_var
*
var
);
68
69
option_map
getOptions();
70
71
static
std::string prepend_name(std::string module_name,
72
const
std::string &var_name);
73
private
:
74
module::Registry
®istry;
75
module::Module
*module;
76
};
77
78
79
}
/* namespace module */
80
}
/* namespace drizzled */
81
drizzled::module::option_map
Definition:
option_map.h:39
drizzled::var
Definition:
var.h:25
drizzled::sys_var
Definition:
sys_var.h:78
drizzled::module::Registry
Definition:
registry.h:40
DRIZZLED_API
#define DRIZZLED_API
Definition:
visibility.h:62
visibility.h
Visibility Control Macros.
drizzled::module::Context
Definition:
context.h:44
drizzled::module::Module
Definition:
module.h:41
drizzled
module
context.h
Generated on Wed Jan 29 2014 17:38:25 for drizzle by
1.8.6