summaryrefslogtreecommitdiff
path: root/ace/UUID.inl
blob: 0bd9fc053c6e6b8ea4ce49c33fcbe2564f3133a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
//$Id$
// -*- C++ -*-

namespace ACE_Utils
{

  /// Data Members for Class Attributes
  ACE_INLINE ACE_UINT32
  UUID::timeLow (void)
  {
    return this->timeLow_;
  }

  ACE_INLINE void
  UUID::timeLow (ACE_UINT32 timelow)
  {
    this->timeLow_ = timelow;
  }

  ACE_INLINE ACE_UINT16
  UUID::timeMid (void)
  {
    return this->timeMid_;
  }

  ACE_INLINE void
  UUID::timeMid (ACE_UINT16 time_mid)
  {
    this->timeMid_ = time_mid;
  }

  ACE_INLINE ACE_UINT16
  UUID::timeHiAndVersion (void)
  {
    return this->timeHiAndVersion_;
  }

  ACE_INLINE void
  UUID::timeHiAndVersion (ACE_UINT16 timeHiAndVersion)
  {
    this->timeHiAndVersion_ = timeHiAndVersion;
  }

  ACE_INLINE u_char
  UUID::clockSeqHiAndReserved (void)
  {
    return this->clockSeqHiAndReserved_;
  }

  ACE_INLINE void
  UUID::clockSeqHiAndReserved (u_char clockSeqHiAndReserved)
  {
    this->clockSeqHiAndReserved_ = clockSeqHiAndReserved;
  }

  ACE_INLINE u_char
  UUID::clockSeqLow (void)
  {
    return this->clockSeqLow_;
  }

  ACE_INLINE void
  UUID::clockSeqLow (u_char clockSeqLow)
  {
    this->clockSeqLow_ = clockSeqLow;
  }

  ACE_INLINE UUID_node*
  UUID::node (void)
  {
    return this->node_;
  }

  ACE_INLINE void
  UUID::node (UUID_node* node)
  {
    if (node_release_ == 1)
    delete node_;

    this->node_ = node;
    node_release_ = 0;
  }

  ACE_INLINE ACE_CString*
  UUID::thr_id (void)
  {
    return &this->thr_id_;
  }

  ACE_INLINE void
  UUID::thr_id (char* thr_id)
  {
    this->thr_id_ = thr_id;
  }

  ACE_INLINE ACE_CString*
  UUID::pid (void)
  {
    return &this->pid_;
  }

  ACE_INLINE void
  UUID::pid (char* pid)
  {
    this->pid_ = pid;
  }

  //ACE_INLINE bool
  //UUID::operator == (const UUID &right) const
  //{
  //  UUID rt (right);
  //  if ((timeLow_ != rt.timeLow ()) ||
  //      (timeMid_ != rt.timeMid ()) ||
  //      (timeHiAndVersion_ != rt.timeHiAndVersion ()) ||
  //      (clockSeqHiAndReserved_ != rt.clockSeqHiAndReserved ()) ||
  //      (clockSeqLow_ != rt.clockSeqLow ()) ||
  //      (node_ != rt.node ()))
  //    {
  //      return false;
  //    }

  //  return true;
  //}

  //ACE_INLINE bool
  //UUID::operator != (const UUID &right) const
  //{
  //  return !(*this == right);
  //}

//  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
//  {
//    UUID_node right = rt;
//    for (size_t i = 0; i < NODE_ID_SIZE; ++i)
//    {
//      if (nodeID_ [i] != right.nodeID ()[i])
//        {
//          return false;
//        }
//    }
//    return true;
//  }
//
//  ACE_INLINE bool
//  UUID_node::operator != (const UUID_node& right) const
//  {
//    return !(*this == right);
//  }
//
//  ACE_INLINE bool
//  UUID_node::operator < (const UUID_node& rt) const
//  {
//    UUID_node right = rt;
//    for (size_t i = 0; i < NODE_ID_SIZE; ++i)
//      if (nodeID_ [i] < right.nodeID ()[i])
//      return true;
//
//    return false;
//  }
}