r3216 - trunk/libmutil/include/libmutil
mikma at minisip.org
mikma at minisip.org
Sun Feb 18 21:11:02 CET 2007
Author: mikma
Date: 2007-02-18 21:11:01 +0100 (Sun, 18 Feb 2007)
New Revision: 3216
Modified:
trunk/libmutil/include/libmutil/MemObject.h
Log:
Add MRef::operator<, needed when using MRef as keytype in std::map etc.
Modified: trunk/libmutil/include/libmutil/MemObject.h
===================================================================
--- trunk/libmutil/include/libmutil/MemObject.h 2007-02-18 20:10:01 UTC (rev 3215)
+++ trunk/libmutil/include/libmutil/MemObject.h 2007-02-18 20:11:01 UTC (rev 3216)
@@ -259,6 +259,12 @@
inline bool operator ==(const MRef<OPType> r) const;
/**
+ Overload the < operator (between MRefs).
+ True if the referred objects are equal (not the MRefs)
+ */
+ inline bool operator <(const MRef<OPType> r) const;
+
+ /**
Return true if contained object is null
*/
inline bool isNull() const;
@@ -381,6 +387,11 @@
}
template<class OPType>
+bool MRef<OPType>::operator <(const MRef<OPType> r) const {
+ return getPointer() > r.getPointer();
+}
+
+template<class OPType>
bool MRef<OPType>::isNull() const{
return getPointer()==NULL;
}
More information about the Minisip-devel
mailing list