CGAL 6.1 - CGAL and Boost Property Maps
Loading...
Searching...
No Matches
CGAL::Random_access_property_map< Container > Class Template Reference

#include <CGAL/property_map.h>

Definition

template<typename Container>
class CGAL::Random_access_property_map< Container >

A property map with std::size_t as key-type that can be used to access the i'th element in a container with random access.

Is model of
LvaluePropertyMap constness being than of Container.

Public Types

using Iterator = std::conditional_t< std::is_const< Container >::value, typename Container::const_iterator, typename Container::iterator >
 
typedef std::size_t key_type
 
typedef std::iterator_traits< Iterator >::value_type value_type
 
typedef std::iterator_traits< Iterator >::reference reference
 
typedef boost::lvalue_property_map_tag category
 

Public Member Functions

 Random_access_property_map (Container &container)
 
decltype(auto) operator[] (key_type index) const
 

Friends

reference get (Random_access_property_map map, key_type index)
 
template<class Key >
void put (Random_access_property_map map, Key index, const value_type &value, std::enable_if_t<!std::is_const< Container >::value > *=0)
 

Related Symbols

(Note that these are not member symbols.)

template<class Container >
Random_access_property_map< Container > make_random_access_property_map (Container &container)
 returns Random_access_property_map<Container>(container)
 

Member Typedef Documentation

◆ category

template<typename Container >
typedef boost::lvalue_property_map_tag CGAL::Random_access_property_map< Container >::category

◆ Iterator

template<typename Container >
using CGAL::Random_access_property_map< Container >::Iterator = std::conditional_t<std::is_const<Container>::value, typename Container::const_iterator, typename Container::iterator>

◆ key_type

template<typename Container >
typedef std::size_t CGAL::Random_access_property_map< Container >::key_type

◆ reference

template<typename Container >
typedef std::iterator_traits<Iterator>::reference CGAL::Random_access_property_map< Container >::reference

◆ value_type

template<typename Container >
typedef std::iterator_traits<Iterator>::value_type CGAL::Random_access_property_map< Container >::value_type

Constructor & Destructor Documentation

◆ Random_access_property_map()

template<typename Container >
CGAL::Random_access_property_map< Container >::Random_access_property_map ( Container &  container)

Member Function Documentation

◆ operator[]()

template<typename Container >
decltype(auto) CGAL::Random_access_property_map< Container >::operator[] ( key_type  index) const

Friends And Related Symbol Documentation

◆ get

template<typename Container >
reference get ( Random_access_property_map< Container >  map,
key_type  index 
)
friend

◆ put

template<typename Container >
template<class Key >
void put ( Random_access_property_map< Container >  map,
Key  index,
const value_type value,
std::enable_if_t<!std::is_const< Container >::value > *  = 0 
)
friend