mark type modified from int to size_type, exception thrown in get_new_mark and test added in the test-suite

This commit is contained in:
Sylvain Brandel 2015-06-12 15:11:04 +02:00
parent df9340115a
commit 25b2727381
12 changed files with 190 additions and 244 deletions

View File

@ -883,33 +883,33 @@ void reverse_orientation_connected_component(Dart_handle adart);
/*! /*!
Reserves a new mark. Returns its Reserves a new mark. Returns its
index. Returns -1 if there is no more available free mark. index. If there is no more available free mark, throw the exception Exception_no_more_available_mark.
*/ */
int get_new_mark() const; size_type get_new_mark() const;
/*! /*!
Returns true iff `m` is a reserved mark of the combinatorial map. Returns true iff `m` is a reserved mark of the combinatorial map.
\pre 0\f$ \leq\f$<I>m</I>\f$ <\f$\ref CombinatorialMap::NB_MARKS "NB_MARKS". \pre 0\f$ \leq\f$<I>m</I>\f$ <\f$\ref CombinatorialMap::NB_MARKS "NB_MARKS".
*/ */
bool is_reserved(int m) const; bool is_reserved(size_type m) const;
/*! /*!
Returns true iff `*dh` is marked for `m`. Returns true iff `*dh` is marked for `m`.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)" and `*dh`\f$ \in\f$`darts()`. \pre \ref CombinatorialMap::is_reserved "is_reserved(m)" and `*dh`\f$ \in\f$`darts()`.
*/ */
bool is_marked(Dart_const_handle dh, int m) const; bool is_marked(Dart_const_handle dh, size_type m) const;
/*! /*!
Marks `*dh` for `m`. Marks `*dh` for `m`.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)" and `*dh`\f$ \in\f$`darts()`. \pre \ref CombinatorialMap::is_reserved "is_reserved(m)" and `*dh`\f$ \in\f$`darts()`.
*/ */
void mark(Dart_const_handle dh, int m) const; void mark(Dart_const_handle dh, size_type m) const;
/*! /*!
Unmarks `*dh` for the mark `m`. Unmarks `*dh` for the mark `m`.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)" and `*dh`\f$ \in\f$`darts()`. \pre \ref CombinatorialMap::is_reserved "is_reserved(m)" and `*dh`\f$ \in\f$`darts()`.
*/ */
void unmark(Dart_const_handle dh, int m) const; void unmark(Dart_const_handle dh, size_type m) const;
/*! /*!
Inverse the mark `m` for all the darts of the combinatorial map. Inverse the mark `m` for all the darts of the combinatorial map.
@ -917,31 +917,31 @@ All the marked darts become unmarked and all the unmarked darts
become marked. become marked.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)". \pre \ref CombinatorialMap::is_reserved "is_reserved(m)".
*/ */
void negate_mark(int m) const; void negate_mark(size_type m) const;
/*! /*!
Unmarks all the darts of the combinatorial map for `m`. Unmarks all the darts of the combinatorial map for `m`.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)". \pre \ref CombinatorialMap::is_reserved "is_reserved(m)".
*/ */
void unmark_all(int m) const; void unmark_all(size_type m) const;
/*! /*!
Returns the number of marked darts for `m`. Returns the number of marked darts for `m`.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)". \pre \ref CombinatorialMap::is_reserved "is_reserved(m)".
*/ */
size_type number_of_marked_darts(int m) const; size_type number_of_marked_darts(size_type m) const;
/*! /*!
Return the number of unmarked darts for `m`. Return the number of unmarked darts for `m`.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)". \pre \ref CombinatorialMap::is_reserved "is_reserved(m)".
*/ */
size_type number_of_unmarked_darts(int m) const; size_type number_of_unmarked_darts(size_type m) const;
/*! /*!
Frees mark `m`. Frees mark `m`.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)". \pre \ref CombinatorialMap::is_reserved "is_reserved(m)".
*/ */
void free_mark(int m) const; void free_mark(size_type m) const;
/// @} /// @}
}; /* end CombinatorialMap */ }; /* end CombinatorialMap */

View File

@ -9,43 +9,24 @@ typedef CMap_3::Dart_handle Dart_handle;
typedef CMap_3::size_type size_type; typedef CMap_3::size_type size_type;
typedef CMap_3::Exception_mark_is_out_of_border Exception_mark_is_out_of_border; typedef CMap_3::Exception_no_more_available_mark Exception_no_more_available_mark;
int main() int main()
{ {
CMap_3 cm; CMap_3 cm;
// we try to reserve more marks than available
std::cout << cm.NB_MARKS << " available marks\n";
size_type marks[cm.NB_MARKS+1];
#if 0
for (size_type i=0;i<cm.NB_MARKS+1;i++)
{
try
{
marks[i] = cm.get_new_mark();
}
catch (Exception_mark_is_out_of_border e)
{
std::cout << "Mark number " << i << " is NOT ok\n";
std::cerr<<"No more free mark, exit."<<std::endl;
exit(-1);
}
std::cout << "Mark number " << i << " is ok\n";
}
for (size_type i=0;i<cm.NB_MARKS+1;i++)
{
cm.free_mark(marks[i]);
}
#endif
while (1)
{
size_type m = cm.get_new_mark();
}
// 1) Reserve a mark. // 1) Reserve a mark.
size_type mark; size_type mark;
try try
{ {
mark = cm.get_new_mark(); mark = cm.get_new_mark();
} }
catch (Exception_mark_is_out_of_border e) catch (Exception_no_more_available_mark e)
{ {
std::cerr<<"No more free mark, exit."<<std::endl; std::cerr<<"No more free mark, exit."<<std::endl;
exit(-1); exit(-1);

View File

@ -105,8 +105,8 @@ namespace CGAL {
unmark_treated_darts(); unmark_treated_darts();
this->mmap->free_mark(mcell_mark_number); this->mmap->free_mark(mcell_mark_number);
this->mmap->free_mark(this->mmark_number); this->mmap->free_mark(this->mmark_number);
this->mcell_mark_number = Map::MARK_ERROR; // To avoid basic class to try to unmark darts. this->mcell_mark_number = Map::INVALID_MARK; // To avoid basic class to try to unmark darts.
this->mmark_number = Map::MARK_ERROR; // To avoid basic class to try to unmark darts. this->mmark_number = Map::INVALID_MARK; // To avoid basic class to try to unmark darts.
} }
/// Copy constructor. /// Copy constructor.
@ -217,7 +217,7 @@ namespace CGAL {
if (this->mmap->get_number_of_times_mark_reserved(mmark_number)==1) if (this->mmap->get_number_of_times_mark_reserved(mmark_number)==1)
unmark_treated_darts(); unmark_treated_darts();
this->mmap->free_mark(mmark_number); this->mmap->free_mark(mmark_number);
this->mmark_number = Map::MARK_ERROR; // To avoid basic class to try to unmark darts. this->mmark_number = Map::INVALID_MARK; // To avoid basic class to try to unmark darts.
} }
/// Copy constructor. /// Copy constructor.
@ -333,7 +333,7 @@ namespace CGAL {
if (this->mmap->get_number_of_times_mark_reserved(mmark_number)==1) if (this->mmap->get_number_of_times_mark_reserved(mmark_number)==1)
unmark_treated_darts(); unmark_treated_darts();
this->mmap->free_mark(mmark_number); this->mmap->free_mark(mmark_number);
this->mmark_number = Map::MARK_ERROR; // To avoid basic class to try to unmark darts. this->mmark_number = Map::INVALID_MARK; // To avoid basic class to try to unmark darts.
} }
/// Copy constructor. /// Copy constructor.

View File

@ -97,7 +97,7 @@ namespace CGAL {
static const size_type NB_MARKS = Base::NB_MARKS; static const size_type NB_MARKS = Base::NB_MARKS;
// to fix the use of -1 to test unused marks in several algorithms // to fix the use of -1 to test unused marks in several algorithms
static const size_type MARK_ERROR = NB_MARKS; static const size_type INVALID_MARK = NB_MARKS;
static const unsigned int dimension = Base::dimension; static const unsigned int dimension = Base::dimension;
typedef typename Base::Null_handle_type Null_handle_type; typedef typename Base::Null_handle_type Null_handle_type;
@ -146,7 +146,7 @@ namespace CGAL {
public Base::template Attribute_const_range<i> public Base::template Attribute_const_range<i>
{}; {};
class Exception_mark_is_out_of_border {}; class Exception_no_more_available_mark {};
public: public:
/** Default Combinatorial_map constructor. /** Default Combinatorial_map constructor.
@ -749,8 +749,7 @@ namespace CGAL {
*/ */
bool is_reserved(size_type amark) const bool is_reserved(size_type amark) const
{ {
CGAL_assertion(amark>=0 && amark<NB_MARKS); CGAL_assertion(amark<NB_MARKS);
// CGAL_assume( (size_type)amark<NB_MARKS );
return (mnb_times_reserved_marks[amark]!=0); return (mnb_times_reserved_marks[amark]!=0);
} }
@ -762,7 +761,6 @@ namespace CGAL {
size_type number_of_marked_darts(size_type amark) const size_type number_of_marked_darts(size_type amark) const
{ {
CGAL_assertion( is_reserved(amark) ); CGAL_assertion( is_reserved(amark) );
// CGAL_assume( (size_type)amark<NB_MARKS );
return mnb_marked_darts[amark]; return mnb_marked_darts[amark];
} }
@ -803,9 +801,8 @@ namespace CGAL {
{ {
std::cerr << "Not enough Boolean marks: " std::cerr << "Not enough Boolean marks: "
"increase NB_MARKS in item class." << std::endl; "increase NB_MARKS in item class." << std::endl;
// return -1;
std::cerr << " (exception launched)" << std::endl; std::cerr << " (exception launched)" << std::endl;
throw Exception_mark_is_out_of_border(); throw Exception_no_more_available_mark();
} }
size_type m = mfree_marks_stack[mnb_used_marks]; size_type m = mfree_marks_stack[mnb_used_marks];
@ -826,7 +823,6 @@ namespace CGAL {
void share_a_mark(size_type amark) const void share_a_mark(size_type amark) const
{ {
CGAL_assertion( is_reserved(amark) ); CGAL_assertion( is_reserved(amark) );
// CGAL_assume( (size_type)amark<NB_MARKS );
++mnb_times_reserved_marks[amark]; ++mnb_times_reserved_marks[amark];
} }
@ -837,7 +833,6 @@ namespace CGAL {
size_type get_number_of_times_mark_reserved(size_type amark) const size_type get_number_of_times_mark_reserved(size_type amark) const
{ {
CGAL_assertion( amark<NB_MARKS ); CGAL_assertion( amark<NB_MARKS );
// CGAL_assume( (size_type)amark<NB_MARKS );
return mnb_times_reserved_marks[amark]; return mnb_times_reserved_marks[amark];
} }
@ -850,7 +845,6 @@ namespace CGAL {
void negate_mark(size_type amark) const void negate_mark(size_type amark) const
{ {
CGAL_assertion( is_reserved(amark) ); CGAL_assertion( is_reserved(amark) );
// CGAL_assume( (size_type)amark<NB_MARKS );
mnb_marked_darts[amark] = number_of_darts() - mnb_marked_darts[amark]; mnb_marked_darts[amark] = number_of_darts() - mnb_marked_darts[amark];
@ -866,7 +860,6 @@ namespace CGAL {
{ {
// CGAL_assertion( adart != null_dart_handle ); // CGAL_assertion( adart != null_dart_handle );
CGAL_assertion( is_reserved(amark) ); CGAL_assertion( is_reserved(amark) );
// CGAL_assume( (size_type)amark<NB_MARKS );
return get_dart_mark(adart, amark)!=mmask_marks[amark]; return get_dart_mark(adart, amark)!=mmask_marks[amark];
} }
@ -881,7 +874,6 @@ namespace CGAL {
{ {
CGAL_assertion( adart != null_dart_handle ); CGAL_assertion( adart != null_dart_handle );
CGAL_assertion( is_reserved(amark) ); CGAL_assertion( is_reserved(amark) );
// CGAL_assume( (size_type)amark<NB_MARKS );
if (is_marked(adart, amark) != astate) if (is_marked(adart, amark) != astate)
{ {
@ -900,7 +892,6 @@ namespace CGAL {
{ {
CGAL_assertion( adart != null_dart_handle ); CGAL_assertion( adart != null_dart_handle );
CGAL_assertion( is_reserved(amark) ); CGAL_assertion( is_reserved(amark) );
// CGAL_assume( (size_type)amark<NB_MARKS );
if (is_marked(adart, amark)) return; if (is_marked(adart, amark)) return;
@ -916,7 +907,6 @@ namespace CGAL {
{ {
CGAL_assertion( adart != null_dart_handle ); CGAL_assertion( adart != null_dart_handle );
CGAL_assertion( is_reserved(amark) ); CGAL_assertion( is_reserved(amark) );
// CGAL_assume( (size_type)amark<NB_MARKS );
if (!is_marked(adart, amark)) return; if (!is_marked(adart, amark)) return;
@ -932,7 +922,6 @@ namespace CGAL {
void mark_null_dart(size_type amark) const void mark_null_dart(size_type amark) const
{ {
CGAL_assertion( is_reserved(amark) ); CGAL_assertion( is_reserved(amark) );
// CGAL_assume( (size_type)amark<NB_MARKS );
#ifdef CGAL_CMAP_DEPRECATED #ifdef CGAL_CMAP_DEPRECATED
if ( null_dart_handle!=NULL ) // Pb with static null_dart_handle for windows if ( null_dart_handle!=NULL ) // Pb with static null_dart_handle for windows
@ -946,7 +935,6 @@ namespace CGAL {
void unmark_null_dart(size_type amark) const void unmark_null_dart(size_type amark) const
{ {
CGAL_assertion( is_reserved(amark) ); CGAL_assertion( is_reserved(amark) );
// CGAL_assume( (size_type)amark<NB_MARKS );
#ifdef CGAL_CMAP_DEPRECATED #ifdef CGAL_CMAP_DEPRECATED
if ( null_dart_handle!=NULL ) // Pb with static null_dart_handle for windows if ( null_dart_handle!=NULL ) // Pb with static null_dart_handle for windows
@ -983,7 +971,6 @@ namespace CGAL {
void free_mark(size_type amark) const void free_mark(size_type amark) const
{ {
CGAL_assertion( is_reserved(amark) ); CGAL_assertion( is_reserved(amark) );
// CGAL_assume( (size_type)amark<NB_MARKS );
if ( mnb_times_reserved_marks[amark]>1 ) if ( mnb_times_reserved_marks[amark]>1 )
{ {
@ -1093,7 +1080,7 @@ namespace CGAL {
unsigned int i = 0, j = 0; unsigned int i = 0, j = 0;
std::vector<size_type> marks(dimension+1); std::vector<size_type> marks(dimension+1);
for ( i=0; i<=dimension; ++i) for ( i=0; i<=dimension; ++i)
marks[i] = MARK_ERROR; marks[i] = INVALID_MARK;
Helper::template Helper::template
Foreach_enabled_attributes<Reserve_mark_functor<Self> >:: Foreach_enabled_attributes<Reserve_mark_functor<Self> >::
@ -1105,7 +1092,7 @@ namespace CGAL {
if ( !valid ) if ( !valid )
{ // We continue the traversal to mark all the darts. { // We continue the traversal to mark all the darts.
for ( i=0; i<=dimension; ++i) for ( i=0; i<=dimension; ++i)
if (marks[i]!=MARK_ERROR) mark(it,marks[i]); if (marks[i]!=INVALID_MARK) mark(it,marks[i]);
} }
else else
{ {
@ -1178,7 +1165,7 @@ namespace CGAL {
} }
} }
for ( i=0; i<=dimension; ++i) for ( i=0; i<=dimension; ++i)
if ( marks[i]!=MARK_ERROR ) if ( marks[i]!=INVALID_MARK )
{ {
CGAL_assertion( is_whole_map_marked(marks[i]) ); CGAL_assertion( is_whole_map_marked(marks[i]) );
free_mark(marks[i]); free_mark(marks[i]);
@ -1192,7 +1179,7 @@ namespace CGAL {
{ {
std::vector<size_type> marks(dimension+1); std::vector<size_type> marks(dimension+1);
for ( unsigned int i=0; i<=dimension; ++i) for ( unsigned int i=0; i<=dimension; ++i)
marks[i] = MARK_ERROR; marks[i] = INVALID_MARK;
Helper::template Helper::template
Foreach_enabled_attributes<Reserve_mark_functor<Self> >:: Foreach_enabled_attributes<Reserve_mark_functor<Self> >::
@ -1207,7 +1194,7 @@ namespace CGAL {
} }
for ( unsigned int i=0; i<=dimension; ++i) for ( unsigned int i=0; i<=dimension; ++i)
if ( marks[i]!=MARK_ERROR ) if ( marks[i]!=INVALID_MARK )
{ {
CGAL_assertion( is_whole_map_marked(marks[i]) ); CGAL_assertion( is_whole_map_marked(marks[i]) );
free_mark(marks[i]); free_mark(marks[i]);
@ -1953,18 +1940,7 @@ namespace CGAL {
dartv.push_back(it); dartv.push_back(it);
} }
// size_type mark = get_new_mark(); size_type mark = get_new_mark();
// CGAL_assertion( mark!=-1 );
size_type mark;
try
{
mark = get_new_mark();
}
catch (Exception_mark_is_out_of_border e)
{
std::cerr<<"No more free mark, exit."<<std::endl;
exit(-1);
}
CGAL::CMap_dart_iterator_basic_of_involution<Self, 1> CGAL::CMap_dart_iterator_basic_of_involution<Self, 1>
I1(*this, adart1, mark); I1(*this, adart1, mark);
@ -2035,18 +2011,7 @@ namespace CGAL {
dartv.push_back(it); dartv.push_back(it);
} }
// int mark = get_new_mark(); size_type mark = get_new_mark();
// CGAL_assertion( mark!=-1 );
size_type mark;
try
{
mark = get_new_mark();
}
catch (Exception_mark_is_out_of_border e)
{
std::cerr<<"No more free mark, exit."<<std::endl;
exit(-1);
}
CGAL::CMap_dart_iterator_basic_of_involution<Self, 1> CGAL::CMap_dart_iterator_basic_of_involution<Self, 1>
I1(*this, adart1, mark); I1(*this, adart1, mark);
@ -2102,18 +2067,7 @@ namespace CGAL {
CGAL_assertion( 2<=i && i<=dimension ); CGAL_assertion( 2<=i && i<=dimension );
CGAL_assertion( (is_sewable<i>(adart1,adart2)) ); CGAL_assertion( (is_sewable<i>(adart1,adart2)) );
// int mark=get_new_mark(); size_type mark=get_new_mark();
// CGAL_assertion( mark!=-1 );
size_type mark;
try
{
mark = get_new_mark();
}
catch (Exception_mark_is_out_of_border e)
{
std::cerr<<"No more free mark, exit."<<std::endl;
exit(-1);
}
CGAL::CMap_dart_iterator_basic_of_involution<Self, i> CGAL::CMap_dart_iterator_basic_of_involution<Self, i>
I1(*this, adart1, mark); I1(*this, adart1, mark);
@ -2463,14 +2417,14 @@ namespace CGAL {
for ( unsigned int i=0; i<dimension+2; ++i) for ( unsigned int i=0; i<dimension+2; ++i)
{ {
res[i]=0; res[i]=0;
marks[i]=MARK_ERROR; marks[i]=INVALID_MARK;
} }
// Mark reservation // Mark reservation
for ( unsigned int i=0; i<acells.size(); ++i) for ( unsigned int i=0; i<acells.size(); ++i)
{ {
CGAL_assertion(acells[i]<=dimension+1); CGAL_assertion(acells[i]<=dimension+1);
if ( marks[acells[i]]==MARK_ERROR ) if ( marks[acells[i]]==INVALID_MARK )
{ {
marks[acells[i]] = get_new_mark(); marks[acells[i]] = get_new_mark();
} }
@ -2489,7 +2443,7 @@ namespace CGAL {
} }
// Unmarking darts // Unmarking darts
std::vector<unsigned int> tounmark; std::vector<size_type> tounmark;
for ( unsigned int i=0; i<acells.size(); ++i) for ( unsigned int i=0; i<acells.size(); ++i)
{ {
if ( is_whole_map_marked(marks[acells[i]]) || if ( is_whole_map_marked(marks[acells[i]]) ||
@ -2618,7 +2572,7 @@ namespace CGAL {
<Self, CGAL::CMap_dart_iterator_basic_of_orbit<Self,Beta...>, <Self, CGAL::CMap_dart_iterator_basic_of_orbit<Self,Beta...>,
CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,Beta...> > Base; CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,Beta...> > Base;
Dart_of_orbit_basic_range(Self &amap, Dart_handle adart, size_type amark=MARK_ERROR): Dart_of_orbit_basic_range(Self &amap, Dart_handle adart, size_type amark=INVALID_MARK):
Base(amap, adart, amark) Base(amap, adart, amark)
{} {}
}; };
@ -2633,7 +2587,7 @@ namespace CGAL {
Base; Base;
Dart_of_orbit_basic_const_range(const Self &amap, Dart_const_handle Dart_of_orbit_basic_const_range(const Self &amap, Dart_const_handle
adart, size_type amark=MARK_ERROR): adart, size_type amark=INVALID_MARK):
Base(amap, adart, amark) Base(amap, adart, amark)
{} {}
}; };
@ -2677,12 +2631,12 @@ namespace CGAL {
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template<unsigned int ... Beta> template<unsigned int ... Beta>
Dart_of_orbit_basic_range<Beta...> darts_of_orbit_basic(Dart_handle adart, Dart_of_orbit_basic_range<Beta...> darts_of_orbit_basic(Dart_handle adart,
size_type amark=MARK_ERROR) size_type amark=INVALID_MARK)
{ return Dart_of_orbit_basic_range<Beta...>(*this,adart,amark); } { return Dart_of_orbit_basic_range<Beta...>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template<unsigned int ... Beta> template<unsigned int ... Beta>
Dart_of_orbit_basic_const_range<Beta...> Dart_of_orbit_basic_const_range<Beta...>
darts_of_orbit_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return Dart_of_orbit_basic_const_range<Beta...>(*this,adart,amark); } { return Dart_of_orbit_basic_const_range<Beta...>(*this,adart,amark); }
//************************************************************************** //**************************************************************************
#else #else
@ -2703,7 +2657,7 @@ namespace CGAL {
B6,B7,B8,B9> > Base; B6,B7,B8,B9> > Base;
Dart_of_orbit_basic_range(Self &amap, Dart_handle adart, Dart_of_orbit_basic_range(Self &amap, Dart_handle adart,
size_type /*amark*/=MARK_ERROR): size_type /*amark*/=INVALID_MARK):
Base(amap, adart) Base(amap, adart)
{} {}
}; };
@ -2721,7 +2675,7 @@ namespace CGAL {
<Self,B1,B2,B3,B4,B5,B6,B7,B8,B9> > Base; <Self,B1,B2,B3,B4,B5,B6,B7,B8,B9> > Base;
Dart_of_orbit_basic_const_range(const Self &amap, Dart_of_orbit_basic_const_range(const Self &amap,
Dart_const_handle adart, size_type amark=MARK_ERROR): Dart_const_handle adart, size_type amark=INVALID_MARK):
Base(amap, adart, amark) Base(amap, adart, amark)
{} {}
}; };
@ -2867,104 +2821,104 @@ namespace CGAL {
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// Basic versions // Basic versions
Dart_of_orbit_basic_range<> darts_of_orbit_basic(Dart_handle adart, Dart_of_orbit_basic_range<> darts_of_orbit_basic(Dart_handle adart,
size_type amark=MARK_ERROR) size_type amark=INVALID_MARK)
{ return Dart_of_orbit_basic_range<>(*this,adart,amark); } { return Dart_of_orbit_basic_range<>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
Dart_of_orbit_basic_const_range<> darts_of_orbit_basic Dart_of_orbit_basic_const_range<> darts_of_orbit_basic
(Dart_const_handle adart,size_type amark=MARK_ERROR) const (Dart_const_handle adart,size_type amark=INVALID_MARK) const
{ return Dart_of_orbit_basic_const_range<>(*this,adart,amark); } { return Dart_of_orbit_basic_const_range<>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1> template <unsigned int B1>
Dart_of_orbit_basic_range<B1> darts_of_orbit_basic(Dart_handle adart, Dart_of_orbit_basic_range<B1> darts_of_orbit_basic(Dart_handle adart,
size_type amark=MARK_ERROR) size_type amark=INVALID_MARK)
{ return Dart_of_orbit_basic_range<B1>(*this,adart,amark); } { return Dart_of_orbit_basic_range<B1>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1> template <unsigned int B1>
Dart_of_orbit_basic_const_range<B1> darts_of_orbit_basic Dart_of_orbit_basic_const_range<B1> darts_of_orbit_basic
(Dart_const_handle adart, size_type amark=MARK_ERROR) const (Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return Dart_of_orbit_basic_const_range<B1>(*this,adart,amark); } { return Dart_of_orbit_basic_const_range<B1>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1,unsigned int B2> template <unsigned int B1,unsigned int B2>
Dart_of_orbit_basic_range<B1,B2> darts_of_orbit_basic(Dart_handle adart, Dart_of_orbit_basic_range<B1,B2> darts_of_orbit_basic(Dart_handle adart,
size_type amark=MARK_ERROR) size_type amark=INVALID_MARK)
{ return Dart_of_orbit_basic_range<B1,B2>(*this,adart,amark); } { return Dart_of_orbit_basic_range<B1,B2>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1,unsigned int B2> template <unsigned int B1,unsigned int B2>
Dart_of_orbit_basic_const_range<B1,B2> darts_of_orbit_basic Dart_of_orbit_basic_const_range<B1,B2> darts_of_orbit_basic
(Dart_const_handle adart, size_type amark=MARK_ERROR) const (Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return Dart_of_orbit_basic_const_range<B1,B2>(*this,adart,amark); } { return Dart_of_orbit_basic_const_range<B1,B2>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1,unsigned int B2,unsigned int B3> template <unsigned int B1,unsigned int B2,unsigned int B3>
Dart_of_orbit_basic_range<B1,B2,B3> darts_of_orbit_basic(Dart_handle adart, Dart_of_orbit_basic_range<B1,B2,B3> darts_of_orbit_basic(Dart_handle adart,
size_type amark=MARK_ERROR) size_type amark=INVALID_MARK)
{ return Dart_of_orbit_basic_range<B1,B2,B3>(*this,adart,amark); } { return Dart_of_orbit_basic_range<B1,B2,B3>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1,unsigned int B2,unsigned int B3> template <unsigned int B1,unsigned int B2,unsigned int B3>
Dart_of_orbit_basic_const_range<B1,B2,B3> darts_of_orbit_basic Dart_of_orbit_basic_const_range<B1,B2,B3> darts_of_orbit_basic
(Dart_const_handle adart, size_type amark=MARK_ERROR) const (Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return Dart_of_orbit_basic_const_range<B1,B2,B3>(*this,adart,amark); } { return Dart_of_orbit_basic_const_range<B1,B2,B3>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4> template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4>
Dart_of_orbit_basic_range<B1,B2,B3,B4> darts_of_orbit_basic Dart_of_orbit_basic_range<B1,B2,B3,B4> darts_of_orbit_basic
(Dart_handle adart, size_type amark=MARK_ERROR) (Dart_handle adart, size_type amark=INVALID_MARK)
{ return Dart_of_orbit_basic_range<B1,B2,B3,B4>(*this,adart,amark); } { return Dart_of_orbit_basic_range<B1,B2,B3,B4>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4> template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4>
Dart_of_orbit_basic_const_range<B1,B2,B3,B4> Dart_of_orbit_basic_const_range<B1,B2,B3,B4>
darts_of_orbit_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return Dart_of_orbit_basic_const_range<B1,B2,B3,B4>(*this,adart,amark); } { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4, template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
unsigned int B5> unsigned int B5>
Dart_of_orbit_basic_range<B1,B2,B3,B4,B5> darts_of_orbit_basic Dart_of_orbit_basic_range<B1,B2,B3,B4,B5> darts_of_orbit_basic
(Dart_handle adart, size_type amark=MARK_ERROR) (Dart_handle adart, size_type amark=INVALID_MARK)
{ return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5>(*this,adart,amark); } { return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4, template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
unsigned int B5> unsigned int B5>
Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5> Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5>
darts_of_orbit_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5> { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5>
(*this,adart,amark); } (*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4, template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
unsigned int B5,unsigned int B6> unsigned int B5,unsigned int B6>
Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6> darts_of_orbit_basic Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6> darts_of_orbit_basic
(Dart_handle adart, size_type amark=MARK_ERROR) (Dart_handle adart, size_type amark=INVALID_MARK)
{ return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6>(*this,adart,amark); } { return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4, template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
unsigned int B5,unsigned int B6> unsigned int B5,unsigned int B6>
Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6> Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6>
darts_of_orbit_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6> { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6>
(*this,adart,amark); } (*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4, template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
unsigned int B5,unsigned int B6,unsigned int B7> unsigned int B5,unsigned int B6,unsigned int B7>
Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7> darts_of_orbit_basic Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7> darts_of_orbit_basic
(Dart_handle adart, size_type amark=MARK_ERROR) (Dart_handle adart, size_type amark=INVALID_MARK)
{ return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7> { return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7>
(*this,adart,amark); } (*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4, template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
unsigned int B5,unsigned int B6,unsigned int B7> unsigned int B5,unsigned int B6,unsigned int B7>
Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7> Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7>
darts_of_orbit_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7> { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7>
(*this,adart,amark); } (*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4, template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8> unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8>
Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8> darts_of_orbit Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8> darts_of_orbit
(Dart_handle adart, size_type amark=MARK_ERROR) (Dart_handle adart, size_type amark=INVALID_MARK)
{ return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8> { return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8>
(*this,adart,amark); } (*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4, template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8> unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8>
Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8> Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8>
darts_of_orbit_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8> { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8>
(*this,adart,amark); } (*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
@ -2972,7 +2926,7 @@ namespace CGAL {
unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8, unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8,
unsigned int B9> unsigned int B9>
Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8,B9> Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
darts_of_orbit_basic(Dart_handle adart, size_type amark=MARK_ERROR) darts_of_orbit_basic(Dart_handle adart, size_type amark=INVALID_MARK)
{ return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8,B9> { return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
(*this,adart,amark); } (*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
@ -2980,7 +2934,7 @@ namespace CGAL {
unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8, unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8,
unsigned int B9> unsigned int B9>
Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8,B9> Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
darts_of_orbit_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8,B9> { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
(*this,adart,amark); } (*this,adart,amark); }
//************************************************************************** //**************************************************************************
@ -2996,7 +2950,7 @@ namespace CGAL {
<Self, CGAL::CMap_dart_iterator_basic_of_cell<Self,i,dim>, <Self, CGAL::CMap_dart_iterator_basic_of_cell<Self,i,dim>,
CGAL::CMap_dart_const_iterator_basic_of_cell<Self,i,dim> > Base; CGAL::CMap_dart_const_iterator_basic_of_cell<Self,i,dim> > Base;
Dart_of_cell_basic_range(Self &amap, Dart_handle adart, size_type amark=MARK_ERROR) : Dart_of_cell_basic_range(Self &amap, Dart_handle adart, size_type amark=INVALID_MARK) :
Base(amap, adart, amark) Base(amap, adart, amark)
{} {}
}; };
@ -3010,7 +2964,7 @@ namespace CGAL {
<Self, CGAL::CMap_dart_const_iterator_basic_of_cell<Self,i,dim> > Base; <Self, CGAL::CMap_dart_const_iterator_basic_of_cell<Self,i,dim> > Base;
Dart_of_cell_basic_const_range(const Self &amap, Dart_const_handle adart, Dart_of_cell_basic_const_range(const Self &amap, Dart_const_handle adart,
size_type amark=MARK_ERROR) : size_type amark=INVALID_MARK) :
Base(amap, adart, amark) Base(amap, adart, amark)
{} {}
}; };
@ -3046,22 +3000,22 @@ namespace CGAL {
/// @return a range on all the darts of the given i-cell /// @return a range on all the darts of the given i-cell
template<unsigned int i, int dim> template<unsigned int i, int dim>
Dart_of_cell_basic_range<i,dim> darts_of_cell_basic(Dart_handle adart, Dart_of_cell_basic_range<i,dim> darts_of_cell_basic(Dart_handle adart,
size_type amark=MARK_ERROR) size_type amark=INVALID_MARK)
{ return Dart_of_cell_basic_range<i,dim>(*this,adart,amark); } { return Dart_of_cell_basic_range<i,dim>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template<unsigned int i, int dim> template<unsigned int i, int dim>
Dart_of_cell_basic_const_range<i,dim> darts_of_cell_basic Dart_of_cell_basic_const_range<i,dim> darts_of_cell_basic
(Dart_const_handle adart, size_type amark=MARK_ERROR) const (Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return Dart_of_cell_basic_const_range<i,dim>(*this,adart,amark); } { return Dart_of_cell_basic_const_range<i,dim>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template<unsigned int i> template<unsigned int i>
Dart_of_cell_basic_range<i,Self::dimension> Dart_of_cell_basic_range<i,Self::dimension>
darts_of_cell_basic(Dart_handle adart, size_type amark=MARK_ERROR) darts_of_cell_basic(Dart_handle adart, size_type amark=INVALID_MARK)
{ return darts_of_cell_basic<i,Self::dimension>(adart,amark); } { return darts_of_cell_basic<i,Self::dimension>(adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template<unsigned int i> template<unsigned int i>
Dart_of_cell_basic_const_range<i,Self::dimension> Dart_of_cell_basic_const_range<i,Self::dimension>
darts_of_cell_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const darts_of_cell_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return darts_of_cell_basic<i,Self::dimension>(adart,amark); } { return darts_of_cell_basic<i,Self::dimension>(adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template<unsigned int i, int dim> template<unsigned int i, int dim>
@ -3092,7 +3046,7 @@ namespace CGAL {
CGAL::CMap_dart_const_iterator_basic_of_involution<Self,i,dim> > Base; CGAL::CMap_dart_const_iterator_basic_of_involution<Self,i,dim> > Base;
Dart_of_involution_basic_range(Self &amap, Dart_handle adart, Dart_of_involution_basic_range(Self &amap, Dart_handle adart,
size_type amark=MARK_ERROR): size_type amark=INVALID_MARK):
Base(amap, adart, amark) Base(amap, adart, amark)
{} {}
}; };
@ -3108,30 +3062,30 @@ namespace CGAL {
Dart_of_involution_basic_const_range(const Self &amap, Dart_of_involution_basic_const_range(const Self &amap,
Dart_const_handle adart, Dart_const_handle adart,
size_type amark=MARK_ERROR) : size_type amark=INVALID_MARK) :
Base(amap, adart, amark) Base(amap, adart, amark)
{} {}
}; };
//************************************************************************** //**************************************************************************
template<unsigned int i,int dim> template<unsigned int i,int dim>
Dart_of_involution_basic_range<i,dim> Dart_of_involution_basic_range<i,dim>
darts_of_involution_basic(Dart_handle adart, size_type amark=MARK_ERROR) darts_of_involution_basic(Dart_handle adart, size_type amark=INVALID_MARK)
{ return Dart_of_involution_basic_range<i,dim>(*this,adart,amark); } { return Dart_of_involution_basic_range<i,dim>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template<unsigned int i,int dim> template<unsigned int i,int dim>
Dart_of_involution_basic_const_range<i,dim> Dart_of_involution_basic_const_range<i,dim>
darts_of_involution_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const darts_of_involution_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return Dart_of_involution_basic_const_range<i,dim>(*this,adart,amark); } { return Dart_of_involution_basic_const_range<i,dim>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template<unsigned int i> template<unsigned int i>
Dart_of_involution_basic_range<i,Self::dimension> Dart_of_involution_basic_range<i,Self::dimension>
darts_of_involution_basic(Dart_handle adart, size_type amark=MARK_ERROR) darts_of_involution_basic(Dart_handle adart, size_type amark=INVALID_MARK)
{ return Dart_of_involution_basic_range<i,Self::dimension> { return Dart_of_involution_basic_range<i,Self::dimension>
(*this,adart,amark); } (*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template<unsigned int i> template<unsigned int i>
Dart_of_involution_basic_const_range<i,Self::dimension> Dart_of_involution_basic_const_range<i,Self::dimension>
darts_of_involution_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const darts_of_involution_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return Dart_of_involution_basic_const_range<i,Self::dimension> { return Dart_of_involution_basic_const_range<i,Self::dimension>
(*this,adart,amark); } (*this,adart,amark); }
//************************************************************************** //**************************************************************************
@ -3147,7 +3101,7 @@ namespace CGAL {
Base; Base;
Dart_of_involution_inv_basic_range(Self &amap, Dart_handle adart, Dart_of_involution_inv_basic_range(Self &amap, Dart_handle adart,
size_type amark=MARK_ERROR): size_type amark=INVALID_MARK):
Base(amap, adart, amark) Base(amap, adart, amark)
{} {}
}; };
@ -3164,31 +3118,31 @@ namespace CGAL {
Dart_of_involution_inv_basic_const_range(const Self &amap, Dart_of_involution_inv_basic_const_range(const Self &amap,
Dart_const_handle adart, Dart_const_handle adart,
size_type amark=MARK_ERROR) : size_type amark=INVALID_MARK) :
Base(amap, adart, amark) Base(amap, adart, amark)
{} {}
}; };
//************************************************************************** //**************************************************************************
template<unsigned int i,int dim> template<unsigned int i,int dim>
Dart_of_involution_inv_basic_range<i,dim> Dart_of_involution_inv_basic_range<i,dim>
darts_of_involution_inv_basic(Dart_handle adart, size_type amark=MARK_ERROR) darts_of_involution_inv_basic(Dart_handle adart, size_type amark=INVALID_MARK)
{ return Dart_of_involution_inv_basic_range<i,dim>(*this,adart,amark); } { return Dart_of_involution_inv_basic_range<i,dim>(*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template<unsigned int i,int dim> template<unsigned int i,int dim>
Dart_of_involution_inv_basic_const_range<i,dim> Dart_of_involution_inv_basic_const_range<i,dim>
darts_of_involution_inv_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const darts_of_involution_inv_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return Dart_of_involution_inv_basic_const_range<i,dim> { return Dart_of_involution_inv_basic_const_range<i,dim>
(*this,adart,amark); } (*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template<unsigned int i> template<unsigned int i>
Dart_of_involution_inv_basic_range<i,Self::dimension> Dart_of_involution_inv_basic_range<i,Self::dimension>
darts_of_involution_inv_basic(Dart_handle adart, size_type amark=MARK_ERROR) darts_of_involution_inv_basic(Dart_handle adart, size_type amark=INVALID_MARK)
{ return Dart_of_involution_inv_basic_range<i,Self::dimension> { return Dart_of_involution_inv_basic_range<i,Self::dimension>
(*this,adart,amark); } (*this,adart,amark); }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
template<unsigned int i> template<unsigned int i>
Dart_of_involution_inv_basic_const_range<i,Self::dimension> Dart_of_involution_inv_basic_const_range<i,Self::dimension>
darts_of_involution_inv_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const darts_of_involution_inv_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
{ return Dart_of_involution_inv_basic_const_range<i,Self::dimension> { return Dart_of_involution_inv_basic_const_range<i,Self::dimension>
(*this,adart,amark); } (*this,adart,amark); }
//************************************************************************** //**************************************************************************

View File

@ -270,25 +270,8 @@ namespace CGAL
typename Map::size_type nbIncident = 0; typename Map::size_type nbIncident = 0;
typename Map::size_type mark; typename Map::size_type mark;
typename Map::size_type treated; typename Map::size_type treated;
// CGAL_assume(mark != -1); CGAL_assume( treated != -1); mark = amap.get_new_mark();
try treated = amap.get_new_mark();
{
mark = amap.get_new_mark();
}
catch (typename Map::Exception_mark_is_out_of_border e)
{
std::cerr<<"No more free mark, exit."<<std::endl;
exit(-1);
}
try
{
treated = amap.get_new_mark();
}
catch (typename Map::Exception_mark_is_out_of_border e)
{
std::cerr<<"No more free mark, exit."<<std::endl;
exit(-1);
}
typename Map::template typename Map::template
Dart_of_cell_basic_range<i>::const_iterator it(amap, adart, mark); Dart_of_cell_basic_range<i>::const_iterator it(amap, adart, mark);
@ -336,25 +319,8 @@ namespace CGAL
typename Map::size_type nbIncident = 0; typename Map::size_type nbIncident = 0;
typename Map::size_type mark; typename Map::size_type mark;
typename Map::size_type treated; typename Map::size_type treated;
// CGAL_assume(mark != -1); CGAL_assume( treated != -1); mark = amap.get_new_mark();
try treated = amap.get_new_mark();
{
mark = amap.get_new_mark();
}
catch (typename Map::Exception_mark_is_out_of_border e)
{
std::cerr<<"No more free mark, exit."<<std::endl;
exit(-1);
}
try
{
treated = amap.get_new_mark();
}
catch (typename Map::Exception_mark_is_out_of_border e)
{
std::cerr<<"No more free mark, exit."<<std::endl;
exit(-1);
}
typename Map::template typename Map::template
Dart_of_cell_basic_range<i>::const_iterator it(amap, adart, mark); Dart_of_cell_basic_range<i>::const_iterator it(amap, adart, mark);

View File

@ -230,7 +230,7 @@ namespace CGAL {
/// Rewind of the iterator to its beginning. /// Rewind of the iterator to its beginning.
void rewind() void rewind()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
Base::operator= ( Base(*this->mmap,minitial_dart) ); Base::operator= ( Base(*this->mmap,minitial_dart) );
mto_treat = std::queue<Dart_handle>(); mto_treat = std::queue<Dart_handle>();
this->mmap->mark(minitial_dart, mmark_number); this->mmap->mark(minitial_dart, mmark_number);
@ -246,7 +246,7 @@ namespace CGAL {
/// Prefix ++ operator. /// Prefix ++ operator.
Self& operator++() Self& operator++()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
CGAL_assertion(this->cont()); CGAL_assertion(this->cont());
do do
@ -342,7 +342,7 @@ namespace CGAL {
/// Rewind of the iterator to its beginning. /// Rewind of the iterator to its beginning.
void rewind() void rewind()
{ {
CGAL_assertion(this->mmark_number != Map::MARK_ERROR); CGAL_assertion(this->mmark_number != Map::INVALID_MARK);
Base::rewind(); Base::rewind();
if ( !this->mmap->is_free(this->minitial_dart, Bi) && if ( !this->mmap->is_free(this->minitial_dart, Bi) &&
this->mmap->beta(this->minitial_dart, Bi)!=this->minitial_dart ) this->mmap->beta(this->minitial_dart, Bi)!=this->minitial_dart )
@ -412,12 +412,12 @@ namespace CGAL {
/// Destructor. /// Destructor.
~CMap_non_basic_iterator() ~CMap_non_basic_iterator()
{ {
CGAL_assertion( this->mmark_number!=Map::MARK_ERROR ); CGAL_assertion( this->mmark_number!=Map::INVALID_MARK );
if (this->mmap->get_number_of_times_mark_reserved if (this->mmap->get_number_of_times_mark_reserved
(this->mmark_number)==1) (this->mmark_number)==1)
unmark_treated_darts(); unmark_treated_darts();
this->mmap->free_mark(this->mmark_number); this->mmap->free_mark(this->mmark_number);
this->mmark_number = Map::MARK_ERROR; // To avoid basic class to try to unmark darts. this->mmark_number = Map::INVALID_MARK; // To avoid basic class to try to unmark darts.
} }
/// Copy constructor. /// Copy constructor.
@ -434,7 +434,7 @@ namespace CGAL {
(this->mmark_number)==1) (this->mmark_number)==1)
unmark_treated_darts(); unmark_treated_darts();
this->mmap->free_mark(this->mmark_number); this->mmap->free_mark(this->mmark_number);
this->mmark_number = Map::MARK_ERROR; this->mmark_number = Map::INVALID_MARK;
Base::operator=(aiterator); Base::operator=(aiterator);
this->mmap->share_a_mark(this->mmark_number); this->mmap->share_a_mark(this->mmark_number);
@ -533,7 +533,7 @@ namespace CGAL {
typedef typename Map_::size_type size_type; typedef typename Map_::size_type size_type;
CMap_range(Map_ &amap, typename Map_::Dart_handle adart, size_type amark=Map_::MARK_ERROR): CMap_range(Map_ &amap, typename Map_::Dart_handle adart, size_type amark=Map_::INVALID_MARK):
mmap(amap), mdart(adart), msize(0), mmark(amark) mmap(amap), mdart(adart), msize(0), mmark(amark)
{} {}
iterator begin() { return iterator(mmap,mdart,mmark); } iterator begin() { return iterator(mmap,mdart,mmark); }
@ -588,7 +588,7 @@ namespace CGAL {
typedef Const_it const_iterator; typedef Const_it const_iterator;
typedef typename Map_::size_type size_type; typedef typename Map_::size_type size_type;
CMap_const_range(const Map_ &amap, typename Map_::Dart_const_handle adart, CMap_const_range(const Map_ &amap, typename Map_::Dart_const_handle adart,
size_type amark=Map_::MARK_ERROR): size_type amark=Map_::INVALID_MARK):
mmap(amap), mdart(adart), msize(0), mmark(amark) mmap(amap), mdart(adart), msize(0), mmark(amark)
{} {}
const_iterator begin() const { return const_iterator(mmap,mdart,mmark); } const_iterator begin() const { return const_iterator(mmap,mdart,mmark); }
@ -607,7 +607,7 @@ namespace CGAL {
const Map_ & mmap; const Map_ & mmap;
typename Map_::Dart_const_handle mdart; typename Map_::Dart_const_handle mdart;
mutable typename Map_::size_type msize; mutable typename Map_::size_type msize;
int mmark; size_type mmark;
}; };
//**************************************************************************** //****************************************************************************
} // namespace CGAL } // namespace CGAL

View File

@ -356,7 +356,6 @@ namespace CGAL
typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle; typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
typename CMap::size_type mark = amap.get_new_mark(); typename CMap::size_type mark = amap.get_new_mark();
// int mark_modified_darts = amap.get_new_mark();
// First we store and mark all the darts of the 0-cell to remove. // First we store and mark all the darts of the 0-cell to remove.
std::deque<typename CMap::Dart_handle> to_erase; std::deque<typename CMap::Dart_handle> to_erase;
@ -700,7 +699,6 @@ namespace CGAL
typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle; typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
typename CMap::size_type mark = amap.get_new_mark(); typename CMap::size_type mark = amap.get_new_mark();
// int mark_modified_darts = amap.get_new_mark();
// First we store and mark all the darts of the 1-cell to contract. // First we store and mark all the darts of the 1-cell to contract.
std::deque<typename CMap::Dart_handle> to_erase; std::deque<typename CMap::Dart_handle> to_erase;

View File

@ -1203,7 +1203,7 @@ namespace CGAL {
/// Rewind of the iterator to its beginning. /// Rewind of the iterator to its beginning.
void rewind() void rewind()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
Base::rewind(); Base::rewind();
mto_treat = std::queue<Dart_handle>(); mto_treat = std::queue<Dart_handle>();
this->mmap->mark(*this, mmark_number); this->mmap->mark(*this, mmark_number);
@ -1213,7 +1213,7 @@ namespace CGAL {
/// Prefix ++ operator. /// Prefix ++ operator.
Self& operator++() Self& operator++()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
CGAL_assertion(this->cont()); CGAL_assertion(this->cont());
Dart_handle nd = this->mmap->null_handle; Dart_handle nd = this->mmap->null_handle;
@ -1315,7 +1315,7 @@ namespace CGAL {
/// Rewind of the iterator to its beginning. /// Rewind of the iterator to its beginning.
void rewind() void rewind()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
Base::rewind(); Base::rewind();
mto_treat = std::queue<Dart_handle>(); mto_treat = std::queue<Dart_handle>();
this->mmap->mark((*this), mmark_number); this->mmap->mark((*this), mmark_number);
@ -1325,7 +1325,7 @@ namespace CGAL {
/// Prefix ++ operator. /// Prefix ++ operator.
Self& operator++() Self& operator++()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
CGAL_assertion(this->cont()); CGAL_assertion(this->cont());
Dart_handle nd = this->mmap->null_handle; Dart_handle nd = this->mmap->null_handle;
@ -1411,7 +1411,7 @@ namespace CGAL {
/// Rewind of the iterator to its beginning. /// Rewind of the iterator to its beginning.
void rewind() void rewind()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
Base::rewind(); Base::rewind();
mto_treat = std::queue<Dart_handle>(); mto_treat = std::queue<Dart_handle>();
this->mmap->mark((*this), mmark_number); this->mmap->mark((*this), mmark_number);
@ -1421,7 +1421,7 @@ namespace CGAL {
/// Prefix ++ operator. /// Prefix ++ operator.
Self& operator++() Self& operator++()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
CGAL_assertion(this->cont()); CGAL_assertion(this->cont());
Dart_handle nd = this->mmap->null_handle; Dart_handle nd = this->mmap->null_handle;
@ -1939,7 +1939,7 @@ namespace CGAL {
/// Rewind of the iterator to its beginning. /// Rewind of the iterator to its beginning.
void rewind() void rewind()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
Base::rewind(); Base::rewind();
mto_treat = std::queue<Dart_handle>(); mto_treat = std::queue<Dart_handle>();
this->mmap->mark((*this), mmark_number); this->mmap->mark((*this), mmark_number);
@ -1949,7 +1949,7 @@ namespace CGAL {
/// Prefix ++ operator. /// Prefix ++ operator.
Self& operator++() Self& operator++()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
CGAL_assertion(this->cont()); CGAL_assertion(this->cont());
Dart_handle nd = this->mmap->null_handle; Dart_handle nd = this->mmap->null_handle;
@ -2061,7 +2061,7 @@ namespace CGAL {
/// Rewind of the iterator to its beginning. /// Rewind of the iterator to its beginning.
void rewind() void rewind()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
Base::rewind(); Base::rewind();
mto_treat = std::queue<Dart_handle>(); mto_treat = std::queue<Dart_handle>();
this->mmap->mark((*this), mmark_number); this->mmap->mark((*this), mmark_number);
@ -2071,7 +2071,7 @@ namespace CGAL {
/// Prefix ++ operator. /// Prefix ++ operator.
Self& operator++() Self& operator++()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
CGAL_assertion(this->cont()); CGAL_assertion(this->cont());
Dart_handle nd = this->mmap->null_handle; Dart_handle nd = this->mmap->null_handle;
@ -2178,7 +2178,7 @@ namespace CGAL {
/// Rewind of the iterator to its beginning. /// Rewind of the iterator to its beginning.
void rewind() void rewind()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
Base::rewind(); Base::rewind();
mto_treat = std::queue<Dart_handle>(); mto_treat = std::queue<Dart_handle>();
this->mmap->mark_null_dart(mmark_number); this->mmap->mark_null_dart(mmark_number);
@ -2188,7 +2188,7 @@ namespace CGAL {
/// Prefix ++ operator. /// Prefix ++ operator.
Self& operator++() Self& operator++()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
CGAL_assertion(this->cont()); CGAL_assertion(this->cont());
Dart_handle nd = this->mmap->null_handle; Dart_handle nd = this->mmap->null_handle;
@ -2305,7 +2305,7 @@ namespace CGAL {
/// Rewind of the iterator to its beginning. /// Rewind of the iterator to its beginning.
void rewind() void rewind()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
Base::rewind(); Base::rewind();
mto_treat = std::queue<Dart_handle>(); mto_treat = std::queue<Dart_handle>();
this->mmap->mark((*this), mmark_number); this->mmap->mark((*this), mmark_number);
@ -2315,7 +2315,7 @@ namespace CGAL {
/// Prefix ++ operator. /// Prefix ++ operator.
Self& operator++() Self& operator++()
{ {
CGAL_assertion(mmark_number != Map::MARK_ERROR); CGAL_assertion(mmark_number != Map::INVALID_MARK);
CGAL_assertion(this->cont()); CGAL_assertion(this->cont());
Dart_handle nd = this->mmap->null_handle; Dart_handle nd = this->mmap->null_handle;

View File

@ -580,7 +580,7 @@ struct Test_split_attribute_functor_run
static void run( CMap* amap, static void run( CMap* amap,
const std::deque<typename CMap::Dart_handle> const std::deque<typename CMap::Dart_handle>
&modified_darts, &modified_darts,
typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR) typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
{ {
CGAL_static_assertion( 1<=i && i<=CMap::dimension ); CGAL_static_assertion( 1<=i && i<=CMap::dimension );
CGAL_assertion( i!=j ); CGAL_assertion( i!=j );
@ -609,7 +609,7 @@ struct Test_split_attribute_functor_run
amap->negate_mark(mark); amap->negate_mark(mark);
for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it ) for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
{ {
if ( mark_modified_darts!=CMap::MARK_ERROR ) if ( mark_modified_darts!=CMap::INVALID_MARK )
amap->unmark(*it, mark_modified_darts); amap->unmark(*it, mark_modified_darts);
if ( !amap->is_marked(*it, mark) ) if ( !amap->is_marked(*it, mark) )
@ -624,7 +624,7 @@ struct Test_split_attribute_functor_run
&modified_darts, &modified_darts,
const std::deque<typename CMap::Dart_handle> const std::deque<typename CMap::Dart_handle>
&modified_darts2, &modified_darts2,
typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR) typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
{ {
CGAL_static_assertion( 1<=i && i<=CMap::dimension ); CGAL_static_assertion( 1<=i && i<=CMap::dimension );
CGAL_assertion( i!=j ); CGAL_assertion( i!=j );
@ -660,7 +660,7 @@ struct Test_split_attribute_functor_run
amap->negate_mark(mark); amap->negate_mark(mark);
for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it ) for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
{ {
if ( mark_modified_darts!=CMap::MARK_ERROR ) if ( mark_modified_darts!=CMap::INVALID_MARK )
amap->unmark(*it, mark_modified_darts); amap->unmark(*it, mark_modified_darts);
if ( !amap->is_marked(*it, mark) ) if ( !amap->is_marked(*it, mark) )
@ -668,7 +668,7 @@ struct Test_split_attribute_functor_run
} }
for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 ) for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 )
{ {
if ( mark_modified_darts!=CMap::MARK_ERROR ) if ( mark_modified_darts!=CMap::INVALID_MARK )
amap->unmark(*it2, mark_modified_darts); amap->unmark(*it2, mark_modified_darts);
if ( !amap->is_marked(*it2, mark) ) if ( !amap->is_marked(*it2, mark) )
@ -686,7 +686,7 @@ struct Test_split_attribute_functor_run<CMap, 0, j, T>
static void run( CMap* amap, static void run( CMap* amap,
const std::deque<typename CMap::Dart_handle> const std::deque<typename CMap::Dart_handle>
&modified_darts, &modified_darts,
typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR) typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
{ {
CGAL_assertion( j!=0 && j!=1 ); CGAL_assertion( j!=0 && j!=1 );
CGAL_assertion( amap!=NULL ); CGAL_assertion( amap!=NULL );
@ -720,7 +720,7 @@ struct Test_split_attribute_functor_run<CMap, 0, j, T>
amap->negate_mark(mark); amap->negate_mark(mark);
for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it ) for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
{ {
if ( mark_modified_darts!=CMap::MARK_ERROR ) if ( mark_modified_darts!=CMap::INVALID_MARK )
amap->unmark(*it, mark_modified_darts); amap->unmark(*it, mark_modified_darts);
if ( !amap->is_marked(*it, mark) ) if ( !amap->is_marked(*it, mark) )
@ -739,7 +739,7 @@ struct Test_split_attribute_functor_run<CMap, 0, j, T>
&modified_darts, &modified_darts,
const std::deque<typename CMap::Dart_handle> const std::deque<typename CMap::Dart_handle>
&modified_darts2, &modified_darts2,
typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR) typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
{ {
CGAL_assertion( j!=0 && j!=1 ); CGAL_assertion( j!=0 && j!=1 );
CGAL_assertion( amap!=NULL ); CGAL_assertion( amap!=NULL );
@ -785,7 +785,7 @@ struct Test_split_attribute_functor_run<CMap, 0, j, T>
amap->negate_mark(mark); amap->negate_mark(mark);
for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it ) for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
{ {
if ( mark_modified_darts!=CMap::MARK_ERROR ) if ( mark_modified_darts!=CMap::INVALID_MARK )
amap->unmark(*it, mark_modified_darts); amap->unmark(*it, mark_modified_darts);
if ( !amap->is_marked(*it, mark) ) if ( !amap->is_marked(*it, mark) )
@ -797,7 +797,7 @@ struct Test_split_attribute_functor_run<CMap, 0, j, T>
} }
for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 ) for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 )
{ {
if ( mark_modified_darts!=CMap::MARK_ERROR ) if ( mark_modified_darts!=CMap::INVALID_MARK )
amap->unmark(*it2, mark_modified_darts); amap->unmark(*it2, mark_modified_darts);
if ( !amap->is_marked(*it2, mark) ) if ( !amap->is_marked(*it2, mark) )
@ -820,14 +820,14 @@ template<typename CMap, typename T>
struct Test_split_attribute_functor_run<CMap, 0, 0, T> struct Test_split_attribute_functor_run<CMap, 0, 0, T>
{ {
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&, static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
typename CMap::size_type =CMap::MARK_ERROR) typename CMap::size_type =CMap::INVALID_MARK)
{ CGAL_assertion(false); } { CGAL_assertion(false); }
static void run( CMap* amap, static void run( CMap* amap,
const std::deque<typename CMap::Dart_handle> const std::deque<typename CMap::Dart_handle>
&modified_darts, &modified_darts,
const std::deque<typename CMap::Dart_handle> const std::deque<typename CMap::Dart_handle>
&modified_darts2, &modified_darts2,
typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR) typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
{ {
CGAL_assertion( amap!=NULL ); CGAL_assertion( amap!=NULL );
CGAL_static_assertion_msg(CMap::Helper::template CGAL_static_assertion_msg(CMap::Helper::template
@ -864,7 +864,7 @@ struct Test_split_attribute_functor_run<CMap, 0, 0, T>
amap->negate_mark(mark); amap->negate_mark(mark);
for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it ) for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
{ {
if ( mark_modified_darts!=CMap::MARK_ERROR ) if ( mark_modified_darts!=CMap::INVALID_MARK )
amap->unmark(*it, mark_modified_darts); amap->unmark(*it, mark_modified_darts);
if ( !amap->is_marked(*it, mark) ) if ( !amap->is_marked(*it, mark) )
@ -872,7 +872,7 @@ struct Test_split_attribute_functor_run<CMap, 0, 0, T>
} }
for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 ) for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 )
{ {
if ( mark_modified_darts!=CMap::MARK_ERROR ) if ( mark_modified_darts!=CMap::INVALID_MARK )
amap->unmark(*it2, mark_modified_darts); amap->unmark(*it2, mark_modified_darts);
od=amap->other_extremity(*it2); od=amap->other_extremity(*it2);
@ -890,12 +890,12 @@ template<typename CMap, typename T>
struct Test_split_attribute_functor_run<CMap, 0, 1, T> struct Test_split_attribute_functor_run<CMap, 0, 1, T>
{ {
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&, static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
typename CMap::size_type =CMap::MARK_ERROR) typename CMap::size_type =CMap::INVALID_MARK)
{ CGAL_assertion(false); } { CGAL_assertion(false); }
static void run( CMap* amap, const std::deque<typename CMap::Dart_handle>& static void run( CMap* amap, const std::deque<typename CMap::Dart_handle>&
modified_darts, modified_darts,
const std::deque<typename CMap::Dart_handle>& const std::deque<typename CMap::Dart_handle>&
modified_darts2, typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR) modified_darts2, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
{ CGAL::internal::Test_split_attribute_functor_run<CMap, 0, 0, T>:: { CGAL::internal::Test_split_attribute_functor_run<CMap, 0, 0, T>::
run(amap, modified_darts, modified_darts2, mark_modified_darts); } run(amap, modified_darts, modified_darts2, mark_modified_darts); }
}; };
@ -904,10 +904,10 @@ template<typename CMap, unsigned int i, unsigned int j>
struct Test_split_attribute_functor_run<CMap, i, j, CGAL::Void> struct Test_split_attribute_functor_run<CMap, i, j, CGAL::Void>
{ {
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&, static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
typename CMap::size_type=CMap::MARK_ERROR) typename CMap::size_type=CMap::INVALID_MARK)
{} {}
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&, static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
const std::deque<typename CMap::Dart_handle>&, typename CMap::size_type=CMap::MARK_ERROR) const std::deque<typename CMap::Dart_handle>&, typename CMap::size_type=CMap::INVALID_MARK)
{} {}
}; };
// Specialization for i=j. // Specialization for i=j.
@ -915,10 +915,10 @@ template<typename CMap, unsigned int i, typename T>
struct Test_split_attribute_functor_run<CMap, i, i, T> struct Test_split_attribute_functor_run<CMap, i, i, T>
{ {
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&, static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
typename CMap::size_type=CMap::MARK_ERROR) typename CMap::size_type=CMap::INVALID_MARK)
{} {}
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&, static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
const std::deque<typename CMap::Dart_handle>&, typename CMap::size_type=CMap::MARK_ERROR) const std::deque<typename CMap::Dart_handle>&, typename CMap::size_type=CMap::INVALID_MARK)
{} {}
}; };
// Specialization for i=1 and j=0 (edge attributes are not modified // Specialization for i=1 and j=0 (edge attributes are not modified
@ -927,10 +927,10 @@ template<typename CMap, typename T>
struct Test_split_attribute_functor_run<CMap, 1, 0, T> struct Test_split_attribute_functor_run<CMap, 1, 0, T>
{ {
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&, static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
typename CMap::size_type=CMap::MARK_ERROR) typename CMap::size_type=CMap::INVALID_MARK)
{} {}
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&, static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
const std::deque<typename CMap::Dart_handle>&, typename CMap::size_type=CMap::MARK_ERROR) const std::deque<typename CMap::Dart_handle>&, typename CMap::size_type=CMap::INVALID_MARK)
{} {}
}; };
// ************************************************************************ // ************************************************************************
@ -949,7 +949,7 @@ struct Test_split_attribute_functor
static void run( CMap* amap, static void run( CMap* amap,
const std::deque<typename CMap::Dart_handle> const std::deque<typename CMap::Dart_handle>
&modified_darts, &modified_darts,
typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR) typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
{ {
CGAL::internal::Test_split_attribute_functor_run<CMap, i, j>:: CGAL::internal::Test_split_attribute_functor_run<CMap, i, j>::
run(amap, modified_darts, mark_modified_darts); run(amap, modified_darts, mark_modified_darts);
@ -960,7 +960,7 @@ struct Test_split_attribute_functor
&modified_darts, &modified_darts,
const std::deque<typename CMap::Dart_handle> const std::deque<typename CMap::Dart_handle>
&modified_darts2, &modified_darts2,
typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR) typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
{ {
CGAL::internal::Test_split_attribute_functor_run<CMap, i, j>:: CGAL::internal::Test_split_attribute_functor_run<CMap, i, j>::
run(amap, modified_darts, modified_darts2, mark_modified_darts); run(amap, modified_darts, modified_darts2, mark_modified_darts);

View File

@ -341,7 +341,7 @@ struct Count_cell_functor
std::vector<size_type>* amarks, std::vector<size_type>* amarks,
std::vector<unsigned int>* ares ) std::vector<unsigned int>* ares )
{ {
if ( (*amarks)[i]!=CMap::MARK_ERROR && !amap->is_marked(adart, (*amarks)[i]) ) if ( (*amarks)[i]!=CMap::INVALID_MARK && !amap->is_marked(adart, (*amarks)[i]) )
{ {
++ (*ares)[i]; ++ (*ares)[i];
CGAL::mark_cell<CMap,i>(*amap, adart, (*amarks)[i]); CGAL::mark_cell<CMap,i>(*amap, adart, (*amarks)[i]);

View File

@ -132,8 +132,65 @@ typedef CGAL::Combinatorial_map<4, Map_dart_items_4> Map8;
typedef CGAL::Combinatorial_map<4, Map_dart_max_items_4> Map9; typedef CGAL::Combinatorial_map<4, Map_dart_max_items_4> Map9;
bool test_get_new_mark()
{
cout << "***************************** TEST GET_NEW_MARK:"
<< endl;
bool res = false;
Map1 map;
Map1::size_type marks[Map1::NB_MARKS];
for (unsigned int i=0; i<Map1::NB_MARKS; ++i)
{
try
{
marks[i] = map.get_new_mark();
}
catch (Map1::Exception_no_more_available_mark e)
{
std::cerr<<"No more free mark, exit."<<std::endl;
}
}
cout << "Creation of NB_MARK marks: OK"
<< endl;
Map1::size_type mark;
try
{
mark = map.get_new_mark();
}
catch (Map1::Exception_no_more_available_mark e)
{
std::cerr<<"The creation of an additional mark throw an exception: OK"<<std::endl;
res = true;
}
catch(...)
{
map.free_mark(mark);
}
for (unsigned int i=0; i<Map1::NB_MARKS; ++i)
{
map.free_mark(marks[i]);
}
cout << "***************************** TEST GET_NEW_MARK DONE"
<< endl;
return res;
}
int main() int main()
{ {
if ( !test_get_new_mark() )
{
std::cout<<"ERROR during test_get_new_mark."<<std::endl;
return EXIT_FAILURE;
}
if ( !test2D<Map1>() ) if ( !test2D<Map1>() )
{ {
std::cout<<"ERROR during test2D<Map1>."<<std::endl; std::cout<<"ERROR during test2D<Map1>."<<std::endl;

View File

@ -420,16 +420,6 @@ namespace CGAL {
std::map<Point, std::vector<Dart_handle> > one_dart_per_facet; std::map<Point, std::vector<Dart_handle> > one_dart_per_facet;
size_type mymark; size_type mymark;
// CGAL_assertion( mymark!=-1 );
try
{
mymark = this->get_new_mark();
}
catch (typename Base::Exception_mark_is_out_of_border e)
{
std::cerr<<"No more free mark, exit."<<std::endl;
exit(-1);
}
// First we fill the std::map by one dart per facet, and by using // First we fill the std::map by one dart per facet, and by using
// the minimal point as index. // the minimal point as index.