I trying to create an interface wrapper for a class and I get an error:
cannot convert from 'boost::python::detail::method_result' to
'MMOT::Geometry &'
The code is like this:
struct SelectQueryWrap : SelectQuery, wrapper<SelectQuery>
{
bool queryNodeBefore(QueryContext* context, OctreeNode *node, const
AABBox& region)
{
return this->get_override("queryNodeBefore")(context, node, region);
}
// removed working members
// >>>>>>>>>>>>>>>>>>>>> this failes <<<<<<<<<<<<<<<<<<<
Geometry& getGeometry()
{
return this->get_override("getGeometry")();
}
};
Geometry is another wrapped interface which is working fine and is defined
like so:
struct GeometryWrap : Geometry, wrapper<Geometry>
{
int intersectNode(const MMOT::AABBox &box)
{
return this->get_override("intersectNode")(box);
}
float volume() const
{
return this->get_override("volume")();
}
void prepare()
{
if (override prepare = this->get_override("prepare"))
prepare();
else
Geometry::prepare();
}
void default_prepare() { this->Geometry::prepare(); }
};
I'm a bit lost here. Can't I return a reference to the object or is my
wrapping getting too convoluted (well something is wrong anyway)?
Any help appreciated.
Freyr
_______________________________________________
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig