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