sl@0: // Copyright David Abrahams 2002. sl@0: // Distributed under the Boost Software License, Version 1.0. (See sl@0: // accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: #ifndef OBJECT_PROTOCOL_DWA2002615_HPP sl@0: # define OBJECT_PROTOCOL_DWA2002615_HPP sl@0: sl@0: # include sl@0: sl@0: # include sl@0: # include sl@0: sl@0: namespace boost { namespace python { namespace api { sl@0: sl@0: template sl@0: object getattr(Target const& target, Key const& key) sl@0: { sl@0: return getattr(object(target), object(key)); sl@0: } sl@0: sl@0: template sl@0: object getattr(Target const& target, Key const& key, Default const& default_) sl@0: { sl@0: return getattr(object(target), object(key), object(default_)); sl@0: } sl@0: sl@0: sl@0: template sl@0: void setattr(object const& target, Key const& key, Value const& value) sl@0: { sl@0: setattr(target, object(key), object(value)); sl@0: } sl@0: sl@0: template sl@0: void delattr(object const& target, Key const& key) sl@0: { sl@0: delattr(target, object(key)); sl@0: } sl@0: sl@0: template sl@0: object getitem(Target const& target, Key const& key) sl@0: { sl@0: return getitem(object(target), object(key)); sl@0: } sl@0: sl@0: sl@0: template sl@0: void setitem(object const& target, Key const& key, Value const& value) sl@0: { sl@0: setitem(target, object(key), object(value)); sl@0: } sl@0: sl@0: template sl@0: void delitem(object const& target, Key const& key) sl@0: { sl@0: delitem(target, object(key)); sl@0: } sl@0: sl@0: template sl@0: object getslice(Target const& target, Begin const& begin, End const& end) sl@0: { sl@0: return getslice(object(target), object(begin), object(end)); sl@0: } sl@0: sl@0: template sl@0: void setslice(object const& target, Begin const& begin, End const& end, Value const& value) sl@0: { sl@0: setslice(target, object(begin), object(end), object(value)); sl@0: } sl@0: sl@0: template sl@0: void delslice(object const& target, Begin const& begin, End const& end) sl@0: { sl@0: delslice(target, object(begin), object(end)); sl@0: } sl@0: sl@0: }}} // namespace boost::python::api sl@0: sl@0: #endif // OBJECT_PROTOCOL_DWA2002615_HPP