diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-01-30 18:40:05 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-01-30 18:40:05 +0000 |
commit | 0d61adeb5f784b45f76d76dad9974f4111fb3c8c (patch) | |
tree | 4fe8830715bd6af57dd91ebca780318a645435cd /pjlib/include/pj++/types.hpp | |
parent | 7638eeee106fe58a1225f642e733629f29418818 (diff) |
Finished implementation of UA layer (to be tested)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@127 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj++/types.hpp')
-rw-r--r-- | pjlib/include/pj++/types.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pjlib/include/pj++/types.hpp b/pjlib/include/pj++/types.hpp index e0c2e230..7e165a53 100644 --- a/pjlib/include/pj++/types.hpp +++ b/pjlib/include/pj++/types.hpp @@ -156,5 +156,19 @@ private: }; +// +// Macro to declare common object comparison operators. +// +#define PJ_DECLARE_OPERATORS(rhs_type) \ + bool operator!=(rhs_type rhs) const { \ + return !operator==(rhs); } \ + bool operator<=(rhs_type rhs) const { \ + return operator<(rhs) || operator==(rhs); } \ + bool operator>(rhs_type rhs) const { \ + return !operator<=(rhs); } \ + bool operator>=(rhs_type rhs) const { \ + return !operator<(rhs); } + + #endif /* __PJPP_TYPES_HPP__ */ |