Update contrib.
1 // Copyright David Abrahams 2001.
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5 #ifndef CLASS_DWA20011214_HPP
6 # define CLASS_DWA20011214_HPP
8 # include <boost/python/detail/prefix.hpp>
9 # include <boost/utility.hpp>
10 # include <boost/python/object_core.hpp>
11 # include <boost/python/type_id.hpp>
14 namespace boost { namespace python {
18 struct BOOST_PYTHON_DECL class_base : python::api::object
22 char const* name // The name of the class
24 , std::size_t num_types // A list of class_ids. The first is the type
25 , type_info const*const types // this is wrapping. The rest are the types of
28 , char const* doc = 0 // Docstring, if any.
32 // Implementation detail. Hiding this in the private section would
33 // require use of template friend declarations.
34 void enable_pickling_(bool getstate_manages_dict);
38 char const* name, object const& fget, char const* docstr);
39 void add_property(char const* name,
40 object const& fget, object const& fset, char const* docstr);
42 void add_static_property(char const* name, object const& fget);
43 void add_static_property(char const* name, object const& fget, object const& fset);
45 // Retrieve the underlying object
46 void setattr(char const* name, object const&);
48 // Set a special attribute in the class which tells Boost.Python
49 // to allocate extra bytes for embedded C++ objects in Python
51 void set_instance_size(std::size_t bytes);
53 // Set an __init__ function which throws an appropriate exception
54 // for abstract classes.
58 // setattr(self, staticmethod(getattr(self, method_name)))
59 void make_method_static(const char *method_name);
62 }}} // namespace boost::python::objects
64 #endif // CLASS_DWA20011214_HPP