Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Trying to add info to a vertex in a segment Delaunay graph fails compilation

Subject: CGAL users discussion list

List archive

[cgal-discuss] Trying to add info to a vertex in a segment Delaunay graph fails compilation


Chronological Thread 
  • From:
  • To:
  • Subject: [cgal-discuss] Trying to add info to a vertex in a segment Delaunay graph fails compilation
  • Date: Fri, 28 Aug 2009 16:52:00 +0300


Hello,

I am trying to add information to a vertex in a SDG. For that matter, I took
some code from the SDG demo and tryed to incorporate it, but obviously I am
doing something wrong, because it doesn't compile. The code is:

template < class Vbb, class Info_ >
class Segment_Delaunay_graph_vertex_base_with_info_2
: public Vbb
{
public:
// TYPES
//------
typedef Vbb Base;
typedef Info_ Info;

typedef typename Base::Storage_traits Storage_traits;
typedef typename Base::Geom_traits Geom_traits;
typedef typename Base::Site_2 Site_2;
typedef typename Base::Storage_site_2 Storage_site_2;
typedef typename Base::Data_structure Data_structure;

typedef typename Data_structure::Face_handle Face_handle;
typedef typename Data_structure::Vertex_handle Vertex_handle;


template < typename DS2 >
struct Rebind_TDS {
typedef typename Vbb::template Rebind_TDS<DS2>::Other Vb2;
typedef Segment_Delaunay_graph_vertex_base_with_info_2<Vb2,Info> Other;
};


Segment_Delaunay_graph_vertex_base_with_info_2 () : Vbb(), info_() {}

Segment_Delaunay_graph_vertex_base_with_info_2(const Storage_site_2& ss,
Face_handle f)
: Vbb(ss, f), info_() {}

void set_info(const Info& info) { info_ = info; }
const Info& info() const { return info_; }

private:
Info info_;
};

struct SiteInfo{
Number v;
SiteInfo(){}
};

typedef CGAL::Segment_Delaunay_graph_traits_without_intersections_2<Kernel>
SDGTraits;
typedef CGAL::Segment_Delaunay_graph_storage_traits_2<SDGTraits>

ST;
typedef CGAL::Segment_Delaunay_graph_vertex_base_2<ST>
Vb;
typedef CGAL::Segment_Delaunay_graph_vertex_base_with_info_2<Vb,SiteInfo>
Vbi;
typedef CGAL::Triangulation_face_base_2<SDGTraits>
Fb;
typedef CGAL::Triangulation_data_structure_2<Vbi,Fb>
DS;
typedef CGAL::Segment_Delaunay_graph_2<ST,DS>
SDG;
typedef SDG::Site_2
SDGSite;
typedef
CGAL::Segment_Delaunay_graph_degeneracy_removal_policy_2<SDG>
SDGPolicy;
typedef
CGAL::Segment_Delaunay_graph_adaptation_traits_2<SDG>
SDGAdaptTraits;
typedef CGAL::Voronoi_diagram_2<SDG,SDGAdaptTraits,SDGPolicy>
VD;


Thanks,
Amir.



Archive powered by MHonArc 2.6.16.

Top of Page