… | |
… | |
88 | |
88 | |
89 | struct UUID |
89 | struct UUID |
90 | { |
90 | { |
91 | uint64 seq; |
91 | uint64 seq; |
92 | |
92 | |
|
|
93 | static UUID cur; // last uuid generated |
|
|
94 | static void init (); |
|
|
95 | static UUID gen (); |
|
|
96 | |
93 | UUID () { } |
97 | UUID () { } |
94 | UUID (uint64 seq) : seq(seq) { } |
98 | UUID (uint64 seq) : seq(seq) { } |
95 | operator uint64() { return seq; } |
99 | operator uint64() { return seq; } |
96 | void operator =(uint64 seq) { this->seq = seq; } |
100 | void operator =(uint64 seq) { this->seq = seq; } |
97 | }; |
101 | }; |
98 | |
|
|
99 | extern void init_uuid (); |
|
|
100 | extern UUID gen_uuid (); |
|
|
101 | extern const uint64 UUID_SKIP; |
|
|
102 | |
102 | |
103 | /* Definition for WILL_APPLY values. Replaces having harcoded values |
103 | /* Definition for WILL_APPLY values. Replaces having harcoded values |
104 | * sprinkled in the code. Note that some of these also replace fields |
104 | * sprinkled in the code. Note that some of these also replace fields |
105 | * that were in the can_apply area. What is the point of having both |
105 | * that were in the can_apply area. What is the point of having both |
106 | * can_apply and will_apply? |
106 | * can_apply and will_apply? |