From 3ca769bc968a4fbc688b853a153af686a7dd233a Mon Sep 17 00:00:00 2001 From: andreas <andreas@localhost.localdomain> Date: Tue, 12 Apr 2011 12:30:30 -0400 Subject: [PATCH] moved vector export helper to geom the vector export helper had to be moved to geom because otherwise the geom export depends on base whose headers might not be staged at the time of the compilation of the geom exports --- modules/base/pymod/wrap_base.cc | 6 +++--- modules/base/src/CMakeLists.txt | 1 - modules/geom/pymod/export_vec3.cc | 4 ++-- modules/geom/src/CMakeLists.txt | 8 +++++++- modules/{base => geom}/src/export_helper/vector.hh | 2 +- modules/gfx/pymod/export_gfx_node.cc | 4 ++-- modules/mol/base/pymod/export_atom.cc | 4 ++-- modules/mol/base/pymod/export_atom_view.cc | 4 ++-- modules/mol/base/pymod/export_bond.cc | 4 ++-- modules/mol/base/pymod/export_chain.cc | 4 ++-- modules/mol/base/pymod/export_chain_view.cc | 4 ++-- modules/mol/base/pymod/export_residue.cc | 4 ++-- modules/mol/base/pymod/export_residue_view.cc | 4 ++-- modules/mol/base/pymod/export_surface.cc | 4 ++-- 14 files changed, 31 insertions(+), 26 deletions(-) rename modules/{base => geom}/src/export_helper/vector.hh (98%) diff --git a/modules/base/pymod/wrap_base.cc b/modules/base/pymod/wrap_base.cc index 735cb8323..59c5a2333 100644 --- a/modules/base/pymod/wrap_base.cc +++ b/modules/base/pymod/wrap_base.cc @@ -19,7 +19,7 @@ #include <boost/python.hpp> #include <boost/python/suite/indexing/vector_indexing_suite.hpp> #include <vector> -#include <ost/export_helper/vector.hh> +#include <ost/geom/export_helper/vector.hh> #include <ost/base.hh> #include <ost/platform.hh> #include <ost/message.hh> @@ -56,7 +56,7 @@ BOOST_PYTHON_MODULE(_base) typedef std::vector<Real> FloatList; class_<FloatList>("FloatList", init<>()) .def(vector_indexing_suite<FloatList>()) - .def(ost::VectorAdditions<FloatList>()) + .def(geom::VectorAdditions<FloatList>()) ; class_<std::vector<String> >("StringList", init<>()) @@ -66,6 +66,6 @@ BOOST_PYTHON_MODULE(_base) typedef std::vector<int> IntList; class_<std::vector<int> >("IntList", init<>()) .def(vector_indexing_suite<std::vector<int> >()) - .def(ost::VectorAdditions<IntList>()) + .def(geom::VectorAdditions<IntList>()) ; } diff --git a/modules/base/src/CMakeLists.txt b/modules/base/src/CMakeLists.txt index 4836b0896..682f926e5 100644 --- a/modules/base/src/CMakeLists.txt +++ b/modules/base/src/CMakeLists.txt @@ -35,7 +35,6 @@ tri_matrix.hh set(OST_EXPORT_HELPERS generic_property_def.hh pair_to_tuple_conv.hh -vector.hh ) module(NAME base SOURCES ${OST_BASE_SOURCES} HEADERS ${OST_EXPORT_HELPERS} IN_DIR export_helper diff --git a/modules/geom/pymod/export_vec3.cc b/modules/geom/pymod/export_vec3.cc index 6966015e2..ce7704ddf 100644 --- a/modules/geom/pymod/export_vec3.cc +++ b/modules/geom/pymod/export_vec3.cc @@ -20,7 +20,7 @@ #include <boost/python/suite/indexing/vector_indexing_suite.hpp> #include <ost/geom/vec3.hh> #include <ost/geom/geom.hh> -#include <ost/export_helper/vector.hh> +#include <ost/geom/export_helper/vector.hh> using namespace boost::python; @@ -77,7 +77,7 @@ void export_Vec3() class_<Vec3List>("Vec3List", init<>()) .def(vector_indexing_suite<Vec3List>()) - .def(ost::VectorAdditions<Vec3List>()) + .def(geom::VectorAdditions<Vec3List>()) .add_property("center", &Vec3List::GetCenter) .add_property("inertia", &Vec3List::GetInertia) .add_property("principal_axes", &Vec3List::GetPrincipalAxes) diff --git a/modules/geom/src/CMakeLists.txt b/modules/geom/src/CMakeLists.txt index deb888dfd..b20b7d243 100644 --- a/modules/geom/src/CMakeLists.txt +++ b/modules/geom/src/CMakeLists.txt @@ -47,7 +47,13 @@ aligned_cuboid.cc point_cloud.cc ) -module(NAME geom SOURCES ${OST_GEOM_SOURCES} HEADERS ${OST_GEOM_HEADERS} +set(OST_GEOM_EXPORT_HELPERS +vector.hh +) + +module(NAME geom + HEADERS ${OST_GEOM_EXPORT_HELPERS} IN_DIR export_helper ${OST_GEOM_HEADERS} + SOURCES ${OST_GEOM_SOURCES} LINK ${BOOST_LIBRARIES}) add_dependencies(ost_geom ost_config) diff --git a/modules/base/src/export_helper/vector.hh b/modules/geom/src/export_helper/vector.hh similarity index 98% rename from modules/base/src/export_helper/vector.hh rename to modules/geom/src/export_helper/vector.hh index 68409cc2b..7de572795 100644 --- a/modules/base/src/export_helper/vector.hh +++ b/modules/geom/src/export_helper/vector.hh @@ -7,7 +7,7 @@ Author: Marco Biasini */ -namespace ost { +namespace geom { namespace bp=boost::python; template <typename Container> diff --git a/modules/gfx/pymod/export_gfx_node.cc b/modules/gfx/pymod/export_gfx_node.cc index 0ee0ec5a6..9a1ed0c5e 100644 --- a/modules/gfx/pymod/export_gfx_node.cc +++ b/modules/gfx/pymod/export_gfx_node.cc @@ -21,7 +21,7 @@ using namespace boost::python; -#include <ost/export_helper/vector.hh> +#include <ost/geom/export_helper/vector.hh> #include <ost/gfx/gfx_node.hh> @@ -41,7 +41,7 @@ void export_GfxNode() class_<GfxNodeVector>("GfxNodeList", init<>()) .def(vector_indexing_suite<GfxNodeVector, true>()) - .def(ost::VectorAdditions<GfxNodeVector>()) + .def(geom::VectorAdditions<GfxNodeVector>()) ; class_<GfxNode, GfxNodeP, boost::noncopyable>("GfxNode", init<const String&>()) diff --git a/modules/mol/base/pymod/export_atom.cc b/modules/mol/base/pymod/export_atom.cc index 8aa81ce4e..42e18e0ce 100644 --- a/modules/mol/base/pymod/export_atom.cc +++ b/modules/mol/base/pymod/export_atom.cc @@ -27,7 +27,7 @@ using namespace ost; using namespace ost::mol; #include <ost/export_helper/generic_property_def.hh> -#include <ost/export_helper/vector.hh> +#include <ost/geom/export_helper/vector.hh> namespace { ChainHandle get_chain(AtomHandle& a) @@ -109,7 +109,7 @@ void export_Atom() class_<AtomHandleList>("AtomHandleList", no_init) .def(vector_indexing_suite<AtomHandleList>()) - .def(ost::VectorAdditions<AtomHandleList>()) + .def(geom::VectorAdditions<AtomHandleList>()) ; } diff --git a/modules/mol/base/pymod/export_atom_view.cc b/modules/mol/base/pymod/export_atom_view.cc index ca5d6f892..7f38fc562 100644 --- a/modules/mol/base/pymod/export_atom_view.cc +++ b/modules/mol/base/pymod/export_atom_view.cc @@ -22,7 +22,7 @@ using namespace boost::python; #include <ost/mol/mol.hh> -#include <ost/export_helper/vector.hh> +#include <ost/geom/export_helper/vector.hh> using namespace ost; using namespace ost::mol; @@ -57,7 +57,7 @@ void export_AtomView() ; class_<AtomViewList>("AtomViewList", init<>()) .def(vector_indexing_suite<AtomViewList>()) - .def(ost::VectorAdditions<AtomViewList>()) + .def(geom::VectorAdditions<AtomViewList>()) ; } diff --git a/modules/mol/base/pymod/export_bond.cc b/modules/mol/base/pymod/export_bond.cc index 57670b4f6..f78455b16 100644 --- a/modules/mol/base/pymod/export_bond.cc +++ b/modules/mol/base/pymod/export_bond.cc @@ -28,7 +28,7 @@ using namespace ost; using namespace ost::mol; #include <ost/export_helper/generic_property_def.hh> -#include <ost/export_helper/vector.hh> +#include <ost/geom/export_helper/vector.hh> void export_Bond() { @@ -59,7 +59,7 @@ void export_Bond() generic_prop_def<BondHandle>(bond_handle); class_<BondHandleList>("BondHandleList", no_init) .def(vector_indexing_suite<BondHandleList>()) - .def(ost::VectorAdditions<BondHandleList>()) + .def(geom::VectorAdditions<BondHandleList>()) ; def("BondExists", &BondExists); } diff --git a/modules/mol/base/pymod/export_chain.cc b/modules/mol/base/pymod/export_chain.cc index 32bb4c37f..8a4cb3552 100644 --- a/modules/mol/base/pymod/export_chain.cc +++ b/modules/mol/base/pymod/export_chain.cc @@ -21,7 +21,7 @@ using namespace boost::python; #include <ost/mol/mol.hh> -#include <ost/export_helper/vector.hh> +#include <ost/geom/export_helper/vector.hh> using namespace ost; using namespace ost::mol; #include <ost/export_helper/generic_property_def.hh> @@ -101,6 +101,6 @@ void export_Chain() class_<ChainHandleList>("ChainHandleList", no_init) .def(vector_indexing_suite<ChainHandleList>()) - .def(ost::VectorAdditions<ChainHandleList>()) + .def(geom::VectorAdditions<ChainHandleList>()) ; } diff --git a/modules/mol/base/pymod/export_chain_view.cc b/modules/mol/base/pymod/export_chain_view.cc index 388844272..e8c54c9a4 100644 --- a/modules/mol/base/pymod/export_chain_view.cc +++ b/modules/mol/base/pymod/export_chain_view.cc @@ -24,7 +24,7 @@ using namespace boost::python; #include <ost/mol/query.hh> #include <ost/mol/chain_handle.hh> #include <ost/mol/entity_visitor.hh> -#include <ost/export_helper/vector.hh> +#include <ost/geom/export_helper/vector.hh> using namespace ost; using namespace ost::mol; #include "bounds.hh" @@ -59,7 +59,7 @@ void export_ChainView() { class_<ChainViewList>("ChainViewList", no_init) .def(vector_indexing_suite<ChainViewList>()) - .def(ost::VectorAdditions<ChainViewList>()) + .def(geom::VectorAdditions<ChainViewList>()) ; class_<ChainView, bases<ChainBase> >("ChainView", init<>()) diff --git a/modules/mol/base/pymod/export_residue.cc b/modules/mol/base/pymod/export_residue.cc index e91f76917..12869d2e7 100644 --- a/modules/mol/base/pymod/export_residue.cc +++ b/modules/mol/base/pymod/export_residue.cc @@ -22,7 +22,7 @@ using namespace boost::python; #include <ost/mol/chem_class.hh> #include <ost/mol/mol.hh> -#include <ost/export_helper/vector.hh> +#include <ost/geom/export_helper/vector.hh> using namespace ost; using namespace ost::mol; @@ -203,7 +203,7 @@ void export_Residue() class_<ResidueHandleList>("ResidueHandleList", no_init) .def(vector_indexing_suite<ResidueHandleList>()) - .def(ost::VectorAdditions<ResidueHandleList>()) + .def(geom::VectorAdditions<ResidueHandleList>()) ; def("InSequence", &InSequence); diff --git a/modules/mol/base/pymod/export_residue_view.cc b/modules/mol/base/pymod/export_residue_view.cc index e87520e12..699dbe34e 100644 --- a/modules/mol/base/pymod/export_residue_view.cc +++ b/modules/mol/base/pymod/export_residue_view.cc @@ -22,7 +22,7 @@ using namespace boost::python; #include <ost/mol/mol.hh> -#include <ost/export_helper/vector.hh> +#include <ost/geom/export_helper/vector.hh> using namespace ost; using namespace ost::mol; #include "bounds.hh" @@ -49,7 +49,7 @@ void export_ResidueView() { class_<ResidueViewList>("ResidueViewList", no_init) .def(vector_indexing_suite<ResidueViewList>()) - .def(ost::VectorAdditions<ResidueViewList>()) + .def(geom::VectorAdditions<ResidueViewList>()) ; class_<ResidueView, bases<ResidueBase> >("ResidueView", init<>()) diff --git a/modules/mol/base/pymod/export_surface.cc b/modules/mol/base/pymod/export_surface.cc index 9d650e15f..874ab51d5 100644 --- a/modules/mol/base/pymod/export_surface.cc +++ b/modules/mol/base/pymod/export_surface.cc @@ -25,7 +25,7 @@ using namespace boost::python; #include <ost/mol/entity_handle.hh> #include <ost/mol/impl/surface_impl.hh> -#include <ost/export_helper/vector.hh> +#include <ost/geom/export_helper/vector.hh> using namespace ost; using namespace ost::mol; @@ -68,7 +68,7 @@ void export_Surface() class_<SurfaceHandleList>("SurfaceHandleList", init<>()) .def(vector_indexing_suite<SurfaceHandleList>()) - .def(ost::VectorAdditions<SurfaceHandleList>()) + .def(geom::VectorAdditions<SurfaceHandleList>()) ; def("CreateSurface",create1); -- GitLab