Commit 72913431 authored by Roland Levillain's avatar Roland Levillain
Browse files

Make Swilena compatible with SWIG 2.0.9+.

	* image2d.ixx,
	* neighb2d.i,
	* window2d.i:
	Give names to wrapped base classes, so that recent version of SWIG
	actually considers them and allows upcasts.
parent 6b8ee78a
2014-05-23 Roland Levillain <roland@lrde.epita.fr>
Make Swilena compatible with SWIG 2.0.9+.
* image2d.ixx,
* neighb2d.i,
* window2d.i:
Give names to wrapped base classes, so that recent version of SWIG
actually considers them and allows upcasts.
2014-05-22 Roland Levillain <roland@lrde.epita.fr>
Address Clang warnings in Swilena.
......
// -*- C++ -*-
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2010, 2014 EPITA Research and Development
// Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -82,12 +82,10 @@
}
}
// Instantiate base classes of mln::image2d<T> so that Swig knows it
// derives from mln::Image.
%template() mln::Image< mln::image2d< int > >;
%template() mln::internal::image_checked_< mln::image2d< T > >;
%template() mln::internal::image_base< T, mln::box2d, mln::image2d< T > >;
%template() mln::internal::image_primary< T, mln::box2d, mln::image2d< T > >;
// Instantiate mln::image2d<T>
// Instantiate mln::image2d<T> and its (directly useful) base classes.
%template(Image_ ## I) mln::Image< mln::image2d< T > >;
%template(image_checked_ ## I) mln::internal::image_checked_< mln::image2d< T > >;
%template(image_base_ ## I) mln::internal::image_base< T, mln::box2d, mln::image2d< T > >;
%template(image_primary_ ## I) mln::internal::image_primary< T, mln::box2d, mln::image2d< T > >;
%template(I) mln::image2d< T >;
%enddef // !instantiate_image2d
// -*- C++ -*-
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2014 EPITA Research and Development
// Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -57,37 +58,37 @@
const typename mln::dpoint<mln::grid::square,mln::def::coord>::coord&,
const typename mln::dpoint<mln::grid::square,mln::def::coord>::coord&);
// Instantiate base classes of mln::neighb2d so that Swig knows it
// derives from mln::Neighborhood.
%template() mln::Neighborhood<
// Instantiate mln::neighb2d and its (directly useful) base classes.
%template(Neighborhood_neighb2d) mln::Neighborhood<
mln::neighb<
mln::window< mln::dpoint< mln::grid::square,mln::def::coord > >
mln::window< mln::dpoint< mln::grid::square, mln::def::coord > >
>
>;
%template() mln::internal::neighborhood_extra_impl<
%template(neighborhood_extra_impl_neighb2d) mln::internal::neighborhood_extra_impl<
mln::window< mln::dpoint< mln::grid::square, mln::def::coord > >,
mln::neighb<
mln::window< mln::dpoint< mln::grid::square, mln::def::coord > >
>
>;
%template() mln::internal::neighborhood_impl<
%template(neighborhood_impl_neighb2d) mln::internal::neighborhood_impl<
mln::window< mln::dpoint< mln::grid::square, mln::def::coord > >,
mln::neighb<
mln::window< mln::dpoint< mln::grid::square, mln::def::coord > >
>
>;
%template() mln::internal::neighborhood_base<
%template(neighborhood_base_neighb2d) mln::internal::neighborhood_base<
mln::window< mln::dpoint< mln::grid::square, mln::def::coord > >,
mln::neighb<
mln::window< mln::dpoint< mln::grid::square, mln::def::coord > >
>
>;
%template() mln::internal::neighb_base<
%template(neighb_base_neighb2d) mln::internal::neighb_base<
mln::window< mln::dpoint< mln::grid::square, mln::def::coord > >,
mln::neighb<
mln::window< mln::dpoint< mln::grid::square, mln::def::coord > >
>
>;
// Instantiate mln::neighb2d.
%template(neighb2d)
mln::neighb< mln::window < mln::dpoint< mln::grid::square, mln::def::coord > > >;
mln::neighb<
mln::window < mln::dpoint< mln::grid::square, mln::def::coord > >
>;
// -*- C++ -*-
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2014 EPITA Research and Development
// Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -68,12 +69,10 @@ insert(const typename mln::dpoint<mln::grid::square, mln::def::coord>::coord&,
}
}
// Instantiate base classes of mln::window2d so that Swig knows it
// derives from mln::Window.
%template() mln::internal::window_base<
// Instantiate mln::window2d and its base class.
%template(Window_window2d) mln::internal::window_base<
mln::dpoint<mln::grid::square, mln::def::coord >,
mln::window< mln::dpoint<mln::grid::square, mln::def::coord > >
>;
// Instantiate mln::window2d.
%template(window2d)
mln::window< mln::dpoint<mln::grid::square,mln::def::coord > >;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment