Capitalize Static_property_map and add a comment that it is different from boost::static_property_map

This commit is contained in:
Andreas Fabri 2017-05-18 09:51:40 +02:00 committed by Maxime Gimeno
parent c892cf49c7
commit b5b69f48a5
2 changed files with 8 additions and 6 deletions

View File

@ -112,7 +112,7 @@ BOOST_MPL_HAS_XXX_TRAIT_DEF(Plane_3)
template <class Gt, class I, CGAL_HDS_PARAM_, class A>
struct Get_static_property_map {
typedef boost::graph_traits<CGAL::Polyhedron_3<Gt,I,HDS,A> > Graph_traits;
typedef CGAL::static_property_map<typename Graph_traits::face_descriptor,
typedef CGAL::Static_property_map<typename Graph_traits::face_descriptor,
std::pair<int,int> > type;
};

View File

@ -39,8 +39,10 @@ namespace CGAL {
/// \cond SKIP_DOXYGEN
template <typename K, typename V>
class static_property_map
/// This class is almost the same as boost::static_property_map
/// The difference is that it is writable, although put() does nothing
template <typename K, typename V>
class Static_property_map
{
typedef K key_type;
typedef V value_type;
@ -49,18 +51,18 @@ class static_property_map
V v;
public:
static_property_map(V pv)
Static_property_map(V pv)
:v(pv){}
inline friend
value_type
get(const static_property_map& pm, const key_type&)
get(const Static_property_map& pm, const key_type&)
{
return pm.v;
}
inline friend
void
put(static_property_map& pm, const key_type&, const value_type&)
put(Static_property_map& pm, const key_type&, const value_type&)
{}
};