CGAL 6.2 - Handles and Circulators: Handle Concept Reference

CGAL 6.2 - Handles and Circulators

Loading...
Searching...
No Matches
List of all members
Handle Concept Reference
Reference Manual » Concepts

## Definition

Most data structures in CGAL use the concept of `Handle` in their user interface to refer to the elements they store. This concept describes what is sometimes called a trivial iterator. A `Handle` is akin to a pointer to an object providing the dereference operator `operator*()` and member access `operator->()` but no increment or decrement operators like iterators. A `Handle` is intended to be used whenever the referenced object is not part of a logical sequence.

Like iterators, the handle can be passed as template argument to `std::iterators_traits` in order to extract its `value_type`, the type of the element pointed to. The `iterator_category` is `void`.

Refines
  `Descriptor`

The default constructed object must be unique as far as the equality operator is concerned (this serves the same purpose as NULL for pointers). (Note that this is not a generally supported feature of iterators of standard containers.)

Has models
  `T* (pointer)`
  `const T* (const pointers)`
  `Iterator`
  `Circulator`

## Dereference
value_type & | operator* ()
| returns the object pointed to.
value_type * | operator-> ()
| returns a pointer to the object pointed to.