Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!


Chronological Thread 
  • From: Gilles Kneuss <>
  • To:
  • Subject: Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!
  • Date: Thu, 8 Oct 2009 00:33:32 +0200

Hello,

Fantastic !

-> It complies now well !

> I have to read a bit more about templates and about the structure of CGAL...

Thank you so much for your help.

Gilles

2009/10/7 Laurent Rineau (GeometryFactory) <>
Le mercredi 07 octobre 2009 23:20:19, Gilles Kneuss a écrit :
> Re-hello,
>
> my last reply was not as clear as it should be :
>
> DT2<Gt>* heritage=new DT2<Gt>();
>
> or
>
> DT2<K,Gt>* heritage=new DT2<Gt>();
>
> Give the same compile problems (the first error is) :
>
> "main.cpp:23: erreur: wrong number of template arguments (1, should be 2)"
>
> Any other ideas ?

See what you wrote:

> >> > template <class kernel, class TDS>
> >> > class DT2 : public CGAL::Delaunay_triangulation_2<kernel,TDS>

DT2 is template by kernel *and* TDS. You need to pass a TDS as argument.

I suggest the following:

typedef CGAL::Triangulation_data_structure_2 <
                          CGAL::Triangulation_vertex_base_2<Gt> > TDS;

typedef DT2<Gt, TDS> Tr;

Tr* heritage = new Tr;

Another possibility would have been:

template <class Kernel>
class DT2 : public CGAL::Delaunay_triangulation_2<Kernel> {
 // ...
};

and DT2<Gt>.

The reason is that the second template argument of
CGAL::Delaunay_triangulation_2 has a default value, which is
CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<Gt> >

--
Laurent Rineau, PhD
Release Manager of the CGAL Project
http://www.cgal.org/
R&D
Engineer at GeometryFactory
http://www.geometryfactory.com/
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




Archive powered by MHonArc 2.6.16.

Top of Page