00001 // $Id: Monitor_Control_Types.cpp 81691 2008-05-14 11:09:21Z johnnyw $ 00002 00003 #include "ace/Monitor_Control_Types.h" 00004 00005 #if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) 00006 00007 #include "ace/Monitor_Control_Action.h" 00008 00009 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00010 00011 namespace ACE 00012 { 00013 namespace Monitor_Control 00014 { 00015 Monitor_Control_Types::Data::Data (void) 00016 : timestamp_ (ACE_Time_Value::zero), 00017 value_ (0.0) 00018 {} 00019 00020 //============================================================= 00021 00022 Monitor_Control_Types::Constraint::Constraint (void) 00023 : control_action (0) 00024 {} 00025 00026 Monitor_Control_Types::Constraint::Constraint (const Constraint& rhs) 00027 : expr (rhs.expr), 00028 control_action (rhs.control_action) 00029 { 00030 if (control_action != 0) 00031 { 00032 control_action->add_ref (); 00033 } 00034 } 00035 00036 Monitor_Control_Types::Constraint::~Constraint (void) 00037 { 00038 if (this->control_action != 0) 00039 { 00040 this->control_action->remove_ref (); 00041 } 00042 } 00043 00044 Monitor_Control_Types::Constraint& 00045 Monitor_Control_Types::Constraint::operator= (const Constraint& rhs) 00046 { 00047 if (this->control_action != 0) 00048 { 00049 this->control_action->remove_ref (); 00050 } 00051 00052 this->expr = rhs.expr; 00053 this->control_action = rhs.control_action; 00054 00055 if (this->control_action != 0) 00056 { 00057 this->control_action->add_ref (); 00058 } 00059 00060 return *this; 00061 } 00062 } 00063 } 00064 00065 ACE_END_VERSIONED_NAMESPACE_DECL 00066 00067 #endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ 00068 00069