summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-05-30 15:10:57 +0000
committerjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-05-30 15:10:57 +0000
commitdf59d6000dc890db551ba07937472092c30f5aff (patch)
tree875057b9917f9288061b83668907f0e0ab90e265
parentb718fd42430f18112df1be3cbe607a3341026310 (diff)
downloadATCD-df59d6000dc890db551ba07937472092c30f5aff.tar.gz
ChangeLogTag: Fri May 30 15:04:17 UTC 2008 J.T. Conklin <jtc@acorntoolworks.com>
-rw-r--r--TAO/ChangeLog13
-rw-r--r--TAO/orbsvcs/orbsvcs/Time_Utilities.h7
-rw-r--r--TAO/orbsvcs/orbsvcs/Time_Utilities.inl16
3 files changed, 36 insertions, 0 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 26ce59ea44c..e013a9f9ceb 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,16 @@
+Fri May 30 15:04:17 UTC 2008 J.T. Conklin <jtc@acorntoolworks.com>
+
+ * orbsvcs/orbsvcs/Time_Utilities.h:
+ * orbsvcs/orbsvcs/Time_Utilities.cpp:
+
+ Add new methods ORBSVCS_Time::to_Absolute_Time_Value() and
+ ORBSVCS_Time::to_Time_Value() which take an ACE_Time_Value
+ parameter and return a TimeBase::TimeT. These are wrappers
+ of the existing ORBSVCS_Time::Absolute_Time_Value_to_TimeT
+ and ORBSVCS_Time::Time_Value_to_TimeT methods, but allow
+ use in contexts that would otherwise need the introduction
+ of a temporary.
+
Fri May 30 13:21:20 UTC 2008 Chad Elliott <elliott_c@ociweb.com>
* tao/Transport_Connector.h:
diff --git a/TAO/orbsvcs/orbsvcs/Time_Utilities.h b/TAO/orbsvcs/orbsvcs/Time_Utilities.h
index 7d5ce89fe6f..866e5a35f1c 100644
--- a/TAO/orbsvcs/orbsvcs/Time_Utilities.h
+++ b/TAO/orbsvcs/orbsvcs/Time_Utilities.h
@@ -78,9 +78,13 @@ public:
static void TimeT_to_Time_Value (ACE_Time_Value& lrs,
const TimeBase::TimeT& rhs);
+ /// @brief Convert relative <ACE_Time_Value> to a <TimeBase::TimeT>
+ static TimeBase::TimeT to_TimeT (const ACE_Time_Value& rhs);
+
/// @brief Convert relative <TimeBase::TimeT> to a <ACE_Time_Value>.
static ACE_Time_Value to_Time_Value (const TimeBase::TimeT &rhs);
+
/// @brief Convert absolute <ACE_Time_Value> to a <TimeBase::TimeT>
static void Absolute_Time_Value_to_TimeT (TimeBase::TimeT& lhs,
const ACE_Time_Value& rhs);
@@ -89,6 +93,9 @@ public:
static void Absolute_TimeT_to_Time_Value (ACE_Time_Value& lrs,
const TimeBase::TimeT& rhs);
+ /// @brief Convert absolute <ACE_Time_Value> to a <TimeBase::TimeT>
+ static TimeBase::TimeT to_Absolute_TimeT (const ACE_Time_Value& rhs);
+
/// @brief Convert absolute <TimeBase::TimeT> to a <ACE_Time_Value>.
static ACE_Time_Value to_Absolute_Time_Value (const TimeBase::TimeT &rhs);
//@}
diff --git a/TAO/orbsvcs/orbsvcs/Time_Utilities.inl b/TAO/orbsvcs/orbsvcs/Time_Utilities.inl
index f7531f657f3..ef03910d854 100644
--- a/TAO/orbsvcs/orbsvcs/Time_Utilities.inl
+++ b/TAO/orbsvcs/orbsvcs/Time_Utilities.inl
@@ -67,6 +67,14 @@ ORBSVCS_Time::to_Time_Value (const TimeBase::TimeT& t)
return r;
}
+ACE_INLINE TimeBase::TimeT
+ORBSVCS_Time::to_TimeT (const ACE_Time_Value& t)
+{
+ TimeBase::TimeT r;
+ ORBSVCS_Time::Time_Value_to_TimeT (r, t);
+ return r;
+}
+
ACE_INLINE void
ORBSVCS_Time::Absolute_Time_Value_to_TimeT (TimeBase::TimeT& lhs,
const ACE_Time_Value& rhs)
@@ -100,4 +108,12 @@ ORBSVCS_Time::to_Absolute_Time_Value (const TimeBase::TimeT& t)
return r;
}
+ACE_INLINE TimeBase::TimeT
+ORBSVCS_Time::to_Absolute_TimeT (const ACE_Time_Value& t)
+{
+ TimeBase::TimeT r;
+ ORBSVCS_Time::Absolute_Time_Value_to_TimeT (r, t);
+ return r;
+}
+
TAO_END_VERSIONED_NAMESPACE_DECL