Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator


Chronological Thread 
  • From: Tom Kazimiers <>
  • To:
  • Subject: Re: [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator
  • Date: Tue, 24 Feb 2009 16:46:02 +0100

Sylvain Pion schrieb:
> Tom Kazimiers wrote:
>> Sylvain Pion schrieb:
>>> Tom Kazimiers wrote:
>>>> I have an interface which represents access to delaunay triangulation.
>>>> Part of this interface should be an iterator which allows me to go
>>>> through all the vertices of the triangulation. As an implementation of
>>>> this interface I built an adapter to CGAL which works pretty well -
>>>> except for the iterator.
>>>> From CGAL I can get an Finite_vertices_iterator but I need a
>>>> std::iterator (or a boost iterator) (part of the interface)
>>>> - now I wonder if there is any other way for this then writing a
>>>> wrapper
>>>> class?
>>> It would be interesting to know the reason why you have such a
>>> requirement.
>>>
>> I am working currently on an university project in which I would like to
>> easyly switch between delaunay triangulation variants (like between CGAL
>> and an implementation of one of my professors). For this I wrote an
>> interface (lots of "virtual ... = 0;" functions) to write code only
>> against this interface (which is good habbit anyway I guess). This again
>> would it make easy to see the behaviour of different triangulations
>> without changing much code.
>
> Then I guess the answer is that you have to write wrappers.
>
> You can also go on the generic programming path using a concept,
> and write adaptors for the 2 implementations.
>
Sylvain, thanks for your suggestions. CGAL makes a lot use of the
concept/template approach, doesn't it?

Regards,
Tom



Archive powered by MHonArc 2.6.16.

Top of Page