2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-22 17:32:55 +00:00

Reduce header interdependencies

[SVN r15242]
This commit is contained in:
uid30600
2002-09-09 20:05:17 +00:00
parent 33ee2a43c5
commit 75a0da31fb
18 changed files with 45 additions and 19 deletions

View File

@@ -6,9 +6,9 @@
#ifndef BACK_REFERENCE_DWA2002510_HPP
# define BACK_REFERENCE_DWA2002510_HPP
# include <boost/python/handle.hpp>
# include <boost/python/object_fwd.hpp>
# include <boost/python/detail/dependent.hpp>
# include <boost/python/detail/raw_pyobject.hpp>
namespace boost { namespace python {

View File

@@ -7,10 +7,12 @@
# define CLASS_DWA200216_HPP
# include <boost/python/class_fwd.hpp>
# include <boost/python/object/class.hpp>
# include <boost/python/bases.hpp>
# include <boost/python/args.hpp>
# include <boost/python/handle.hpp>
# include <boost/python/object/class.hpp>
# include <boost/python/object.hpp>
# include <boost/python/type_id.hpp>
# include <boost/python/detail/member_function_cast.hpp>
# include <boost/python/object/class_converters.hpp>

View File

@@ -10,7 +10,6 @@
# include <boost/python/converter/registered.hpp>
# include <boost/python/converter/registered_pointee.hpp>
# include <boost/python/converter/arg_to_python_base.hpp>
# include <boost/python/converter/object_manager.hpp>
# include <boost/python/to_python_indirect.hpp>
# include <boost/type_traits/cv_traits.hpp>
# include <boost/type_traits/composite_traits.hpp>
@@ -26,6 +25,8 @@
namespace boost { namespace python { namespace converter {
template <class T> struct is_object_manager;
namespace detail
{
BOOST_PYTHON_DECL void throw_no_class_registered();

View File

@@ -6,7 +6,6 @@
#ifndef RETURN_FROM_PYTHON_DWA200265_HPP
# define RETURN_FROM_PYTHON_DWA200265_HPP
# include <boost/python/converter/object_manager.hpp>
# include <boost/python/converter/from_python.hpp>
# include <boost/python/converter/rvalue_from_python_data.hpp>
# include <boost/python/converter/registered.hpp>
@@ -17,6 +16,8 @@
namespace boost { namespace python { namespace converter {
template <class T> struct is_object_manager;
namespace detail
{
template <class T>

View File

@@ -6,6 +6,8 @@
#ifndef VOID_RETURN_DWA200274_HPP
# define VOID_RETURN_DWA200274_HPP
# include <boost/config.hpp>
namespace boost { namespace python { namespace detail {
struct void_return

View File

@@ -8,6 +8,7 @@
# include <boost/python/object/enum_base.hpp>
# include <boost/python/converter/rvalue_from_python_data.hpp>
# include <boost/python/converter/registered.hpp>
namespace boost { namespace python {

View File

@@ -16,6 +16,7 @@
# include <boost/python/detail/void_return.hpp>
# include <boost/python/object_core.hpp>
# include <boost/python/refcount.hpp>
# include <boost/utility.hpp>
namespace boost { namespace python {

View File

@@ -11,6 +11,7 @@
# include <boost/utility.hpp>
# include <boost/python/instance_holder.hpp>
# include <boost/python/object_core.hpp>
# include <boost/python/type_id.hpp>
# include <cstddef>
namespace boost { namespace python {
@@ -24,7 +25,7 @@ struct BOOST_PYTHON_DECL class_base : python::api::object
char const* name // The name of the class
, std::size_t num_types // A list of class_ids. The first is the type
, class_id const*const types // this is wrapping. The rest are the types of
, type_info const*const types // this is wrapping. The rest are the types of
// any bases.
, char const* doc = 0 // Docstring, if any.

View File

@@ -9,6 +9,8 @@
# include <boost/python/object_core.hpp>
# include <boost/python/type_id.hpp>
# include <boost/python/converter/to_python_function_type.hpp>
# include <boost/python/converter/convertible_function.hpp>
# include <boost/python/converter/constructor_function.hpp>
namespace boost { namespace python { namespace objects {

View File

@@ -10,6 +10,11 @@
# include <boost/type_traits/alignment_traits.hpp>
# include <cstddef>
namespace boost { namespace python
{
struct instance_holder;
}} // namespace boost::python
namespace boost { namespace python { namespace objects {
// Each extension instance will be one of these

View File

@@ -9,6 +9,8 @@
# ifndef MAKE_HOLDER_DWA20011215_HPP
# define MAKE_HOLDER_DWA20011215_HPP
# include <boost/python/object/instance.hpp>
# include <boost/python/object/forward.hpp>
# include <boost/python/detail/wrap_python.hpp>
# include <boost/python/detail/preprocessor.hpp>

View File

@@ -6,11 +6,15 @@
#ifndef BOOST_PYTHON_OBJECT_PICKLE_SUPPORT_RWGK20020603_HPP
#define BOOST_PYTHON_OBJECT_PICKLE_SUPPORT_RWGK20020603_HPP
#include <boost/python/tuple.hpp>
#include <boost/python/object_core.hpp>
namespace boost { namespace python {
namespace api
{
class object;
}
using api::object;
class tuple;
BOOST_PYTHON_DECL object const& make_instance_reduce_function();
struct pickle_suite;

View File

@@ -8,13 +8,13 @@
# include <boost/type.hpp>
# include <boost/python/handle.hpp>
# include <boost/python/call.hpp>
# include <boost/python/handle_fwd.hpp>
# include <boost/python/errors.hpp>
# include <boost/python/slice_nil.hpp>
# include <boost/python/detail/raw_pyobject.hpp>
# include <boost/python/refcount.hpp>
# include <boost/python/detail/preprocessor.hpp>
# include <boost/python/converter/object_manager.hpp>
# include <boost/python/tag.hpp>
# include <boost/python/detail/dependent.hpp>
# include <boost/preprocessor/iterate.hpp>
@@ -222,7 +222,7 @@ namespace api
}
// Throw error_already_set() if the handle is null.
explicit object(handle<> const&);
BOOST_PYTHON_DECL explicit object(handle<> const&);
public: // implementation detail -- for internal use only
explicit object(detail::borrowed_reference);
@@ -312,10 +312,6 @@ template <class T> struct extract;
// implementation
//
inline object::object(handle<> const& x)
: object_base(python::incref(python::expect_non_null(x.get())))
{}
inline object::object()
: object_base(python::incref(Py_None))
{}
@@ -364,6 +360,8 @@ inline PyObject* api::object_base::ptr() const
//
namespace converter
{
template <class T> struct object_manager_traits;
template <>
struct object_manager_traits<object>
{

View File

@@ -7,6 +7,7 @@
# define OBJECT_OPERATORS_DWA2002617_HPP
# include <boost/python/object_core.hpp>
# include <boost/python/call.hpp>
namespace boost { namespace python { namespace api {

View File

@@ -9,6 +9,7 @@
# include <boost/python/proxy.hpp>
# include <boost/python/object_core.hpp>
# include <boost/python/object_protocol.hpp>
# include <boost/python/handle.hpp>
# include <utility>
namespace boost { namespace python { namespace api {

View File

@@ -49,5 +49,9 @@ BOOST_PYTHON_INPLACE_OPERATOR(&, And)
BOOST_PYTHON_INPLACE_OPERATOR(^, Xor)
BOOST_PYTHON_INPLACE_OPERATOR(|, Or)
#undef BOOST_PYTHON_INPLACE_OPERATOR
BOOST_PYTHON_DECL object::object(handle<> const& x)
: object_base(python::incref(python::expect_non_null(x.get())))
{}
}}} // namespace boost::python

View File

@@ -5,7 +5,6 @@
// to its suitability for any purpose.
#include <boost/python/class.hpp>
#include <boost/python/module_init.hpp>
#include <boost/python/def.hpp>
#include "test_class.hpp"
#if defined(_AIX) && defined(__EDG_VERSION__) && __EDG_VERSION__ < 245

View File

@@ -6,6 +6,7 @@
#include <boost/python/converter/object_manager.hpp>
#include <boost/python/borrowed.hpp>
#include <boost/static_assert.hpp>
#include <boost/python/handle.hpp>
using namespace boost::python;
using namespace boost::python::converter;