modify_key_adaptor.hpp
Go to the documentation of this file.
1 /* Copyright 2003-2013 Joaquin M Lopez Munoz.
2  * Distributed under the Boost Software License, Version 1.0.
3  * (See accompanying file LICENSE_1_0.txt or copy at
4  * http://www.boost.org/LICENSE_1_0.txt)
5  *
6  * See http://www.boost.org/libs/multi_index for library home page.
7  */
8 
9 #ifndef BOOST_MULTI_INDEX_DETAIL_MODIFY_KEY_ADAPTOR_HPP
10 #define BOOST_MULTI_INDEX_DETAIL_MODIFY_KEY_ADAPTOR_HPP
11 
12 #if defined(_MSC_VER)
13 #pragma once
14 #endif
15 
16 namespace boost{
17 
18 namespace multi_index{
19 
20 namespace detail{
21 
22 /* Functional adaptor to resolve modify_key as a call to modify.
23  * Preferred over compose_f_gx and stuff cause it eliminates problems
24  * with references to references, dealing with function pointers, etc.
25  */
26 
27 template<typename Fun,typename Value,typename KeyFromValue>
29 {
30 
31  modify_key_adaptor(Fun f_,KeyFromValue kfv_):f(f_),kfv(kfv_){}
32 
33  void operator()(Value& x)
34  {
35  f(kfv(x));
36  }
37 
38 private:
39  Fun f;
40  KeyFromValue kfv;
41 };
42 
43 } /* namespace multi_index::detail */
44 
45 } /* namespace multi_index */
46 
47 } /* namespace boost */
48 
49 #endif
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
boost::multi_index::detail::modify_key_adaptor::modify_key_adaptor
modify_key_adaptor(Fun f_, KeyFromValue kfv_)
Definition: modify_key_adaptor.hpp:31
boost::multi_index::detail::modify_key_adaptor
Definition: modify_key_adaptor.hpp:28
f_
F f_
Definition: bind_template.hpp:344
boost::multi_index::detail::modify_key_adaptor::f
Fun f
Definition: modify_key_adaptor.hpp:39
boost::multi_index::detail::modify_key_adaptor::operator()
void operator()(Value &x)
Definition: modify_key_adaptor.hpp:33
boost::multi_index::detail::modify_key_adaptor::kfv
KeyFromValue kfv
Definition: modify_key_adaptor.hpp:40


sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:44:22