CGAL 6.0 - CGAL and Boost Property Maps
Loading...
Searching...
No Matches
CGAL::Boolean_property_map< Set > Struct Template Reference

#include <CGAL/property_map.h>

Definition

template<class Set>
struct CGAL::Boolean_property_map< Set >

Read-write property map turning a set (such a std::set, boost::unordered_set, std::unordered_set) into a property map associating a Boolean to the value type of the set.

The function get will return true if the key is inside the set and false otherwise. The put function will insert an element in the set if true is passed and erase it otherwise.

Is model of
ReadWritePropertyMap

Public Types

typedef Set::value_type key_type
 
typedef bool value_type
 
typedef bool reference
 
typedef boost::read_write_property_map_tag category
 

Public Member Functions

 Boolean_property_map (Set &set_)
 Constructor taking a copy of the set.
 
 Boolean_property_map ()
 

Public Attributes

Set * set_ptr
 

Friends

bool get (const Boolean_property_map< Set > &pm, const key_type &k)
 
void put (Boolean_property_map< Set > pm, const key_type &k, bool v)
 

Constructor & Destructor Documentation

◆ Boolean_property_map()

template<class Set >
CGAL::Boolean_property_map< Set >::Boolean_property_map ( Set &  set_)

Constructor taking a copy of the set.

Note that set_ must be valid while the property map is in use.