client-cpp  0.6.3
DeltaHandlerId.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014 CyberVision, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef DELTAHANDLERID_HPP_
18 #define DELTAHANDLERID_HPP_
19 
20 #include "kaa/KaaDefaults.hpp"
21 
22 #ifdef KAA_USE_CONFIGURATION
23 
24 #include <cstdint>
25 
27 
28 namespace kaa {
29 
33 class DeltaHandlerId {
34 public:
35 
40  DeltaHandlerId(const uuid_t& uuid);
41 
45  DeltaHandlerId(const DeltaHandlerId& id)
46  : handlerId_(id.handlerId_) {}
47 
48  DeltaHandlerId& operator=(const DeltaHandlerId& id) {
49  handlerId_ = id.handlerId_;
50  return *this;
51  }
52 
57  DeltaHandlerId(const std::uint64_t& handlerId)
58  : handlerId_(handlerId) {}
59 
65  inline bool operator==(const DeltaHandlerId& id) const {
66  return (handlerId_ == id.handlerId_);
67  }
68 
74  inline bool operator!=(const DeltaHandlerId& id) const {
75  return (handlerId_ != id.handlerId_);
76  }
77 
83  inline bool operator<(const DeltaHandlerId& id) const {
84  return (handlerId_ < id.handlerId_);
85  }
86 
92  inline bool operator>(const DeltaHandlerId& id) const {
93  return (handlerId_ > id.handlerId_);
94  }
95 
101  inline bool operator<=(const DeltaHandlerId& id) const {
102  return (handlerId_ <= id.handlerId_);
103  }
104 
110  inline bool operator>=(const DeltaHandlerId& id) const {
111  return (handlerId_ >= id.handlerId_);
112  }
113 
117  inline std::uint64_t getHandlerId() const {
118  return handlerId_ ;
119  }
120 
121 private:
122  std::uint64_t handlerId_;
123 };
124 
125 } /* namespace kaa */
126 
127 #endif
128 
129 #endif /* DELTAHANDLERID_HPP_ */