+
+ /*!
+ * \return SMDS_ElemIteratorPtr on an std container of SMDS_MeshElement's
+ */
+ template < class ELEM_SET >
+ SMDS_ElemIteratorPtr elemSetIterator( const ELEM_SET& elements )
+ {
+ typedef SMDS_SetIterator
+ < SMDS_pElement, typename ELEM_SET::const_iterator> TSetIterator;
+ return boost::make_shared< TSetIterator >( elements.begin(), elements.end() );
+ }
+
+ /*!
+ * \brief Increment enum value
+ */
+ template < typename ENUM >
+ void Increment( ENUM& v, int delta=1 )
+ {
+ v = ENUM( int(v)+delta );
+ }
+
+ /*!
+ * \brief Return incremented enum value
+ */
+ template < typename ENUM >
+ ENUM Add( ENUM v, int delta )
+ {
+ return ENUM( int(v)+delta );
+ }