client-cpp  0.0.1-SNAPSHOT
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 <boost/cstdint.hpp>
21 
23 
24 namespace kaa {
25 
30 public:
31 
36  DeltaHandlerId(const uuid_t& uuid);
37 
42  : handlerId_(id.handlerId_) {}
43 
45  handlerId_ = id.handlerId_;
46  return *this;
47  }
48 
53  DeltaHandlerId(const boost::uint64_t& handlerId)
54  : handlerId_(handlerId) {}
55 
61  inline bool operator==(const DeltaHandlerId& id) const {
62  return (handlerId_ == id.handlerId_);
63  }
64 
70  inline bool operator!=(const DeltaHandlerId& id) const {
71  return (handlerId_ != id.handlerId_);
72  }
73 
79  inline bool operator<(const DeltaHandlerId& id) const {
80  return (handlerId_ < id.handlerId_);
81  }
82 
88  inline bool operator>(const DeltaHandlerId& id) const {
89  return (handlerId_ > id.handlerId_);
90  }
91 
97  inline bool operator<=(const DeltaHandlerId& id) const {
98  return (handlerId_ <= id.handlerId_);
99  }
100 
106  inline bool operator>=(const DeltaHandlerId& id) const {
107  return (handlerId_ >= id.handlerId_);
108  }
109 
113  inline boost::uint64_t getHandlerId() const {
114  return handlerId_ ;
115  }
116 
117 private:
118  boost::uint64_t handlerId_;
119 };
120 
121 } /* namespace kaa */
122 
123 #endif /* DELTAHANDLERID_HPP_ */
DeltaHandlerId(const uuid_t &uuid)
bool operator>=(const DeltaHandlerId &id) const
DeltaHandlerId(const DeltaHandlerId &id)
bool operator==(const DeltaHandlerId &id) const
bool operator>(const DeltaHandlerId &id) const
boost::uuids::uuid uuid_t
boost::uint64_t getHandlerId() const
bool operator<=(const DeltaHandlerId &id) const
bool operator<(const DeltaHandlerId &id) const
DeltaHandlerId & operator=(const DeltaHandlerId &id)
DeltaHandlerId(const boost::uint64_t &handlerId)
bool operator!=(const DeltaHandlerId &id) const