UUID.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 //$Id: UUID.inl 74165 2006-08-22 09:38:29Z johnnyw $
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::timeLow (void) const
00013   {
00014     return this->timeLow_;
00015   }
00016 
00017   ACE_INLINE void
00018   UUID::timeLow (ACE_UINT32 timelow)
00019   {
00020     this->timeLow_ = timelow;
00021   }
00022 
00023   ACE_INLINE ACE_UINT16
00024   UUID::timeMid (void) const
00025   {
00026     return this->timeMid_;
00027   }
00028 
00029   ACE_INLINE void
00030   UUID::timeMid (ACE_UINT16 time_mid)
00031   {
00032     this->timeMid_ = time_mid;
00033   }
00034 
00035   ACE_INLINE ACE_UINT16
00036   UUID::timeHiAndVersion (void) const
00037   {
00038     return this->timeHiAndVersion_;
00039   }
00040 
00041   ACE_INLINE void
00042   UUID::timeHiAndVersion (ACE_UINT16 timeHiAndVersion)
00043   {
00044     this->timeHiAndVersion_ = timeHiAndVersion;
00045   }
00046 
00047   ACE_INLINE u_char
00048   UUID::clockSeqHiAndReserved (void) const
00049   {
00050     return this->clockSeqHiAndReserved_;
00051   }
00052 
00053   ACE_INLINE void
00054   UUID::clockSeqHiAndReserved (u_char clockSeqHiAndReserved)
00055   {
00056     this->clockSeqHiAndReserved_ = clockSeqHiAndReserved;
00057   }
00058 
00059   ACE_INLINE u_char
00060   UUID::clockSeqLow (void) const
00061   {
00062     return this->clockSeqLow_;
00063   }
00064 
00065   ACE_INLINE void
00066   UUID::clockSeqLow (u_char clockSeqLow)
00067   {
00068     this->clockSeqLow_ = clockSeqLow;
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->timeLow_ != right.timeLow ()) ||
00121         (this->timeMid_ != right.timeMid ()) ||
00122         (this->timeHiAndVersion_ != right.timeHiAndVersion ()) ||
00123         (this->clockSeqHiAndReserved_ != right.clockSeqHiAndReserved ()) ||
00124         (this->clockSeqLow_ != right.clockSeqLow ()) ||
00125         (*this->node_ != *right.node ()))
00126       {
00127         return false;
00128       }
00129 
00130       return true;
00131   }
00132 
00133   ACE_INLINE bool
00134   UUID::operator != (const UUID &right) const
00135   {
00136     return !(*this == right);
00137   }
00138 
00139 //  ACE_INLINE bool
00140 //UUID::operator < (const UUID &rt) const
00141 //  {
00142 //    UUID right (rt);
00143 //    if ((timeLow_ < right.timeLow ()) ||
00144 //        (timeMid_ < right.timeMid ()) ||
00145 //        (timeHiAndVersion_ < right.timeHiAndVersion ()) ||
00146 //        (clockSeqHiAndReserved_ < right.clockSeqHiAndReserved ()) ||
00147 //        (clockSeqLow_ < right.clockSeqLow ()) ||
00148 //        (node_ < right.node ()))
00149 //      {
00150 //        return true;
00151 //      }
00152 //
00153 //    return false;
00154 //  }
00155 //
00156 //  ACE_INLINE bool
00157 //  UUID::operator > (const UUID &right) const
00158 //  {
00159 //    return right < *this;
00160 //  }
00161 //
00162 //  ACE_INLINE bool
00163 //  UUID::operator <= (const UUID &right) const
00164 //  {
00165 //    return !(*this > right);
00166 //  }
00167 //
00168 //  ACE_INLINE bool
00169 //  UUID::operator >= (const UUID &right) const
00170 //  {
00171 //    return !(*this < right);
00172 //  }
00173 //
00174   ACE_INLINE bool
00175   UUID_node::operator == (const UUID_node& rt) const
00176   {
00177     for (size_t i = 0; i < NODE_ID_SIZE; ++i)
00178     {
00179       if (nodeID_ [i] != rt.nodeID_ [i])
00180         {
00181           return false;
00182         }
00183     }
00184     return true;
00185   }
00186 
00187   ACE_INLINE bool
00188   UUID_node::operator != (const UUID_node& right) const
00189   {
00190     return !(*this == right);
00191   }
00192 
00193 //  ACE_INLINE bool
00194 //  UUID_node::operator < (const UUID_node& rt) const
00195 //  {
00196 //    UUID_node right = rt;
00197 //    for (size_t i = 0; i < NODE_ID_SIZE; ++i)
00198 //      if (nodeID_ [i] < right.nodeID ()[i])
00199 //      return true;
00200 //
00201 //    return false;
00202 //  }
00203 }
00204 
00205 ACE_END_VERSIONED_NAMESPACE_DECL

Generated on Sun Jan 27 12:05:43 2008 for ACE by doxygen 1.3.6