Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Combinatorial Maps: create_attribute with more than 1 argument
Chronological Thread
- From: "Damiand" <>
- To:
- Subject: Re: [cgal-discuss] Combinatorial Maps: create_attribute with more than 1 argument
- Date: Wed, 14 Aug 2013 20:48:34 +0200 (CEST)
Hi Jeremy,
This is not a bug: the attribute can have a constructor with many arguments.
In your example the attribute has only the default constructor with 1
argument, and the Info of the attribute has a constructor with 2 arguments.
Here the correct item class to do what you want:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
struct Myitem
{
template<class CMap>
struct Dart_wrapper
{
struct Info
{
Info(int a_, int b_) : a(a_), b(b_) {}
int a, b;
};
struct Facet_attribute: public
CGAL::Cell_attribute<CMap,Info,CGAL::Tag_true,
Sum_functor, Divide_by_two_functor>
{
Facet_attribute(int a_, int b_):
CGAL::Cell_attribute<CMap,Info,CGAL::Tag_true,
Sum_functor,Divide_by_two_functor>(Info(a_,b_))
{}
};
typedef CGAL::Dart<3, CMap> Dart;
typedef CGAL::cpp11::tuple<void,void,Facet_attribute> Attributes;
};
};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Thank you for your feedbaks on combinatorial maps.
Guillaume
- [cgal-discuss] Combinatorial Maps: create_attribute with more than 1 argument, jdumas, 08/14/2013
- Re: [cgal-discuss] Combinatorial Maps: create_attribute with more than 1 argument, Damiand, 08/14/2013
Archive powered by MHonArc 2.6.18.