Monitor_Control_Action.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  * @file Monitor_Control_Action.h
00006  *
00007  * $Id: Monitor_Control_Action.h 81691 2008-05-14 11:09:21Z johnnyw $
00008  *
00009  * @author Jeff Parsons <j.parsons@vanderbilt.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef MONITOR_CONTROL_ACTION_H
00014 #define MONITOR_CONTROL_ACTION_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "ace/Refcountable_T.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 #pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1)
00025 
00026 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 namespace ACE
00029 {
00030   namespace Monitor_Control
00031   {
00032     /**
00033      * @class ControlAction
00034      *
00035      * @brief Base class for control actions initiated by the
00036      * application or by constraint evaluation trigger.
00037      *
00038      * This class is extended by the application developer or
00039      * by the MC service itself to create a concrete class.
00040      */
00041     class ACE_Export Control_Action
00042       : private ACE_Refcountable_T<ACE_SYNCH_MUTEX>
00043     {
00044     public:
00045       /// To be implemented by the concrete derived class.
00046       virtual void execute (const char* command = 0) = 0;
00047 
00048       /// Refcounting methods.
00049       void add_ref (void);
00050       void remove_ref (void);
00051 
00052     protected:
00053       Control_Action (void);
00054       virtual ~Control_Action (void);
00055     };
00056   }
00057 }
00058 
00059 ACE_END_VERSIONED_NAMESPACE_DECL
00060 
00061 #endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */
00062 
00063 #include /**/ "ace/post.h"
00064 
00065 #endif // MONITOR_CONTROL_ACTION_H

Generated on Tue Feb 2 17:18:41 2010 for ACE by  doxygen 1.4.7