UUID.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 //$Id: UUID.inl 80826 2008-03-04 14:51:23Z wotte $
00004 
00005 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00006 
00007 namespace ACE_Utils
00008 {
00009 
00010   /// Data Members for Class Attributes
00011   ACE_INLINE ACE_UINT32
00012   UUID::time_low (void) const
00013   {
00014     return this->time_low_;
00015   }
00016 
00017   ACE_INLINE void
00018   UUID::time_low (ACE_UINT32 timelow)
00019   {
00020     this->time_low_ = timelow;
00021   }
00022 
00023   ACE_INLINE ACE_UINT16
00024   UUID::time_mid (void) const
00025   {
00026     return this->time_mid_;
00027   }
00028 
00029   ACE_INLINE void
00030   UUID::time_mid (ACE_UINT16 time_mid)
00031   {
00032     this->time_mid_ = time_mid;
00033   }
00034 
00035   ACE_INLINE ACE_UINT16
00036   UUID::time_hi_and_version (void) const
00037   {
00038     return this->time_hi_and_version_;
00039   }
00040 
00041   ACE_INLINE void
00042   UUID::time_hi_and_version (ACE_UINT16 time_hi_and_version)
00043   {
00044     this->time_hi_and_version_ = time_hi_and_version;
00045   }
00046 
00047   ACE_INLINE u_char
00048   UUID::clock_seq_hi_and_reserved (void) const
00049   {
00050     return this->clock_seq_hi_and_reserved_;
00051   }
00052 
00053   ACE_INLINE void
00054   UUID::clock_seq_hi_and_reserved (u_char clock_seq_hi_and_reserved)
00055   {
00056     this->clock_seq_hi_and_reserved_ = clock_seq_hi_and_reserved;
00057   }
00058 
00059   ACE_INLINE u_char
00060   UUID::clock_seq_low (void) const
00061   {
00062     return this->clock_seq_low_;
00063   }
00064 
00065   ACE_INLINE void
00066   UUID::clock_seq_low (u_char clock_seq_low)
00067   {
00068     this->clock_seq_low_ = clock_seq_low;
00069   }
00070 
00071   ACE_INLINE UUID_Node*
00072   UUID::node (void) const
00073   {
00074     return this->node_;
00075   }
00076 
00077   ACE_INLINE void
00078   UUID::node (UUID_Node* node)
00079   {
00080     if (node_release_)
00081       delete node_;
00082 
00083     this->node_ = node;
00084     node_release_ = false;
00085   }
00086 
00087   ACE_INLINE ACE_CString*
00088   UUID::thr_id (void)
00089   {
00090     return &this->thr_id_;
00091   }
00092 
00093   ACE_INLINE void
00094   UUID::thr_id (char* thr_id)
00095   {
00096     this->thr_id_ = thr_id;
00097   }
00098 
00099   ACE_INLINE ACE_CString*
00100   UUID::pid (void)
00101   {
00102     return &this->pid_;
00103   }
00104 
00105   ACE_INLINE void
00106   UUID::pid (char* pid)
00107   {
00108     this->pid_ = pid;
00109   }
00110 
00111   ACE_INLINE void
00112   UUID::from_string (const ACE_CString& uuidString)
00113   {
00114     this->from_string_i (uuidString);
00115   }
00116 
00117   ACE_INLINE bool
00118   UUID::operator == (const UUID &right) const
00119   {
00120     if ((this->time_low_ != right.time_low ()) ||
00121         (this->time_mid_ != right.time_mid ()) ||
00122         (this->time_hi_and_version_ != right.time_hi_and_version ()) ||
00123         (this->clock_seq_hi_and_reserved_ != right.clock_seq_hi_and_reserved ()) ||
00124         (this->clock_seq_low_ != right.clock_seq_low ()) ||
00125         (*this->node_ != *right.node ()))
00126       return false;
00127 
00128       return true;
00129   }
00130 
00131   ACE_INLINE bool
00132   UUID::operator != (const UUID &right) const
00133   {
00134     return !(*this == right);
00135   }
00136 
00137 //  ACE_INLINE bool
00138 //UUID::operator < (const UUID &rt) const
00139 //  {
00140 //    UUID right (rt);
00141 //    if ((timeLow_ < right.timeLow ()) ||
00142 //        (timeMid_ < right.timeMid ()) ||
00143 //        (timeHiAndVersion_ < right.timeHiAndVersion ()) ||
00144 //        (clockSeqHiAndReserved_ < right.clockSeqHiAndReserved ()) ||
00145 //        (clockSeqLow_ < right.clockSeqLow ()) ||
00146 //        (node_ < right.node ()))
00147 //      {
00148 //        return true;
00149 //      }
00150 //
00151 //    return false;
00152 //  }
00153 //
00154 //  ACE_INLINE bool
00155 //  UUID::operator > (const UUID &right) const
00156 //  {
00157 //    return right < *this;
00158 //  }
00159 //
00160 //  ACE_INLINE bool
00161 //  UUID::operator <= (const UUID &right) const
00162 //  {
00163 //    return !(*this > right);
00164 //  }
00165 //
00166 //  ACE_INLINE bool
00167 //  UUID::operator >= (const UUID &right) const
00168 //  {
00169 //    return !(*this < right);
00170 //  }
00171 //
00172   ACE_INLINE bool
00173   UUID_Node::operator == (const UUID_Node& rt) const
00174   {
00175     for (size_t i = 0; i < NODE_ID_SIZE; ++i)
00176       if (node_ID_ [i] != rt.node_ID_ [i])
00177         return false;
00178 
00179     return true;
00180   }
00181 
00182   ACE_INLINE bool
00183   UUID_Node::operator != (const UUID_Node& right) const
00184   {
00185     return !(*this == right);
00186   }
00187 
00188 //  ACE_INLINE bool
00189 //  UUID_node::operator < (const UUID_node& rt) const
00190 //  {
00191 //    UUID_node right = rt;
00192 //    for (size_t i = 0; i < NODE_ID_SIZE; ++i)
00193 //      if (nodeID_ [i] < right.nodeID ()[i])
00194 //      return true;
00195 //
00196 //    return false;
00197 //  }
00198 }
00199 
00200 ACE_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:18:44 2010 for ACE by  doxygen 1.4.7