cairomm 1.19.0
|
A custom const_iterator for iterating over a Path. More...
#include <cairomm/path.h>
Public Types | |
using | iterator_category = std::forward_iterator_tag |
using | value_type = const Element |
using | difference_type = std::ptrdiff_t |
using | pointer = const Element * |
using | reference = const Element & |
Public Member Functions | |
bool | operator== (const const_iterator &iter) const |
bool | operator!= (const const_iterator &iter) const |
const_iterator & | operator++ () |
const_iterator | operator++ (int) |
reference | operator* () |
pointer | operator-> () |
Protected Member Functions | |
const_iterator (cairo_path_data_t *path_data) | |
Protected Attributes | |
Element | m_node |
A custom const_iterator for iterating over a Path.
This is made slightly complicated because each element can have different numbers of sub-elements, so advancing the const_iterator must advance the base pointer a different amount based on the current element.
Also, because of the way the base cairo path structure is set up, you can only traverse the list forward, because the only guarantee about the structure is that the first element is a header type which tells the location of the next header.
using Cairo::Path::const_iterator::difference_type = std::ptrdiff_t |
|
protected |
|
inline |
|
inline |
const_iterator & Cairo::Path::const_iterator::operator++ | ( | ) |
const_iterator Cairo::Path::const_iterator::operator++ | ( | int | ) |
|
inline |
|
inline |
|
protected |