mirror of https://github.com/CGAL/cgal
move doc into property_map.h itself
This commit is contained in:
parent
a74d6301d0
commit
0b10df571d
|
|
@ -4772,7 +4772,6 @@ Point_set_processing_3/doc/Point_set_processing_3/fig/mst_orient_normals.jpg -te
|
||||||
Point_set_processing_3/doc/Point_set_processing_3/fig/pipeline.jpg -text svneol=unset#image/jpeg
|
Point_set_processing_3/doc/Point_set_processing_3/fig/pipeline.jpg -text svneol=unset#image/jpeg
|
||||||
Point_set_processing_3/doc/Point_set_processing_3/fig/point_set_processing.jpg -text svneol=unset#image/jpeg
|
Point_set_processing_3/doc/Point_set_processing_3/fig/point_set_processing.jpg -text svneol=unset#image/jpeg
|
||||||
Point_set_processing_3/doc/Point_set_processing_3/fig/point_set_processing_detail.png -text svneol=unset#image/png
|
Point_set_processing_3/doc/Point_set_processing_3/fig/point_set_processing_detail.png -text svneol=unset#image/png
|
||||||
Point_set_processing_3/doc/Property_map/CGAL/property_map.h -text
|
|
||||||
Point_set_processing_3/doc/Property_map/PackageDescription.txt -text
|
Point_set_processing_3/doc/Property_map/PackageDescription.txt -text
|
||||||
Point_set_processing_3/doc/Property_map/Property_map.txt -text
|
Point_set_processing_3/doc/Property_map/Property_map.txt -text
|
||||||
Point_set_processing_3/doc/Property_map/examples.txt -text
|
Point_set_processing_3/doc/Property_map/examples.txt -text
|
||||||
|
|
|
||||||
|
|
@ -1199,6 +1199,7 @@ namespace for the XML file to be processed properly. -->
|
||||||
<string name="GENERATE_TAGFILE">./tags/Triangulation_2.tag</string>
|
<string name="GENERATE_TAGFILE">./tags/Triangulation_2.tag</string>
|
||||||
<string name="IMAGE_PATH">../Triangulation_2/doc/Triangulation_2/fig</string>
|
<string name="IMAGE_PATH">../Triangulation_2/doc/Triangulation_2/fig</string>
|
||||||
<string name="EXAMPLE_PATH">../Triangulation_2/examples</string>
|
<string name="EXAMPLE_PATH">../Triangulation_2/examples</string>
|
||||||
|
<bool name="BRIEF_MEMBER_DESC">true</bool>
|
||||||
<list name="TAGFILES" append="true">
|
<list name="TAGFILES" append="true">
|
||||||
<item>./tags/TDS_2.tag=../../CGAL.CGAL.2D-Triangulation-Data-Structure/html</item>
|
<item>./tags/TDS_2.tag=../../CGAL.CGAL.2D-Triangulation-Data-Structure/html</item>
|
||||||
<item>./tags/Triangulation_3.tag=../../CGAL.CGAL.3D-Triangulation/html</item>
|
<item>./tags/Triangulation_3.tag=../../CGAL.CGAL.3D-Triangulation/html</item>
|
||||||
|
|
@ -1258,10 +1259,11 @@ namespace for the XML file to be processed properly. -->
|
||||||
|
|
||||||
<project>
|
<project>
|
||||||
<name>CGAL and Boost Property Maps</name>
|
<name>CGAL and Boost Property Maps</name>
|
||||||
<input>../Point_set_processing_3/doc/Property_map</input>
|
<input>../Point_set_processing_3/doc/Property_map/</input>
|
||||||
|
<input>../Point_set_processing_3/include/CGAL/property_map.h</input>
|
||||||
<doxygen>
|
<doxygen>
|
||||||
<string name="STRIP_FROM_PATH">../Point_set_processing_3/doc/Property_map</string>
|
<string name="STRIP_FROM_PATH">../Point_set_processing_3/include</string>
|
||||||
<string name="STRIP_FROM_INC_PATH">../Point_set_processing_3/doc/Property_map</string>
|
<string name="STRIP_FROM_INC_PATH">../Point_set_processing_3/include</string>
|
||||||
<string name="GENERATE_TAGFILE">./tags/Property_map.tag</string>
|
<string name="GENERATE_TAGFILE">./tags/Property_map.tag</string>
|
||||||
<string name="IMAGE_PATH">../Point_set_processing_3/doc/Property_map/fig</string>
|
<string name="IMAGE_PATH">../Point_set_processing_3/doc/Property_map/fig</string>
|
||||||
<string name="EXAMPLE_PATH">../Point_set_processing_3/examples</string>
|
<string name="EXAMPLE_PATH">../Point_set_processing_3/examples</string>
|
||||||
|
|
@ -1277,7 +1279,7 @@ namespace for the XML file to be processed properly. -->
|
||||||
<input>../Point_set_processing_3/doc/Point_set_processing_3</input>
|
<input>../Point_set_processing_3/doc/Point_set_processing_3</input>
|
||||||
<input>../Point_set_processing_3/include</input>
|
<input>../Point_set_processing_3/include</input>
|
||||||
<doxygen>
|
<doxygen>
|
||||||
<string name="STRIP_FROM_PATH">../Point_set_processing_3/doc/Point_set_processing_3</string>
|
<string name="STRIP_FROM_PATH">../Point_set_processing_3/include</string>
|
||||||
<string name="STRIP_FROM_INC_PATH">../Point_set_processing_3/include</string>
|
<string name="STRIP_FROM_INC_PATH">../Point_set_processing_3/include</string>
|
||||||
<string name="GENERATE_TAGFILE">./tags/Point_set_processing_3.tag</string>
|
<string name="GENERATE_TAGFILE">./tags/Point_set_processing_3.tag</string>
|
||||||
<string name="IMAGE_PATH">../Point_set_processing_3/doc/Point_set_processing_3/fig</string>
|
<string name="IMAGE_PATH">../Point_set_processing_3/doc/Point_set_processing_3/fig</string>
|
||||||
|
|
|
||||||
|
|
@ -1,351 +0,0 @@
|
||||||
|
|
||||||
namespace CGAL {
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\ingroup PkgProperty_map
|
|
||||||
|
|
||||||
Property map that converts a `T*` pointer (or in general an iterator
|
|
||||||
over `T` elements) to the `T` object.
|
|
||||||
|
|
||||||
\models `LvaluePropertyMap`
|
|
||||||
|
|
||||||
*/
|
|
||||||
template< typename T >
|
|
||||||
class Dereference_property_map :
|
|
||||||
public boost::put_get_helper< T&,
|
|
||||||
Dereference_property_map<T> > {
|
|
||||||
public:
|
|
||||||
|
|
||||||
/// \name Types
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
typedef to `T*`
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type key_type;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
typedef to `T`
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type value_type;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
typedef to `T&`
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type reference;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
`boost::lvalue_property_map_tag`
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type category;
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
/// \name Creation
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
%Default constructor.
|
|
||||||
|
|
||||||
*/
|
|
||||||
Dereference_property_map();
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
/// \name Operations
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
Access a property map element.
|
|
||||||
|
|
||||||
\tparam Iter Type convertible to `key_type`.
|
|
||||||
*/
|
|
||||||
template<class Iter> reference operator[](Iter it) const;
|
|
||||||
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
}; /* end Dereference_property_map */
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
Free function to create a `Dereference_property_map` property map.
|
|
||||||
|
|
||||||
\relates Dereference_property_map
|
|
||||||
*/
|
|
||||||
Dereference_property_map<typename value_type_traits<Iter>::type> make_dereference_property_map(Iter);
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\ingroup PkgProperty_map
|
|
||||||
|
|
||||||
Property map that accesses the first item of a `std::pair`.
|
|
||||||
|
|
||||||
\tparam Pair Instance of `std::pair`.
|
|
||||||
|
|
||||||
\models `LvaluePropertyMap`
|
|
||||||
|
|
||||||
\sa `CGAL::Second_of_pair_property_map<Pair>`
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
template< typename Pair >
|
|
||||||
class First_of_pair_property_map :
|
|
||||||
public boost::put_get_helper< Pair::first_type&, First_of_pair_property_map<Pair> >
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
/// \name Types
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
typedef to `Pair*`
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type key_type;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
typedef to `Pair::first_type`
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type value_type;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
typedef to `value_type`&
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type reference;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
`boost::lvalue_property_map_tag`
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type category;
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
/// \name Creation
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
Default constructor.
|
|
||||||
|
|
||||||
*/
|
|
||||||
First_of_pair_property_map();
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
/// \name Operations
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
Access a property map element.
|
|
||||||
|
|
||||||
\tparam Iter Type convertible to `key_type`.
|
|
||||||
|
|
||||||
*/
|
|
||||||
template<class Iter> reference operator[](Iter pair) const;
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
}; /* end First_of_pair_property_map */
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Free function to create a `First_of_pair_property_map` property map.
|
|
||||||
|
|
||||||
\relates First_of_pair_property_map
|
|
||||||
*/
|
|
||||||
First_of_pair_property_map<typename value_type_traits<Iter>::type> make_first_of_pair_property_map(Iter);
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\ingroup PkgProperty_map
|
|
||||||
|
|
||||||
Property map that accesses the Nth item of a `boost::tuple`.
|
|
||||||
|
|
||||||
\tparam N Index of the item to access.
|
|
||||||
\tparam Tuple Instance of `boost::tuple`.
|
|
||||||
|
|
||||||
\models `LvaluePropertyMap`
|
|
||||||
|
|
||||||
*/
|
|
||||||
template< typename N, typename Tuple >
|
|
||||||
class Nth_of_tuple_property_map :
|
|
||||||
public boost::put_get_helper< boost::tuples::element<N, Tuple>::type& , Nth_of_tuple_property_map<N, Tuple>> {
|
|
||||||
public:
|
|
||||||
|
|
||||||
/// \name Types
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
typedef to `Tuple*`
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type key_type;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
typedef to `boost::tuples::element<N, Tuple>::%type`
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type value_type;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
typedef to `value_type`&
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type reference;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
`boost::lvalue_property_map_tag`
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type category;
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
/// \name Creation
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
%Default constructor.
|
|
||||||
|
|
||||||
*/
|
|
||||||
Nth_of_tuple_property_map();
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
/// \name Operations
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
Access a property map element.
|
|
||||||
|
|
||||||
\tparam Iter Type convertible to `key_type`.
|
|
||||||
|
|
||||||
*/
|
|
||||||
template<class Iter> reference operator[](Iter tuple) const;
|
|
||||||
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
}; /* end Nth_of_tuple_property_map */
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
Free function to create a `Nth_of_tuple_property_map` property map.
|
|
||||||
|
|
||||||
\relates Nth_of_tuple_property_map
|
|
||||||
*/
|
|
||||||
Nth_of_tuple_property_map<N, typename value_type_traits<Iter>::type> make_nth_of_tuple_property_map(Iter);
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\ingroup PkgProperty_map
|
|
||||||
|
|
||||||
Property map that accesses the second item of a `std::pair`.
|
|
||||||
|
|
||||||
\tparam Pair Instance of `std::pair`.
|
|
||||||
|
|
||||||
\models `LvaluePropertyMap`
|
|
||||||
|
|
||||||
\sa `CGAL::First_of_pair_property_map<Pair>`
|
|
||||||
|
|
||||||
*/
|
|
||||||
template< typename Pair >
|
|
||||||
class Second_of_pair_property_map : public
|
|
||||||
boost::put_get_helper< Pair::second_type& , Second_of_pair_property_map<Pair>>
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
/// \name Types
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
typedef to `Pair*`
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type key_type;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
typedef to `Pair::second_type`
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type value_type;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
typedef to `value_type`&
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type reference;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
`boost::lvalue_property_map_tag`
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef Hidden_type category;
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
/// \name Creation
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
%Default constructor.
|
|
||||||
|
|
||||||
*/
|
|
||||||
Second_of_pair_property_map();
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
/// \name Operations
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Access a property map element.
|
|
||||||
|
|
||||||
\tparam Iter Type convertible to `key_type`.
|
|
||||||
|
|
||||||
*/
|
|
||||||
template<class Iter> reference operator[](Iter pair) const;
|
|
||||||
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
}; /* end Second_of_pair_property_map */
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Free function to create a `Second_of_pair_property_map` property map.
|
|
||||||
|
|
||||||
\relates Second_of_pair_property_map
|
|
||||||
*/
|
|
||||||
Second_of_pair_property_map<typename value_type_traits<Iter>::type> make_second_of_pair_property_map(Iter);
|
|
||||||
|
|
||||||
|
|
||||||
} /* end namespace CGAL */
|
|
||||||
|
|
@ -17,9 +17,6 @@
|
||||||
//
|
//
|
||||||
// Author(s) : Andreas Fabri and Laurent Saboret
|
// Author(s) : Andreas Fabri and Laurent Saboret
|
||||||
|
|
||||||
//WARNING: The documentation is not generated using this file
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
|
||||||
|
|
||||||
#ifndef CGAL_POINT_SET_PROPERTY_MAP_H
|
#ifndef CGAL_POINT_SET_PROPERTY_MAP_H
|
||||||
#define CGAL_POINT_SET_PROPERTY_MAP_H
|
#define CGAL_POINT_SET_PROPERTY_MAP_H
|
||||||
|
|
||||||
|
|
@ -38,12 +35,11 @@
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
|
||||||
/// Property map that converts a 'T*' pointer (or in general
|
/// \ingroup PkgProperty_map
|
||||||
/// an iterator over 'T' elements) to the 'T' object.
|
/// Property map that converts a `T*` pointer (or in general an iterator
|
||||||
|
/// over `T` elements) to the `T` object.
|
||||||
///
|
///
|
||||||
/// @heading Is Model for the Concepts:
|
/// \models `LvaluePropertyMap`
|
||||||
/// Model of boost::LvaluePropertyMap concept.
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct Dereference_property_map
|
struct Dereference_property_map
|
||||||
: public boost::put_get_helper<T&, Dereference_property_map<T> >
|
: public boost::put_get_helper<T&, Dereference_property_map<T> >
|
||||||
|
|
@ -51,62 +47,55 @@ struct Dereference_property_map
|
||||||
typedef T* key_type; ///< typedef to 'T*'
|
typedef T* key_type; ///< typedef to 'T*'
|
||||||
typedef T value_type; ///< typedef to 'T'
|
typedef T value_type; ///< typedef to 'T'
|
||||||
typedef value_type& reference; ///< typedef to 'T&'
|
typedef value_type& reference; ///< typedef to 'T&'
|
||||||
typedef boost::lvalue_property_map_tag category; ///< boost::lvalue_property_map_tag
|
typedef boost::lvalue_property_map_tag category; ///< `boost::lvalue_property_map_tag`
|
||||||
|
|
||||||
/// Access a property map element.
|
/// Access a property map element.
|
||||||
///
|
///
|
||||||
/// @tparam Iter Type convertible to key_type.
|
/// @tparam Iter Type convertible to `key_type`.
|
||||||
template <class Iter>
|
template <class Iter>
|
||||||
reference operator[](Iter it) const { return reference(*it); }
|
reference operator[](Iter it) const { return reference(*it); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Free function to create a Dereference_property_map property map.
|
/// Free function to create a `Dereference_property_map` property map.
|
||||||
///
|
///
|
||||||
/// @relates Dereference_property_map
|
/// \relates Dereference_property_map
|
||||||
|
template <class Iter> // Type convertible to `key_type`
|
||||||
template <class Iter> // Type convertible to key_type
|
|
||||||
Dereference_property_map<typename CGAL::value_type_traits<Iter>::type>
|
Dereference_property_map<typename CGAL::value_type_traits<Iter>::type>
|
||||||
make_dereference_property_map(Iter)
|
make_dereference_property_map(Iter)
|
||||||
{
|
{
|
||||||
// value_type_traits is a workaround as back_insert_iterator's value_type is void
|
// value_type_traits is a workaround as back_insert_iterator's `value_type` is void
|
||||||
return Dereference_property_map<typename CGAL::value_type_traits<Iter>::type>();
|
return Dereference_property_map<typename CGAL::value_type_traits<Iter>::type>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
|
||||||
// Property maps Pair* -> Pair::first_type
|
/// \ingroup PkgProperty_map
|
||||||
// and Pair* -> Pair::second_type.
|
/// Property map that accesses the first item of a `std::pair`.
|
||||||
|
/// \tparam Pair Instance of `std::pair`.
|
||||||
/// Property map that accesses the first item of a std::pair.
|
/// \models `LvaluePropertyMap`
|
||||||
///
|
///
|
||||||
/// @heading Is Model for the Concepts:
|
/// \sa `CGAL::Second_of_pair_property_map<Pair>`
|
||||||
/// Model of boost::LvaluePropertyMap concept.
|
|
||||||
///
|
|
||||||
/// @heading Parameters:
|
|
||||||
/// @param Pair Instance of std::pair.
|
|
||||||
|
|
||||||
template <typename Pair>
|
template <typename Pair>
|
||||||
struct First_of_pair_property_map
|
struct First_of_pair_property_map
|
||||||
: public boost::put_get_helper<typename Pair::first_type&,
|
: public boost::put_get_helper<typename Pair::first_type&,
|
||||||
First_of_pair_property_map<Pair> >
|
First_of_pair_property_map<Pair> >
|
||||||
{
|
{
|
||||||
typedef Pair* key_type; ///< typedef to 'Pair*'
|
typedef Pair* key_type; ///< typedef to 'Pair*'
|
||||||
typedef typename Pair::first_type value_type; ///< typedef to Pair::first_type
|
typedef typename Pair::first_type value_type; ///< typedef to `Pair::first_type`
|
||||||
typedef value_type& reference; ///< typedef to value_type&
|
typedef value_type& reference; ///< typedef to `value_type&`
|
||||||
typedef boost::lvalue_property_map_tag category; ///< boost::lvalue_property_map_tag
|
typedef boost::lvalue_property_map_tag category; ///< boost::lvalue_property_map_tag
|
||||||
|
|
||||||
/// Access a property map element.
|
/// Access a property map element.
|
||||||
///
|
///
|
||||||
/// @tparam Iter Type convertible to key_type.
|
/// @tparam Iter Type convertible to `key_type`.
|
||||||
template <class Iter>
|
template <class Iter>
|
||||||
reference operator[](Iter pair) const { return reference(pair->first); }
|
reference operator[](Iter pair) const { return reference(pair->first); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Free function to create a First_of_pair_property_map property map.
|
/// Free function to create a `First_of_pair_property_map` property map.
|
||||||
///
|
///
|
||||||
/// @relates First_of_pair_property_map
|
/// \relates First_of_pair_property_map
|
||||||
|
|
||||||
template <class Iter> // Type convertible to key_type
|
template <class Iter> // Type convertible to key_type
|
||||||
First_of_pair_property_map<typename CGAL::value_type_traits<Iter>::type>
|
First_of_pair_property_map<typename CGAL::value_type_traits<Iter>::type>
|
||||||
make_first_of_pair_property_map(Iter)
|
make_first_of_pair_property_map(Iter)
|
||||||
|
|
@ -115,35 +104,35 @@ make_first_of_pair_property_map(Iter)
|
||||||
return First_of_pair_property_map<typename CGAL::value_type_traits<Iter>::type>();
|
return First_of_pair_property_map<typename CGAL::value_type_traits<Iter>::type>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Property map that accesses the second item of a std::pair.
|
/// \ingroup PkgProperty_map
|
||||||
///
|
///
|
||||||
/// @heading Is Model for the Concepts:
|
/// Property map that accesses the second item of a `std::pair`.
|
||||||
/// Model of boost::LvaluePropertyMap concept.
|
///
|
||||||
///
|
/// \tparam Pair Instance of `std::pair`.
|
||||||
/// @heading Parameters:
|
///
|
||||||
/// @param Pair Instance of std::pair.
|
/// \models `LvaluePropertyMap`
|
||||||
|
///
|
||||||
|
/// \sa `CGAL::First_of_pair_property_map<Pair>`
|
||||||
template <typename Pair>
|
template <typename Pair>
|
||||||
struct Second_of_pair_property_map
|
struct Second_of_pair_property_map
|
||||||
: public boost::put_get_helper<typename Pair::second_type&,
|
: public boost::put_get_helper<typename Pair::second_type&,
|
||||||
Second_of_pair_property_map<Pair> >
|
Second_of_pair_property_map<Pair> >
|
||||||
{
|
{
|
||||||
typedef Pair* key_type; ///< typedef to 'Pair*'
|
typedef Pair* key_type; ///< typedef to 'Pair*'
|
||||||
typedef typename Pair::second_type value_type; ///< typedef to Pair::second_type
|
typedef typename Pair::second_type value_type; ///< typedef to `Pair::second_type`
|
||||||
typedef value_type& reference; ///< typedef to value_type&
|
typedef value_type& reference; ///< typedef to `value_type&`
|
||||||
typedef boost::lvalue_property_map_tag category; ///< boost::lvalue_property_map_tag
|
typedef boost::lvalue_property_map_tag category; ///< `boost::lvalue_property_map_tag`
|
||||||
|
|
||||||
/// Access a property map element.
|
/// Access a property map element.
|
||||||
///
|
///
|
||||||
/// @tparam Iter Type convertible to key_type.
|
/// @tparam Iter Type convertible to `key_type`.
|
||||||
template <class Iter>
|
template <class Iter>
|
||||||
reference operator[](Iter pair) const { return reference(pair->second); }
|
reference operator[](Iter pair) const { return reference(pair->second); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Free function to create a Second_of_pair_property_map property map.
|
/// Free function to create a Second_of_pair_property_map property map.
|
||||||
///
|
///
|
||||||
/// @relates Second_of_pair_property_map
|
/// \relates Second_of_pair_property_map
|
||||||
|
|
||||||
template <class Iter> // Type convertible to key_type
|
template <class Iter> // Type convertible to key_type
|
||||||
Second_of_pair_property_map<typename CGAL::value_type_traits<Iter>::type>
|
Second_of_pair_property_map<typename CGAL::value_type_traits<Iter>::type>
|
||||||
make_second_of_pair_property_map(Iter)
|
make_second_of_pair_property_map(Iter)
|
||||||
|
|
@ -156,47 +145,43 @@ make_second_of_pair_property_map(Iter)
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
|
||||||
|
|
||||||
/// Property map that accesses the Nth item of a boost::tuple.
|
/// \ingroup PkgProperty_map
|
||||||
///
|
///
|
||||||
/// @heading Is Model for the Concepts:
|
/// Property map that accesses the Nth item of a `boost::tuple`.
|
||||||
/// Model of boost::LvaluePropertyMap concept.
|
///
|
||||||
///
|
/// \tparam N Index of the item to access.
|
||||||
/// @heading Parameters:
|
/// \tparam Tuple Instance of `boost::tuple`.
|
||||||
/// @param N Index of the item to access.
|
///
|
||||||
/// @param Tuple Instance of boost::tuple.
|
/// \models `LvaluePropertyMap`
|
||||||
|
|
||||||
template <int N, typename Tuple>
|
template <int N, typename Tuple>
|
||||||
struct Nth_of_tuple_property_map
|
struct Nth_of_tuple_property_map
|
||||||
: public boost::put_get_helper<typename boost::tuples::element<N,Tuple>::type&,
|
: public boost::put_get_helper<typename boost::tuples::element<N,Tuple>::type&,
|
||||||
Nth_of_tuple_property_map<N,Tuple> >
|
Nth_of_tuple_property_map<N,Tuple> >
|
||||||
{
|
{
|
||||||
typedef Tuple* key_type; ///< typedef to 'Tuple*'
|
typedef Tuple* key_type; ///< typedef to 'Tuple*'
|
||||||
typedef typename boost::tuples::element<N,Tuple>::type value_type; ///< typedef to boost::tuples::element<N,Tuple>::type
|
typedef typename boost::tuples::element<N,Tuple>::type value_type; ///< typedef to `boost::tuples::element<N,Tuple>::%type`
|
||||||
typedef value_type& reference; ///< typedef to value_type&
|
typedef value_type& reference; ///< typedef to `value_type&`
|
||||||
typedef boost::lvalue_property_map_tag category; ///< boost::lvalue_property_map_tag
|
typedef boost::lvalue_property_map_tag category; ///< `boost::lvalue_property_map_tag`
|
||||||
|
|
||||||
/// Access a property map element.
|
/// Access a property map element.
|
||||||
///
|
///
|
||||||
/// @tparam Iter Type convertible to key_type.
|
/// @tparam Iter Type convertible to `key_type`.
|
||||||
template <class Iter>
|
template <class Iter>
|
||||||
reference operator[](Iter tuple) const { return (reference) tuple->template get<N>(); }
|
reference operator[](Iter tuple) const { return (reference) tuple->template get<N>(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Free function to create a Nth_of_tuple_property_map property map.
|
/// Free function to create a Nth_of_tuple_property_map property map.
|
||||||
///
|
///
|
||||||
/// @relates Nth_of_tuple_property_map
|
/// \relates Nth_of_tuple_property_map
|
||||||
|
|
||||||
template <int N, class Iter> // Type convertible to key_type
|
template <int N, class Iter> // Type convertible to key_type
|
||||||
Nth_of_tuple_property_map<N, typename CGAL::value_type_traits<Iter>::type>
|
Nth_of_tuple_property_map<N, typename CGAL::value_type_traits<Iter>::type>
|
||||||
make_nth_of_tuple_property_map(Iter)
|
make_nth_of_tuple_property_map(Iter)
|
||||||
{
|
{
|
||||||
// value_type_traits is a workaround as back_insert_iterator's value_type is void
|
// value_type_traits is a workaround as back_insert_iterator's `value_type` is void
|
||||||
return Nth_of_tuple_property_map<N, typename CGAL::value_type_traits<Iter>::type>();
|
return Nth_of_tuple_property_map<N, typename CGAL::value_type_traits<Iter>::type>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
/// \endcond
|
|
||||||
|
|
||||||
#endif // CGAL_POINT_SET_PROPERTY_MAP_H
|
#endif // CGAL_POINT_SET_PROPERTY_MAP_H
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue