Apache Ignite C++
guid.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
23 #ifndef _IGNITE_GUID
24 #define _IGNITE_GUID
25 
26 #include <stdint.h>
27 
28 #include <ignite/common/common.h>
29 
30 namespace ignite
31 {
35  class IGNITE_IMPORT_EXPORT Guid
36  {
37  public:
41  Guid();
42 
49  Guid(int64_t most, int64_t least);
50 
56  int64_t GetMostSignificantBits() const;
57 
63  int64_t GetLeastSignificantBits() const;
64 
77  int32_t GetVersion() const;
78 
91  int32_t GetVariant() const;
92 
98  int32_t GetHashCode() const;
99 
107  friend bool IGNITE_IMPORT_EXPORT operator== (Guid& val1, Guid& val2);
108  private:
110  int64_t most;
111 
113  int64_t least;
114  };
115 }
116 
117 #endif
bool operator==(Guid &val1, Guid &val2)
Definition: guid.cpp:61
Global universally unique identifier (GUID).
Definition: guid.h:35
Apache Ignite API.
Definition: binary_consts.h:28