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

#include <CGAL/CC_safe_handle.h>

Definition

template<typename CC_iterator>
class CGAL::CC_safe_handle< CC_iterator >

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. More...
 

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. More...
 
CC_iterator cc_iterator () const
 Returns the stored Compact_container iterator. More...
 

Constructor & Destructor Documentation

◆ CC_safe_handle()

template<typename CC_iterator >
CGAL::CC_safe_handle< CC_iterator >::CC_safe_handle ( CC_iterator  iterator)

Introduces a safe handle from a Compact_container iterator.

Member Function Documentation

◆ cc_iterator()

template<typename CC_iterator >
CC_iterator CGAL::CC_safe_handle< CC_iterator >::cc_iterator ( ) const

Returns the stored Compact_container iterator.

◆ is_zombie()

template<typename CC_iterator >
bool CGAL::CC_safe_handle< CC_iterator >::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.