summaryrefslogtreecommitdiff
path: root/ACE/ace/UUID.inl
diff options
context:
space:
mode:
authorhillj <hillj@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-04-19 07:00:40 +0000
committerhillj <hillj@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-04-19 07:00:40 +0000
commit81ed9f5af000e65db20943a5c993612085396c99 (patch)
treeba0bf93b6f32978d774a3edbc0ba62be76c8a160 /ACE/ace/UUID.inl
parentc8cab43f7a8c211e7c6138f368a4f7a1fda420f3 (diff)
downloadATCD-81ed9f5af000e65db20943a5c993612085396c99.tar.gz
Sun Apr 19 06:57:04 UTC 2009 James H. Hill <hillj@isis.vanderbilt.edu>
Diffstat (limited to 'ACE/ace/UUID.inl')
-rw-r--r--ACE/ace/UUID.inl112
1 files changed, 50 insertions, 62 deletions
diff --git a/ACE/ace/UUID.inl b/ACE/ace/UUID.inl
index bbc494197bd..e721ca738ea 100644
--- a/ACE/ace/UUID.inl
+++ b/ACE/ace/UUID.inl
@@ -6,84 +6,115 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
namespace ACE_Utils
{
+ ACE_INLINE
+ const UUID_Node::Node_ID & UUID_Node::node_ID (void) const
+ {
+ return this->node_ID_;
+ }
+
+ ACE_INLINE
+ UUID_Node::Node_ID & UUID_Node::node_ID (void)
+ {
+ return this->node_ID_;
+ }
+
+ ACE_INLINE
+ UUID::UUID (void)
+ {
+ this->init ();
+ }
+
+ ACE_INLINE
+ UUID::UUID (const ACE_CString& uuid_string)
+ {
+ this->init ();
+ this->from_string_i (uuid_string);
+ }
+
+ ACE_INLINE
+ UUID::~UUID (void)
+ {
+
+ }
- /// Data Members for Class Attributes
ACE_INLINE ACE_UINT32
UUID::time_low (void) const
{
- return this->time_low_;
+ return this->uuid_.time_low_;
}
ACE_INLINE void
UUID::time_low (ACE_UINT32 timelow)
{
- this->time_low_ = timelow;
+ this->uuid_.time_low_ = timelow;
}
ACE_INLINE ACE_UINT16
UUID::time_mid (void) const
{
- return this->time_mid_;
+ return this->uuid_.time_mid_;
}
ACE_INLINE void
UUID::time_mid (ACE_UINT16 time_mid)
{
- this->time_mid_ = time_mid;
+ this->uuid_.time_mid_ = time_mid;
}
ACE_INLINE ACE_UINT16
UUID::time_hi_and_version (void) const
{
- return this->time_hi_and_version_;
+ return this->uuid_.time_hi_and_version_;
}
ACE_INLINE void
UUID::time_hi_and_version (ACE_UINT16 time_hi_and_version)
{
- this->time_hi_and_version_ = time_hi_and_version;
+ this->uuid_.time_hi_and_version_ = time_hi_and_version;
}
ACE_INLINE u_char
UUID::clock_seq_hi_and_reserved (void) const
{
- return this->clock_seq_hi_and_reserved_;
+ return this->uuid_.clock_seq_hi_and_reserved_;
}
ACE_INLINE void
UUID::clock_seq_hi_and_reserved (u_char clock_seq_hi_and_reserved)
{
- this->clock_seq_hi_and_reserved_ = clock_seq_hi_and_reserved;
+ this->uuid_.clock_seq_hi_and_reserved_ = clock_seq_hi_and_reserved;
}
ACE_INLINE u_char
UUID::clock_seq_low (void) const
{
- return this->clock_seq_low_;
+ return this->uuid_.clock_seq_low_;
}
ACE_INLINE void
UUID::clock_seq_low (u_char clock_seq_low)
{
- this->clock_seq_low_ = clock_seq_low;
+ this->uuid_.clock_seq_low_ = clock_seq_low;
}
- ACE_INLINE const UUID_Node*
+ ACE_INLINE const UUID_Node &
UUID::node (void) const
{
- return &this->node_;
+ return this->uuid_.node_;
}
- ACE_INLINE UUID_Node*
+ ACE_INLINE UUID_Node &
UUID::node (void)
{
- return &this->node_;
+ return this->uuid_.node_;
}
ACE_INLINE void
- UUID::node (const UUID_Node* node)
+ UUID::node (const UUID_Node & node)
{
- this->node_ = *node;
+ ACE_OS::memcpy (&this->uuid_.node_,
+ node.node_ID (),
+ UUID_Node::NODE_ID_SIZE);
}
ACE_INLINE ACE_CString*
@@ -119,58 +150,15 @@ namespace ACE_Utils
ACE_INLINE bool
UUID::operator == (const UUID &right) const
{
- if ((this->time_low_ != right.time_low ()) ||
- (this->time_mid_ != right.time_mid ()) ||
- (this->time_hi_and_version_ != right.time_hi_and_version ()) ||
- (this->clock_seq_hi_and_reserved_ != right.clock_seq_hi_and_reserved ()) ||
- (this->clock_seq_low_ != right.clock_seq_low ()) ||
- (this->node_ != *right.node ()))
- return false;
-
- return true;
+ return 0 == ACE_OS::memcmp (&this->uuid_, &right.uuid_, BINARY_SIZE);
}
ACE_INLINE bool
UUID::operator != (const UUID &right) const
{
- return !(*this == right);
+ return 0 != ACE_OS::memcmp (&this->uuid_, &right.uuid_, BINARY_SIZE);
}
-// ACE_INLINE bool
-//UUID::operator < (const UUID &rt) const
-// {
-// UUID right (rt);
-// if ((timeLow_ < right.timeLow ()) ||
-// (timeMid_ < right.timeMid ()) ||
-// (timeHiAndVersion_ < right.timeHiAndVersion ()) ||
-// (clockSeqHiAndReserved_ < right.clockSeqHiAndReserved ()) ||
-// (clockSeqLow_ < right.clockSeqLow ()) ||
-// (node_ < right.node ()))
-// {
-// return true;
-// }
-//
-// return false;
-// }
-//
-// ACE_INLINE bool
-// UUID::operator > (const UUID &right) const
-// {
-// return right < *this;
-// }
-//
-// ACE_INLINE bool
-// UUID::operator <= (const UUID &right) const
-// {
-// return !(*this > right);
-// }
-//
-// ACE_INLINE bool
-// UUID::operator >= (const UUID &right) const
-// {
-// return !(*this < right);
-// }
-//
ACE_INLINE bool
UUID_Node::operator == (const UUID_Node& rt) const
{