~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/command_replicator.h

  • Committer: Brian Aker
  • Date: 2009-10-12 22:46:41 UTC
  • mfrom: (1130.2.27 plugin-base-class)
  • Revision ID: brian@gaz-20091012224641-gjo56i190y8c98xg
Merge Monty, default class.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
/**
47
47
 * Class which replicates Command messages
48
48
 */
49
 
class CommandReplicator
 
49
class CommandReplicator : public Plugin
50
50
{
 
51
  CommandReplicator();
 
52
  CommandReplicator(const CommandReplicator &);
 
53
  CommandReplicator& operator=(const CommandReplicator &);
51
54
public:
52
 
  CommandReplicator() {}
 
55
  explicit CommandReplicator(std::string name_arg)
 
56
   : Plugin(name_arg)
 
57
  {}
53
58
  virtual ~CommandReplicator() {}
54
59
  /**
55
60
   * Replicate a Command message to a CommandApplier.
69
74
   */
70
75
  virtual void replicate(CommandApplier *in_applier, 
71
76
                         message::Command &to_replicate)= 0;
72
 
  /** 
73
 
   * A replicator plugin should override this with its
74
 
   * internal method for determining if it is active or not.
75
 
   */
76
 
  virtual bool isActive() {return false;}
77
 
 
78
77
  static bool addPlugin(CommandReplicator *replicator);
79
78
  static void removePlugin(CommandReplicator *replicator);
80
79
};