diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2008-04-28 10:33:06 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2008-04-28 10:33:06 +0000 |
commit | a6e4862a47ce814fc57a21dd1c588945d666c2c6 (patch) | |
tree | 470b30489e93bf7832f87b0c17e8f5797abd9fdb /ACE/ace/Monitor_Control_Action.h | |
parent | ec52b1be10867395b69481557e8076a27642b25d (diff) | |
download | ATCD-a6e4862a47ce814fc57a21dd1c588945d666c2c6.tar.gz |
Diffstat (limited to 'ACE/ace/Monitor_Control_Action.h')
-rw-r--r-- | ACE/ace/Monitor_Control_Action.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/ACE/ace/Monitor_Control_Action.h b/ACE/ace/Monitor_Control_Action.h new file mode 100644 index 00000000000..c45d27b1179 --- /dev/null +++ b/ACE/ace/Monitor_Control_Action.h @@ -0,0 +1,65 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file Monitor_Control_Action.h + * + * $Id$ + * + * @author Jeff Parsons <j.parsons@vanderbilt.edu> + */ +//============================================================================= + +#ifndef MONITOR_CONTROL_ACTION_H +#define MONITOR_CONTROL_ACTION_H + +#include /**/ "ace/pre.h" + +#include "ace/Refcountable_T.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE +{ + namespace MonitorControl + { + /** + * @class ControlAction + * + * @brief Base class for control actions initiated by the + * application or by constraint evaluation trigger. + * + * This class is extended by the application developer or + * by the MC service itself to create a concrete class. + */ + class ACE_Export Control_Action + : private ACE_Refcountable_T<ACE_SYNCH_MUTEX> + { + public: + /// To be implemented by the concrete derived class. + virtual void execute (const char* command = 0) = 0; + + /// Refcounting methods. + void add_ref (void); + void remove_ref (void); + + protected: + Control_Action (void); + virtual ~Control_Action (void); + }; + } +} + +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + +#include /**/ "ace/post.h" + +#endif // MONITOR_CONTROL_ACTION_H |