[MOAB-dev] r2813 - MOAB/trunk

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Fri Apr 10 17:34:36 CDT 2009


Author: kraftche
Date: 2009-04-10 17:34:36 -0500 (Fri, 10 Apr 2009)
New Revision: 2813

Modified:
   MOAB/trunk/MBRange.hpp
Log:
add oeprator+ and operator- for MBRange::iterator

Modified: MOAB/trunk/MBRange.hpp
===================================================================
--- MOAB/trunk/MBRange.hpp	2009-04-10 21:26:46 UTC (rev 2812)
+++ MOAB/trunk/MBRange.hpp	2009-04-10 22:34:36 UTC (rev 2813)
@@ -646,6 +646,22 @@
   const_pair_iterator const_pair_end() const { return const_pair_iterator( &mHead ); }
 };
 
+inline MBRange::const_iterator 
+operator+( const MBRange::const_iterator& it, MBEntityID step )
+  { MBRange::const_iterator tmp(it); return tmp += step; }
+  
+inline MBRange::const_iterator 
+operator+( MBEntityID step, const MBRange::const_iterator& it )
+  { MBRange::const_iterator tmp(it); return tmp += step; }
+  
+inline MBRange::const_iterator 
+operator-( const MBRange::const_iterator& it, MBEntityID step )
+  { MBRange::const_iterator tmp(it); return tmp -= step; }
+  
+inline MBRange::const_iterator 
+operator-( MBEntityID step, const MBRange::const_iterator& it )
+  { MBRange::const_iterator tmp(it); return tmp -= step; }
+
 //! Use as you would an STL back_inserter
 /**
  *  e.g. std::copy(list.begin(), list.end(), mb_range_inserter(my_range);



More information about the moab-dev mailing list