~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/plugin.h

  • Committer: Monty Taylor
  • Date: 2009-10-27 17:36:23 UTC
  • mto: This revision was merged to the branch mainline in revision 1201.
  • Revision ID: mordred@inaugust.com-20091027173623-4af3fusj3cu5lktt
Replaced overridable virtual methods with passing name to constructor. Now individual plugins will not be allowed to set their own plugin type name. :)

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
  std::vector<std::string> aliases;
38
38
  bool is_active;
39
39
  Module *module;
 
40
  const std::string type_name;
40
41
 
41
42
  Plugin();
42
43
  Plugin(const Plugin&);
43
44
  Plugin& operator=(const Plugin &);
44
45
public:
45
46
 
46
 
  explicit Plugin(std::string in_name);
 
47
  explicit Plugin(std::string in_name, std::string in_type_name);
47
48
  virtual ~Plugin() {}
48
49
 
49
50
  void activate()
81
82
    module= module_arg;
82
83
  }
83
84
 
84
 
  virtual const std::string getTypeName() const
 
85
  const std::string& getTypeName() const
85
86
  {
86
 
    return "UNNAMED PLUGIN TYPE";
 
87
    return type_name;
87
88
  }
88
89
 
89
90
  const std::string& getModuleName() const;