From 0d61adeb5f784b45f76d76dad9974f4111fb3c8c Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Mon, 30 Jan 2006 18:40:05 +0000 Subject: Finished implementation of UA layer (to be tested) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@127 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/include/pj++/types.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'pjlib/include/pj++/types.hpp') 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__ */ -- cgit v1.2.3