CGAL 5.2.1 - STL Extensions for CGAL
CGAL::CC_safe_handle< CC_iterator > Class Template Reference

#include <CGAL/CC_safe_handle.h>

Definition

The class CC_safe_handle is a helper class that stores an iterator on a Compact_container (or Concurrent_compact_container) and is able to know if the pointee has been erased after the creation of the CC_safe_handle instance.

It stores the iterator and the erase counter value of the pointee when the CC_safe_handle instance was created. It can only be used when the pointee type is a model of the ObjectWithEraseCounter concept.

Template Parameters
CC_iteratoris the type of the stored iterator (on a Compact_container or a Concurrent_compact_container)
See also
Compact_container
Concurrent_compact_container

Creation

 CC_safe_handle (CC_iterator iterator)
 Introduces a safe handle from a Compact_container iterator.
 

Access Member Functions

bool is_zombie () const
 Returns true if the pointee has been erased, i.e. if the iterator points to a freed object or to another object.
 
CC_iterator cc_iterator () const
 Returns the stored Compact_container iterator.