C++ Boost

function_property_map<UnaryFunction, Key, Ref>

This property map is an adaptor that converts a function object into either a Readable Property Map or a Lvalue Property Map. The category of the property map is based on whether the function's return type (as given by Ref) is a non-const reference type.

Where Defined

boost/property_map/function_property_map.hpp

Model Of

Readable Property Map or Lvalue Property Map

Template Parameters

ParameterDescriptionDefault
UnaryFunction Must be a model of Unary Function that accepts an object of type Key as an argument and returns a result of type Ref.  
Key The key type of the property map.  
Ref The result type of the function. boost::result_of<const UnaryFunction(const Key&)>::type

Members

In addition to the methods and functions required by Readable Property Map or Lvalue Property Map, this class has the following members:


property_traits<function_property_map>::value_type
The type Ref with any reference or cv-qualifiers removed.
function_property_map(const UnaryFunction& f = UnaryFunction())
Constructor.

Non-Member functions


  template <class Key, class UnaryFunction>
  function_property_map<UnaryFunction, Key>
  make_function_property_map(const UnaryFunction& f);
Returns a function_property_map using the given function and key type.
  template <class Key, class Ref, class UnaryFunction>
  function_property_map<UnaryFunction, Key, Ref>
  make_function_property_map(const UnaryFunction& f);
Returns a function_property_map using the given function and key and reference types.


Copyright © 2012Trustees of Indiana University