mirror of https://github.com/CGAL/cgal
Fix dynamic with default for graph inheriting from another graph (#8632)
Follow up of #7712
This commit is contained in:
commit
2fc2102007
|
|
@ -72,16 +72,16 @@ struct property_map<CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME, DTAG<CGAL_XX_YATP>
|
|||
namespace CGAL { \
|
||||
template <CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS, typename CGAL_XX_YATP>\
|
||||
typename boost::property_map<CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME, DTAG<CGAL_XX_YATP> >::type \
|
||||
get(DTAG<CGAL_XX_YATP> t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \
|
||||
get(DTAG<CGAL_XX_YATP> t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \
|
||||
{ \
|
||||
return get(t, static_cast<CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g)); \
|
||||
return get(t, static_cast<CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g), default_value); \
|
||||
} \
|
||||
\
|
||||
template <CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS, typename CGAL_XX_YATP>\
|
||||
typename boost::property_map<CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME, DTAG<CGAL_XX_YATP> >::const_type \
|
||||
get(DTAG<CGAL_XX_YATP> t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \
|
||||
get(DTAG<CGAL_XX_YATP> t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \
|
||||
{ \
|
||||
return get(t, static_cast<const CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g)); \
|
||||
return get(t, static_cast<const CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g), default_value); \
|
||||
}\
|
||||
} //CGAL namespace
|
||||
|
||||
|
|
@ -131,16 +131,16 @@ struct property_map<CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME, DTAG<CGAL_XX_YATP>
|
|||
namespace CGAL { \
|
||||
template <typename CGAL_XX_YATP>\
|
||||
typename boost::property_map<CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME, DTAG<CGAL_XX_YATP> >::type \
|
||||
get(DTAG<CGAL_XX_YATP> t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \
|
||||
get(DTAG<CGAL_XX_YATP> t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \
|
||||
{ \
|
||||
return get(t, static_cast<CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g)); \
|
||||
return get(t, static_cast<CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g), default_value); \
|
||||
} \
|
||||
\
|
||||
template <typename CGAL_XX_YATP>\
|
||||
typename boost::property_map<CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME, DTAG<CGAL_XX_YATP> >::const_type \
|
||||
get(DTAG<CGAL_XX_YATP> t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \
|
||||
get(DTAG<CGAL_XX_YATP> t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \
|
||||
{ \
|
||||
return get(t, static_cast<const CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g)); \
|
||||
return get(t, static_cast<const CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME&>(g), default_value); \
|
||||
}\
|
||||
} //CGAL namespace
|
||||
|
||||
|
|
|
|||
|
|
@ -443,11 +443,11 @@ template <unsigned int d_, unsigned int ambient_dim, \
|
|||
typename boost::property_map< \
|
||||
Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_>, \
|
||||
TAG<T> >::const_type \
|
||||
get(TAG<T>, const Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_>&) \
|
||||
get(TAG<T>, const Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_>&, const T& default_value = T()) \
|
||||
{ \
|
||||
typedef Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_> LCC;\
|
||||
typedef typename boost::graph_traits<LCC>::DESC DESC; \
|
||||
return internal::Dynamic_property_map<DESC,T>();\
|
||||
return internal::Dynamic_property_map<DESC,T>(default_value);\
|
||||
} \
|
||||
\
|
||||
template <unsigned int d_, unsigned int ambient_dim, \
|
||||
|
|
@ -461,11 +461,11 @@ template <unsigned int d_, unsigned int ambient_dim, \
|
|||
typename boost::property_map< \
|
||||
Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_>, \
|
||||
TAG<T> >::type \
|
||||
get(TAG<T>, Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_>&) \
|
||||
get(TAG<T>, Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_>&, const T& default_value = T()) \
|
||||
{ \
|
||||
typedef Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_, Alloc_, CMap , Storage_> LCC;\
|
||||
typedef typename boost::graph_traits<LCC>::DESC DESC; \
|
||||
return internal::Dynamic_property_map<DESC,T>();\
|
||||
return internal::Dynamic_property_map<DESC,T>(default_value);\
|
||||
} \
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue