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.cpp | |
parent | ec52b1be10867395b69481557e8076a27642b25d (diff) | |
download | ATCD-a6e4862a47ce814fc57a21dd1c588945d666c2c6.tar.gz |
Diffstat (limited to 'ACE/ace/Monitor_Control_Types.cpp')
-rw-r--r-- | ACE/ace/Monitor_Control_Types.cpp | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/ACE/ace/Monitor_Control_Types.cpp b/ACE/ace/Monitor_Control_Types.cpp new file mode 100644 index 00000000000..13eaba6fc38 --- /dev/null +++ b/ACE/ace/Monitor_Control_Types.cpp @@ -0,0 +1,69 @@ +// $Id$ + +#include "ace/Monitor_Control_Types.h" + +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + +#include "ace/Monitor_Control_Action.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE +{ + namespace MonitorControl + { + Monitor_Control_Types::Data::Data (void) + : timestamp_ (ACE_Time_Value::zero), + value_ (0.0) + {} + + //============================================================= + + Monitor_Control_Types::Constraint::Constraint (void) + : control_action (0) + {} + + Monitor_Control_Types::Constraint::Constraint (const Constraint& rhs) + : expr (rhs.expr), + control_action (rhs.control_action) + { + if (control_action != 0) + { + control_action->add_ref (); + } + } + + Monitor_Control_Types::Constraint::~Constraint (void) + { + if (this->control_action != 0) + { + this->control_action->remove_ref (); + } + } + + Monitor_Control_Types::Constraint& + Monitor_Control_Types::Constraint::operator= (const Constraint& rhs) + { + if (this->control_action != 0) + { + this->control_action->remove_ref (); + } + + this->expr = rhs.expr; + this->control_action = rhs.control_action; + + if (this->control_action != 0) + { + this->control_action->add_ref (); + } + + return *this; + } + } +} + +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + + |