00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Monitor_Control_Types.h 00006 * 00007 * $Id: Monitor_Control_Types.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_TYPES_H 00014 #define MONITOR_CONTROL_TYPES_H 00015 00016 #include /**/ "ace/pre.h" 00017 00018 #include "ace/Vector_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 #include "ace/Array_Map.h" 00027 #include "ace/SString.h" 00028 #include "ace/Time_Value.h" 00029 00030 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00031 00032 namespace ACE 00033 { 00034 namespace Monitor_Control 00035 { 00036 class Control_Action; 00037 00038 struct ACE_Export Monitor_Control_Types 00039 { 00040 /** 00041 * @brief An instance is contained by each enabled monitor point. 00042 */ 00043 struct ACE_Export Data 00044 { 00045 Data (void); 00046 ACE_Time_Value timestamp_; 00047 double value_; 00048 }; 00049 00050 /** 00051 * @brief Bundles the constrain string with its associated 00052 * trigger action. 00053 */ 00054 struct ACE_Export Constraint 00055 { 00056 Constraint (void); 00057 ~Constraint (void); 00058 00059 /// Implemented explicitly so reference counting of control 00060 /// actions can be managed. 00061 Constraint (const Constraint& rhs); 00062 Constraint& operator= (const Constraint& rhs); 00063 00064 ACE_CString expr; 00065 Control_Action* control_action; 00066 }; 00067 00068 #if defined (__BORLANDC__) && (__BORLANDC__ <= 0x570) 00069 // Borland C++ Builder 6 and earlier don't handle the second template 00070 // argument correctly. We have to pass it explicitly 00071 typedef ACE_Vector<Data, ACE_VECTOR_DEFAULT_SIZE> DataList; 00072 typedef ACE_Vector<ACE_CString, ACE_VECTOR_DEFAULT_SIZE> NameList; 00073 typedef ACE_Array_Map<long, Constraint, std::equal_to<long> > ConstraintList; 00074 #else 00075 /** 00076 * @brief Used by the admin class as a container for the data from 00077 * a group of monitor points. 00078 */ 00079 typedef ACE_Vector<Data> DataList; 00080 00081 /** 00082 * @brief Used in various places to pass around a set of string names. 00083 */ 00084 typedef ACE_Vector<ACE_CString> NameList; 00085 00086 /** 00087 * @brief Holder for a monitor point's constraints. 00088 */ 00089 typedef ACE_Array_Map<long, Constraint> ConstraintList; 00090 #endif 00091 }; 00092 } 00093 } 00094 00095 ACE_END_VERSIONED_NAMESPACE_DECL 00096 00097 #endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ 00098 00099 #include /**/ "ace/post.h" 00100 00101 #endif // MONITOR_CONTROL_TYPES_H