25 #ifndef BOOST_PYTHON_INDEXING_CONTAINER_TRAITS_HPP 26 #define BOOST_PYTHON_INDEXING_CONTAINER_TRAITS_HPP 28 #include <indexing_suite/suite_utils.hpp> 29 #include <indexing_suite/methods.hpp> 30 #include <indexing_suite/value_traits.hpp> 32 #include <boost/type_traits.hpp> 33 #include <boost/call_traits.hpp> 34 #include <boost/mpl/if.hpp> 35 #include <boost/type_traits/ice.hpp> 36 #include <boost/iterator/iterator_traits.hpp> 38 namespace boost {
namespace python {
namespace indexing {
39 #if BOOST_WORKAROUND (BOOST_MSVC, <= 1200) 45 template<
typename T>
struct broken_call_traits {
46 typedef T
const & param_type;
48 # define BOOST_PYTHON_INDEXING_CALL_TRAITS broken_call_traits 50 # define BOOST_PYTHON_INDEXING_CALL_TRAITS ::boost::call_traits 58 template<
typename Container,
typename ValueTraits = detail::no_overr
ide>
64 BOOST_STATIC_CONSTANT(
65 bool, is_mutable = ! boost::is_const<Container>::value);
68 typedef Container container;
70 typedef BOOST_DEDUCED_TYPENAME container::value_type value_type;
72 typedef BOOST_DEDUCED_TYPENAME mpl::if_<
74 BOOST_DEDUCED_TYPENAME container::const_iterator,
75 BOOST_DEDUCED_TYPENAME container::iterator
78 typedef typename ::boost::iterator_reference<iterator>::type reference;
80 typedef value_type key_type;
81 typedef typename container::size_type size_type;
82 typedef typename make_signed<size_type>::type index_type;
85 typedef typename BOOST_PYTHON_INDEXING_CALL_TRAITS<value_type>::param_type
87 typedef typename BOOST_PYTHON_INDEXING_CALL_TRAITS<key_type>::param_type
89 typedef typename BOOST_PYTHON_INDEXING_CALL_TRAITS<index_type>::param_type
96 default_value_traits, ValueTraits>::type value_traits_type;
99 template<
typename PythonClass,
typename Policy>
100 static void visit_container_class(
101 PythonClass &pyClass, Policy
const &policy)
103 value_traits_type::visit_container_class (pyClass, policy);
112 template<
typename Container,
typename ValueTraits = detail::no_overr
ide>
119 typedef typename base_class::value_traits_type value_traits_type;
121 BOOST_STATIC_CONSTANT(
123 supported_methods = (
126 | method_getitem_slice
129 value_traits_type::equality_comparable,
136 base_class::is_mutable,
138 | method_setitem_slice
140 | method_delitem_slice
148 type_traits::ice_and<
149 base_class::is_mutable,
150 value_traits_type::less_than_comparable
162 #endif // BOOST_PYTHON_INDEXING_CONTAINER_SUITE_HPP Definition: value_traits.hpp:34
Definition: methods.hpp:90
Definition: container_traits.hpp:113
Definition: python_CEGUI.h:11
Definition: container_traits.hpp:59
Definition: suite_utils.hpp:97