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_Types.h | |
parent | ec52b1be10867395b69481557e8076a27642b25d (diff) | |
download | ATCD-a6e4862a47ce814fc57a21dd1c588945d666c2c6.tar.gz |
Diffstat (limited to 'ACE/ace/Monitor_Control_Types.h')
-rw-r--r-- | ACE/ace/Monitor_Control_Types.h | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/ACE/ace/Monitor_Control_Types.h b/ACE/ace/Monitor_Control_Types.h new file mode 100644 index 00000000000..dfc584fe081 --- /dev/null +++ b/ACE/ace/Monitor_Control_Types.h @@ -0,0 +1,101 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file Monitor_Control_Types.h + * + * $Id$ + * + * @author Jeff Parsons <j.parsons@vanderbilt.edu> + */ +//============================================================================= + +#ifndef MONITOR_CONTROL_TYPES_H +#define MONITOR_CONTROL_TYPES_H + +#include /**/ "ace/pre.h" + +#include "ace/Vector_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) + +#include "ace/Array_Map.h" +#include "ace/SString.h" +#include "ace/Time_Value.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE +{ + namespace MonitorControl + { + class Control_Action; + + struct ACE_Export Monitor_Control_Types + { + /** + * @brief An instance is contained by each enabled monitor point. + */ + struct ACE_Export Data + { + Data (void); + ACE_Time_Value timestamp_; + double value_; + }; + + /** + * @brief Bundles the constrain string with its associated + * trigger action. + */ + struct ACE_Export Constraint + { + Constraint (void); + ~Constraint (void); + + /// Implemented explicitly so reference counting of control + /// actions can be managed. + Constraint (const Constraint& rhs); + Constraint& operator= (const Constraint& rhs); + + ACE_CString expr; + Control_Action* control_action; + }; + +#if defined (__BORLANDC__) && (__BORLANDC__ <= 0x570) + // Borland C++ Builder 6 and earlier don't handle the second template + // argument correctly. We have to pass it explicitly + typedef ACE_Vector<Data, ACE_VECTOR_DEFAULT_SIZE> DataList; + typedef ACE_Vector<ACE_CString, ACE_VECTOR_DEFAULT_SIZE> NameList; + typedef ACE_Array_Map<long, Constraint, std::equal_to<long> > ConstraintList; +#else + /** + * @brief Used by the admin class as a container for the data from + * a group of monitor points. + */ + typedef ACE_Vector<Data> DataList; + + /** + * @brief Used in various places to pass around a set of string names. + */ + typedef ACE_Vector<ACE_CString> NameList; + + /** + * @brief Holder for a monitor point's constraints. + */ + typedef ACE_Array_Map<long, Constraint> ConstraintList; +#endif + }; + } +} + +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + +#include /**/ "ace/post.h" + +#endif // MONITOR_CONTROL_TYPES_H |