123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #ifndef BOOST_PROPERTY_TREE_ID_TRANSLATOR_HPP_INCLUDED
- #define BOOST_PROPERTY_TREE_ID_TRANSLATOR_HPP_INCLUDED
- #include <boost/property_tree/ptree_fwd.hpp>
- #include <boost/optional/optional.hpp>
- #include <string>
- namespace boost { namespace property_tree
- {
-
- template <typename T>
- struct id_translator
- {
- typedef T internal_type;
- typedef T external_type;
- boost::optional<T> get_value(const T &v) { return v; }
- boost::optional<T> put_value(const T &v) { return v; }
- };
-
- template <typename T>
- struct translator_between<T, T>
- {
- typedef id_translator<T> type;
- };
-
-
- template <typename Ch, typename Traits, typename Alloc>
- struct translator_between< std::basic_string<Ch, Traits, Alloc>,
- std::basic_string<Ch, Traits, Alloc> >
- {
- typedef id_translator< std::basic_string<Ch, Traits, Alloc> > type;
- };
- }}
- #endif
|