00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #pragma once
00021
00030 #include <drizzled/common_fwd.h>
00031 #include <string>
00032 #include <vector>
00033
00034 namespace drizzled {
00035
00036 void module_shutdown(module::Registry&);
00037
00038 namespace module {
00039
00040
00041 class Module
00042 {
00043 public:
00044 typedef std::vector<sys_var *> Variables;
00045 typedef std::vector<std::string> Depends;
00046
00047 Library *plugin_dl;
00048 bool isInited;
00049 Variables system_vars;
00050 Variables sys_vars;
00051 Depends depends_;
00052
00053 Module(const Manifest *manifest_arg, Library *library_arg);
00054 ~Module();
00055
00056 const std::string& getName() const
00057 {
00058 return name;
00059 }
00060
00061 const Manifest& getManifest() const
00062 {
00063 return manifest;
00064 }
00065
00066 void addMySysVar(sys_var *var)
00067 {
00068 sys_vars.push_back(var);
00069 addSysVar(var);
00070 }
00071
00072 void addSysVar(sys_var *var)
00073 {
00074 system_vars.push_back(var);
00075 }
00076
00077 Variables &getSysVars()
00078 {
00079 return system_vars;
00080 }
00081
00082 const Depends &getDepends() const
00083 {
00084 return depends_;
00085 }
00086
00087 void setVertexHandle(VertexHandle *vertex)
00088 {
00089 vertex_= vertex;
00090 }
00091
00092 VertexHandle *getVertexHandle()
00093 {
00094 return vertex_;
00095 }
00096 private:
00097 const std::string name;
00098 const Manifest &manifest;
00099 VertexHandle *vertex_;
00100 };
00101
00102 }
00103 }
00104