File indexing completed on 2025-01-18 09:50:18
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_PROPERTY_TREE_ID_TRANSLATOR_HPP_INCLUDED
0012 #define BOOST_PROPERTY_TREE_ID_TRANSLATOR_HPP_INCLUDED
0013
0014 #include <boost/property_tree/ptree_fwd.hpp>
0015
0016 #include <boost/optional/optional.hpp>
0017 #include <string>
0018
0019 namespace boost { namespace property_tree
0020 {
0021
0022
0023 template <typename T>
0024 struct id_translator
0025 {
0026 typedef T internal_type;
0027 typedef T external_type;
0028
0029 boost::optional<T> get_value(const T &v) { return v; }
0030 boost::optional<T> put_value(const T &v) { return v; }
0031 };
0032
0033
0034 template <typename T>
0035 struct translator_between<T, T>
0036 {
0037 typedef id_translator<T> type;
0038 };
0039
0040
0041
0042 template <typename Ch, typename Traits, typename Alloc>
0043 struct translator_between< std::basic_string<Ch, Traits, Alloc>,
0044 std::basic_string<Ch, Traits, Alloc> >
0045 {
0046 typedef id_translator< std::basic_string<Ch, Traits, Alloc> > type;
0047 };
0048
0049 }}
0050
0051 #endif