summaryrefslogtreecommitdiff
path: root/node/Address.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-04-26 17:11:25 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-04-26 17:11:25 -0700
commitb9dba97fdb8644e3c427b079d81ed9db3697bf1b (patch)
tree866cc433049cfdcb3c5e939e7493c3822bc44bb2 /node/Address.hpp
parent25a5275921678e9048a4bc0e1827f0235894c0bf (diff)
downloadinfinitytier-b9dba97fdb8644e3c427b079d81ed9db3697bf1b.tar.gz
infinitytier-b9dba97fdb8644e3c427b079d81ed9db3697bf1b.zip
Bunch more refactoring for an even more compact NetworkConfig representation, especially rules.
Diffstat (limited to 'node/Address.hpp')
-rw-r--r--node/Address.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/node/Address.hpp b/node/Address.hpp
index db46a4c9..9bf5605a 100644
--- a/node/Address.hpp
+++ b/node/Address.hpp
@@ -216,6 +216,13 @@ public:
*/
inline unsigned char operator[](unsigned int i) const throw() { return (unsigned char)((_a >> (32 - (i * 8))) & 0xff); }
+ inline bool operator==(const uint64_t &a) const throw() { return (_a == (a & 0xffffffffffULL)); }
+ inline bool operator!=(const uint64_t &a) const throw() { return (_a != (a & 0xffffffffffULL)); }
+ inline bool operator>(const uint64_t &a) const throw() { return (_a > (a & 0xffffffffffULL)); }
+ inline bool operator<(const uint64_t &a) const throw() { return (_a < (a & 0xffffffffffULL)); }
+ inline bool operator>=(const uint64_t &a) const throw() { return (_a >= (a & 0xffffffffffULL)); }
+ inline bool operator<=(const uint64_t &a) const throw() { return (_a <= (a & 0xffffffffffULL)); }
+
inline bool operator==(const Address &a) const throw() { return (_a == a._a); }
inline bool operator!=(const Address &a) const throw() { return (_a != a._a); }
inline bool operator>(const Address &a) const throw() { return (_a > a._a); }