Skip to content
Snippets Groups Projects
Commit 3ca769bc authored by andreas's avatar andreas
Browse files

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
parent ffcafe95
Branches
Tags
No related merge requests found
Showing
with 31 additions and 26 deletions
......@@ -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>())
;
}
......@@ -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
......
......@@ -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)
......
......@@ -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)
......@@ -7,7 +7,7 @@
Author: Marco Biasini
*/
namespace ost {
namespace geom {
namespace bp=boost::python;
template <typename Container>
......
......@@ -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&>())
......
......@@ -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>())
;
}
......@@ -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>())
;
}
......@@ -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);
}
......
......@@ -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>())
;
}
......@@ -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<>())
......
......@@ -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);
......
......@@ -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<>())
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment