Namespaces | Defines
QhullIterator.h File Reference
#include "libqhull/qhull_a.h"
#include <assert.h>
#include <string>
#include <vector>
Include dependency graph for QhullIterator.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  orgQhull
 

QhullRidge -- Qhull's ridge structure, ridgeT, as a C++ class.


namespace  std
 

Avoid dependence on <iterator>


Defines

#define QHULL_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR(C, T)
#define QHULL_DECLARE_MUTABLE_SET_ITERATOR(C)
#define QHULL_DECLARE_SEQUENTIAL_ITERATOR(C, T)
#define QHULL_DECLARE_SET_ITERATOR(C)

Define Documentation

Definition at line 62 of file QhullIterator.h.

Definition at line 128 of file QhullIterator.h.

#define QHULL_DECLARE_SEQUENTIAL_ITERATOR (   C,
 
)
Value:
\
    class C##Iterator \
    { \
        typedef C::const_iterator const_iterator; \
        const C *c; \
        const_iterator i; \
        public: \
        inline C##Iterator(const C &container) \
        : c(&container), i(c->constBegin()) {} \
        inline C##Iterator &operator=(const C &container) \
        { c = &container; i = c->constBegin(); return *this; } \
        inline void toFront() { i = c->constBegin(); } \
        inline void toBack() { i = c->constEnd(); } \
        inline bool hasNext() const { return i != c->constEnd(); } \
        inline const T &next() { return *i++; } \
        inline const T &peekNext() const { return *i; } \
        inline bool hasPrevious() const { return i != c->constBegin(); } \
        inline const T &previous() { return *--i; } \
        inline const T &peekPrevious() const { const_iterator p = i; return *--p; } \
        inline bool findNext(const T &t) \
        { while (i != c->constEnd()) if (*i++ == t) return true; return false; } \
        inline bool findPrevious(const T &t) \
        { while (i != c->constBegin()) if (*(--i) == t) return true; \
        return false;  } \
    };

QHULL_DECLARE_SEQUENTIAL_ITERATOR(C) -- Declare a Java-style iterator QHULL_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR(C) -- Declare a mutable Java-style iterator QHULL_DECLARE_SET_ITERATOR(C) -- Declare a set iterator QHULL_DECLARE_MUTABLE_SET_ITERATOR(C) -- Declare a mutable set iterator Derived from Qt/core/tools/qiterator.h and qset.h/FOREACHsetelement_()

Definition at line 32 of file QhullIterator.h.

#define QHULL_DECLARE_SET_ITERATOR (   C)
Value:
\
    template <class T> \
    class Qhull##C##Iterator \
    { \
        typedef typename Qhull##C<T>::const_iterator const_iterator; \
        Qhull##C<T> c; \
        const_iterator i; \
    public: \
        inline Qhull##C##Iterator(const Qhull##C<T> &container) \
        : c(container), i(c.constBegin()) {} \
        inline Qhull##C##Iterator &operator=(const Qhull##C<T> &container) \
        { c = container; i = c.constBegin(); return *this; } \
        inline void toFront() { i = c.constBegin(); } \
        inline void toBack() { i = c.constEnd(); } \
        inline bool hasNext() const { return i != c.constEnd(); } \
        inline const T &next() { return *i++; } \
        inline const T &peekNext() const { return *i; } \
        inline bool hasPrevious() const { return i != c.constBegin(); } \
        inline const T &previous() { return *--i; } \
        inline const T &peekPrevious() const { const_iterator p = i; return *--p; } \
        inline bool findNext(const T &t) \
        { while (i != c.constEnd()) if (*i++ == t) return true; return false; } \
        inline bool findPrevious(const T &t) \
        { while (i != c.constBegin()) if (*(--i) == t) return true; \
        return false;  } \
    };

Definition at line 100 of file QhullIterator.h.



libqhull-ours
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:32:11