~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/registry.h

Moved service stuff into plugin/

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <vector>
25
25
#include <map>
26
26
 
27
 
#include "drizzled/service/authentication.h"
28
 
#include "drizzled/service/scheduler.h"
29
 
#include "drizzled/service/function.h"
30
 
#include "drizzled/service/listen.h"
31
 
#include "drizzled/service/query_cache.h"
32
 
#include "drizzled/service/logging.h"
33
 
#include "drizzled/service/error_message.h"
34
 
#include "drizzled/service/info_schema.h"
35
 
#include "drizzled/service/command_replicator.h"
36
 
#include "drizzled/service/command_applier.h"
37
 
#include "drizzled/service/storage_engine.h"
38
 
 
39
27
 
40
28
namespace drizzled
41
29
{
65
53
 
66
54
  std::vector<Handle *> get_list(bool active);
67
55
 
68
 
  service::CommandReplicator command_replicator;
69
 
  service::CommandApplier command_applier;
70
 
  service::ErrorMessage error_message;
71
 
  service::Authentication authentication;
72
 
  service::QueryCache query_cache;
73
 
  service::Scheduler scheduler;
74
 
  service::Function function;
75
 
  service::Listen listen;
76
 
  service::Logging logging;
77
 
  service::InfoSchema info_schema;
78
 
  service::StorageEngine storage_engine;
79
 
 
80
 
  void add(CommandReplicator *plugin)
81
 
  {
82
 
    command_replicator.add(plugin);
83
 
  }
84
 
  void add(CommandApplier *plugin)
85
 
  {
86
 
    command_applier.add(plugin);
87
 
  }
88
 
  void add(ErrorMessage *plugin)
89
 
  {
90
 
    error_message.add(plugin);
91
 
  }
92
 
  void add(Authentication *plugin)
93
 
  {
94
 
    authentication.add(plugin);
95
 
  }
96
 
  void add(QueryCache *plugin)
97
 
  {
98
 
    query_cache.add(plugin);
99
 
  }
100
 
  void add(SchedulerFactory *plugin)
101
 
  {
102
 
    scheduler.add(plugin);
103
 
  }
104
 
  void add(Function *plugin)
105
 
  {
106
 
    function.add(plugin);
107
 
  }
108
 
  void add(Listen &plugin)
109
 
  {
110
 
    listen.add(plugin);
111
 
  }
112
 
  void add(Logging *plugin)
113
 
  {
114
 
    logging.add(plugin);
115
 
  }
116
 
  void add(InfoSchemaTable *plugin)
117
 
  {
118
 
    info_schema.add(plugin);
119
 
  }
120
 
  void add(StorageEngine *plugin)
121
 
  {
122
 
    storage_engine.add(plugin);
123
 
  }
124
 
 
125
 
  void remove(CommandReplicator *plugin)
126
 
  {
127
 
    command_replicator.remove(plugin);
128
 
  }
129
 
  void remove(CommandApplier *plugin)
130
 
  {
131
 
    command_applier.remove(plugin);
132
 
  }
133
 
  void remove(ErrorMessage *plugin)
134
 
  {
135
 
    error_message.remove(plugin);
136
 
  }
137
 
  void remove(Authentication *plugin)
138
 
  {
139
 
    authentication.remove(plugin);
140
 
  }
141
 
  void remove(QueryCache *plugin)
142
 
  {
143
 
    query_cache.remove(plugin);
144
 
  }
145
 
  void remove(SchedulerFactory *plugin)
146
 
  {
147
 
    scheduler.remove(plugin);
148
 
  }
149
 
  void remove(Function *plugin)
150
 
  {
151
 
    function.remove(plugin);
152
 
  }
153
 
  void remove(Listen &plugin)
154
 
  {
155
 
    listen.remove(plugin);
156
 
  }
157
 
  void remove(Logging *plugin)
158
 
  {
159
 
    logging.remove(plugin);
160
 
  }
161
 
  void remove(InfoSchemaTable *plugin)
162
 
  {
163
 
    info_schema.remove(plugin);
164
 
  }
165
 
  void remove(StorageEngine *plugin)
166
 
  {
167
 
    storage_engine.remove(plugin);
168
 
  }
169
 
 
170
 
  
 
56
  template<class T>
 
57
  void add(T *plugin)
 
58
  {
 
59
    T::add(plugin);
 
60
  }
 
61
 
 
62
  template<class T>
 
63
  void remove(T *plugin)
 
64
  {
 
65
    T::remove(plugin);
 
66
  }
171
67
 
172
68
};
173
69