diff -r 000000000000 -r bde4ae8d615e os/ossrv/ossrv_pub/boost_apis/boost/python/object_protocol.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/python/object_protocol.hpp Fri Jun 15 03:10:57 2012 +0200 @@ -0,0 +1,79 @@ +// Copyright David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef OBJECT_PROTOCOL_DWA2002615_HPP +# define OBJECT_PROTOCOL_DWA2002615_HPP + +# include + +# include +# include + +namespace boost { namespace python { namespace api { + +template +object getattr(Target const& target, Key const& key) +{ + return getattr(object(target), object(key)); +} + +template +object getattr(Target const& target, Key const& key, Default const& default_) +{ + return getattr(object(target), object(key), object(default_)); +} + + +template +void setattr(object const& target, Key const& key, Value const& value) +{ + setattr(target, object(key), object(value)); +} + +template +void delattr(object const& target, Key const& key) +{ + delattr(target, object(key)); +} + +template +object getitem(Target const& target, Key const& key) +{ + return getitem(object(target), object(key)); +} + + +template +void setitem(object const& target, Key const& key, Value const& value) +{ + setitem(target, object(key), object(value)); +} + +template +void delitem(object const& target, Key const& key) +{ + delitem(target, object(key)); +} + +template +object getslice(Target const& target, Begin const& begin, End const& end) +{ + return getslice(object(target), object(begin), object(end)); +} + +template +void setslice(object const& target, Begin const& begin, End const& end, Value const& value) +{ + setslice(target, object(begin), object(end), object(value)); +} + +template +void delslice(object const& target, Begin const& begin, End const& end) +{ + delslice(target, object(begin), object(end)); +} + +}}} // namespace boost::python::api + +#endif // OBJECT_PROTOCOL_DWA2002615_HPP