id_translator.hpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // Copyright (C) 2009 Sebastian Redl
3 //
4 // Distributed under the Boost Software License, Version 1.0.
5 // (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //
8 // For more information, see www.boost.org
9 // ----------------------------------------------------------------------------
10 
11 #ifndef BOOST_PROPERTY_TREE_ID_TRANSLATOR_HPP_INCLUDED
12 #define BOOST_PROPERTY_TREE_ID_TRANSLATOR_HPP_INCLUDED
13 
15 
16 #include <boost/optional.hpp>
17 #include <string>
18 
19 namespace boost { namespace property_tree
20 {
21 
23  template <typename T>
25  {
26  typedef T internal_type;
27  typedef T external_type;
28 
29  boost::optional<T> get_value(const T &v) { return v; }
30  boost::optional<T> put_value(const T &v) { return v; }
31  };
32 
33  // This is the default translator whenever you get two equal types.
34  template <typename T>
36  {
38  };
39 
40  // A more specific specialization for std::basic_string. Otherwise,
41  // stream_translator's specialization wins.
42  template <typename Ch, typename Traits, typename Alloc>
43  struct translator_between< std::basic_string<Ch, Traits, Alloc>,
44  std::basic_string<Ch, Traits, Alloc> >
45  {
47  };
48 
49 }}
50 
51 #endif
boost::property_tree::id_translator::external_type
T external_type
Definition: id_translator.hpp:27
T
T
Definition: mem_fn_cc.hpp:25
boost::property_tree::id_translator
Simple implementation of the Translator concept. It does no translation.
Definition: id_translator.hpp:24
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
boost::property_tree::translator_between
Definition: ptree_fwd.hpp:80
boost::property_tree::id_translator::get_value
boost::optional< T > get_value(const T &v)
Definition: id_translator.hpp:29
boost::property_tree::id_translator::internal_type
T internal_type
Definition: id_translator.hpp:26
boost::property_tree::translator_between< T, T >::type
id_translator< T > type
Definition: id_translator.hpp:37
std
boost::property_tree::translator_between< std::basic_string< Ch, Traits, Alloc >, std::basic_string< Ch, Traits, Alloc > >::type
id_translator< std::basic_string< Ch, Traits, Alloc > > type
Definition: id_translator.hpp:46
ptree_fwd.hpp
boost::property_tree::id_translator::put_value
boost::optional< T > put_value(const T &v)
Definition: id_translator.hpp:30
boost::optional
Definition: old_optional_implementation.hpp:646
optional.hpp


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