Commit 8d0886b4 authored by Roland Levillain's avatar Roland Levillain
Browse files

Adjust virtual types class names.

	* oln/core/abstract/image.hh,
	* oln/core/abstract/image_dimension.hh,
	* oln/core/abstract/image_typeness.hh,
	* oln/core/abstract/grid.hh, oln/core/1d/grid1d.hh,
	* oln/core/2d/grid2d.hh, oln/core/3d/grid3d.hh,
	* tests/image_entry.cc (vtypes): Rename as...
	(vtypes_in_category): ...this.
	* oln/core/abstract/image.hh, oln/core/abstract/grid.hh,
	* tests/image_entry.cc (packed_vtypes): Rename as...
	(packed_vtypes_in_category): ...this.

	* oln/core/abstract/point.hh, oln/core/abstract/dpoint.hh,
	* oln/core/abstract/piter.hh, oln/core/abstract/pset.hh,
	* oln/core/gen/bbox.hh,
	* oln/core/gen/bkd_piter.hh, oln/core/gen/fwd_piter.hh,
	* oln/core/2d/point2d.hh, oln/core/2d/dpoint2d.hh (vtypes_):
	Rename as...
	(vtypes).
	* oln/core/abstract/pset.hh, oln/core/abstract/bbox.hh
	(ext_vtype_): Rename as...
	(ext_vtype): ...this.


git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@521 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent d326e99b
2006-09-04 Roland Levillain <roland@lrde.epita.fr>
Adjust virtual types class names.
* oln/core/abstract/image.hh,
* oln/core/abstract/image_dimension.hh,
* oln/core/abstract/image_typeness.hh,
* oln/core/abstract/grid.hh, oln/core/1d/grid1d.hh,
* oln/core/2d/grid2d.hh, oln/core/3d/grid3d.hh,
* tests/image_entry.cc (vtypes): Rename as...
(vtypes_in_category): ...this.
* oln/core/abstract/image.hh, oln/core/abstract/grid.hh,
* tests/image_entry.cc (packed_vtypes): Rename as...
(packed_vtypes_in_category): ...this.
* oln/core/abstract/point.hh, oln/core/abstract/dpoint.hh,
* oln/core/abstract/piter.hh, oln/core/abstract/pset.hh,
* oln/core/gen/bbox.hh,
* oln/core/gen/bkd_piter.hh, oln/core/gen/fwd_piter.hh,
* oln/core/2d/point2d.hh, oln/core/2d/dpoint2d.hh (vtypes_):
Rename as...
(vtypes).
* oln/core/abstract/pset.hh, oln/core/abstract/bbox.hh
(ext_vtype_): Rename as...
(ext_vtype): ...this.
2006-09-04 Thierry GERAUD <theo@tegucigalpa.lrde.epita.fr>
Test how to define derived associated types in bbox hierarchy.
......
......@@ -47,7 +47,7 @@ namespace oln
/// Virtual types associated to oln::grid1d.
template <>
struct vtypes<category::grid, grid1d>
struct vtypes_in_category<category::grid, grid1d>
{
typedef point1d point_type;
typedef dpoint1d dpoint_type;
......
......@@ -47,7 +47,7 @@ namespace oln
/// Virtual types associated to oln::abstract::image.
template <typename C>
struct vtypes_< dpoint2d_<C> >
struct vtypes< dpoint2d_<C> >
{
typedef grid2d grid_type;
typedef point2d point_type;
......
......@@ -47,7 +47,7 @@ namespace oln
/// Virtual types associated to oln::grid2d.
template <>
struct vtypes<category::grid, grid2d>
struct vtypes_in_category<category::grid, grid2d>
{
typedef point2d point_type;
typedef dpoint2d dpoint_type;
......
......@@ -45,7 +45,7 @@ namespace oln
/// Virtual types associated to oln::abstract::image.
template <typename C>
struct vtypes_< point2d_<C> >
struct vtypes< point2d_<C> >
{
typedef grid2d grid_type;
typedef dpoint2d dpoint_type;
......
......@@ -47,7 +47,7 @@ namespace oln
/// Virtual types associated to oln::grid3d.
template <>
struct vtypes<category::grid, grid3d>
struct vtypes_in_category<category::grid, grid3d>
{
typedef point3d point_type;
typedef dpoint3d dpoint_type;
......
......@@ -54,7 +54,7 @@ namespace oln
template <typename E>
struct ext_vtype_< abstract::bbox<E>, typedef_::fwd_piter_type >
struct ext_vtype< abstract::bbox<E>, typedef_::fwd_piter_type >
{
private:
typedef oln_type_of(E, point) P;
......@@ -63,7 +63,7 @@ namespace oln
};
template <typename E>
struct ext_vtype_< abstract::bbox<E>, typedef_::bkd_piter_type >
struct ext_vtype< abstract::bbox<E>, typedef_::bkd_piter_type >
{
private:
typedef oln_type_of(E, point) P;
......
......@@ -52,7 +52,7 @@ namespace oln
/// Virtual types associated to abstract::dpoint<E>.
template <typename E>
struct vtypes_< abstract::dpoint<E> >
struct vtypes< abstract::dpoint<E> >
{
typedef mlc::undefined grid_type;
typedef mlc::undefined point_type;
......
......@@ -59,7 +59,7 @@ namespace oln {
/// Virtual types associated to oln::abstract::image.
template <typename G>
struct vtypes< category::grid, abstract::grid<G> >
struct vtypes_in_category< category::grid, abstract::grid<G> >
{
typedef mlc::undefined point_type;
typedef mlc::none dpoint_type;
......@@ -70,7 +70,7 @@ namespace oln {
template <typename G>
struct packed_vtypes<category::grid, G>
struct packed_vtypes_in_category<category::grid, G>
{
typedef oln_grd_type_of(G, point) point_type;
typedef oln_grd_type_of(G, dpoint) dpoint_type;
......@@ -81,7 +81,7 @@ namespace oln {
static void echo(std::ostream& ostr)
{
ostr
<< "vtypes(oln::category::grid, " << mlc_to_string(G) << ") ="
<< "vtypes_in_category(oln::category::grid, " << mlc_to_string(G) << ") ="
<< std::endl
<< "{" << std::endl
<< " point_type = " << mlc_to_string(point_type) << std::endl
......@@ -114,7 +114,7 @@ namespace oln {
~grid()
{
packed_vtypes<category::grid, E>::ensure();
packed_vtypes_in_category<category::grid, E>::ensure();
}
};
......
......@@ -57,7 +57,7 @@ namespace oln {
/// Virtual types associated to oln::abstract::image.
template <typename I>
struct vtypes< category::image, abstract::image<I> >
struct vtypes_in_category< category::image, abstract::image<I> >
{
typedef I exact_type;
......@@ -96,9 +96,10 @@ namespace oln {
/// Packing of the virtual types of any image class.
template <typename I>
struct packed_vtypes<category::image, I>
struct packed_vtypes_in_category<category::image, I>
{
// Internally defined virtual types.
/// Virtual types defined internally.
/// \{
typedef oln_type_of(I, exact) exact_type;
typedef oln_type_of(I, grid) grid_type;
......@@ -133,16 +134,20 @@ namespace oln {
// typedef oln_type_of(I, image_constness) image_constness_type;
// typedef oln_type_of(I, image_rawness) image_rawness_type;
// --------------------------------------------------------------------
/// \}
// Defined externally virtual types.
/// Virtual types defined as extensions.
/// \{
typedef oln_type_of(I, image_dimension) image_dimension_type;
typedef oln_type_of(I, image_typeness) image_typeness_type;
/// \}
/// Pretty-printing.
static void echo(std::ostream& ostr)
{
ostr
<< "vtypes_of(oln::category::image, " << mlc_to_string(I) << ") ="
<< "vtypes_in_category(oln::category::image, "
<< mlc_to_string(I) << ") ="
<< std::endl
<< "{" << std::endl
<< " exact_type = " << mlc_to_string(exact_type) << std::endl
......@@ -441,7 +446,7 @@ namespace oln
virtual ~image()
{
packed_vtypes<category::image, E>::ensure();
packed_vtypes_in_category<category::image, E>::ensure();
// FIXME: static check fails because "pointer to member conversion via virtual base"...
// mlc_check_method_impl(E, const size_type&, size, , const);
// mlc_check_method_impl(E, unsigned long, npoints, , const);
......
......@@ -184,18 +184,18 @@ namespace oln
/*----------------------------------.
| Dimension external virtual type. |
| Dimension extended virtual type. |
`----------------------------------*/
// FIXME: Is this external vtype really useful?
// FIXME: Is this extended vtype really useful?
namespace oln
{
/// Image dimension type as an external vtype of abstract::image.
/// Image dimension type as an extended vtype of abstract::image.
template <typename I>
struct ext_vtype< category::image,
abstract::image<I>,
// FIXME: Get rid of this typedef_:: qualifier.
typedef_::image_dimension_type >
struct ext_vtype_in_category< category::image,
abstract::image<I>,
// FIXME: Get rid of this typedef_:: qualifier.
typedef_::image_dimension_type >
{
// Use the same switch as the one use in the inheritance-plugging
// mechanism above.
......
......@@ -252,7 +252,7 @@ namespace oln
{
// Definition of the super class corresponding to this case.
typedef stc::abstraction_as_type<abstract::binary_image> super_type;
// Definition of the external virtual type (same as the super
// Definition of the extended virtual type (same as the super
// class in this case).
typedef super_type image_typeness_type;
};
......@@ -270,7 +270,7 @@ namespace oln
// abstract::grey_level_image and abstract::not_binary_image).
typedef stc::abstraction_as_type<abstract::internal::grey_level_image_>
super_type;
// Definition of the external virtual type.
// Definition of the extended virtual type.
typedef stc::abstraction_as_type<abstract::grey_level_image>
image_typeness_type;
};
......@@ -289,7 +289,7 @@ namespace oln
// abstract::data_image and abstract::not_binary_image).
typedef stc::abstraction_as_type<abstract::internal::data_image_>
super_type;
// Definition of the external virtual type.
// Definition of the extended virtual type.
typedef stc::abstraction_as_type<abstract::data_image>
image_typeness_type;
};
......@@ -300,21 +300,21 @@ namespace oln
/*---------------------------------.
| Typeness external virtual type. |
| Typeness extended virtual type. |
`---------------------------------*/
// FIXME: Is this external vtype really useful?
// FIXME: Is this extended vtype really useful?
namespace oln
{
/// Image ``typeness'' as an external vtype of abstract::image.
/// Image ``typeness'' as an extended vtype of abstract::image.
template <typename I>
struct ext_vtype< category::image,
abstract::image<I>,
// FIXME: Get rid of this typedef_:: qualifier.
typedef_::image_typeness_type >
struct ext_vtype_in_category< category::image,
abstract::image<I>,
// FIXME: Get rid of this typedef_:: qualifier.
typedef_::image_typeness_type >
{
// Use the same case as the one use in the inheritance-plugging
// mechanism above, but retrieve the external vtype
// mechanism above, but retrieve the extended vtype
// (image_typename_type), not the super type.
typedef
typename oln::case_< oln::value_type_tag,
......
......@@ -104,7 +104,7 @@ namespace oln {
{
// Definition of the super class corresponding to this case.
typedef stc::abstraction_as_type<abstract::binary_image> super_type;
// Definition of the external virtual type (same as the super
// Definition of the extended virtual type (same as the super
// class in this case).
typedef super_type image_typeness_type;
};
......@@ -120,7 +120,7 @@ namespace oln {
typedef
stc::abstraction_as_type<abstract::internal::grey_level_image_>
super_type;
// Definition of the external virtual type.
// Definition of the extended virtual type.
typedef stc::abstraction_as_type<abstract::grey_level_image>
image_typeness_type;
};
......@@ -135,7 +135,7 @@ namespace oln {
// abstract::label_image and abstract::not_binary_image).
typedef stc::abstraction_as_type<abstract::internal::label_image_>
super_type;
// Definition of the external virtual type.
// Definition of the extended virtual type.
typedef stc::abstraction_as_type<abstract::label_image>
image_typeness_type;
};
......@@ -150,7 +150,7 @@ namespace oln {
// abstract::color_image and abstract::not_binary_image).
typedef stc::abstraction_as_type<abstract::internal::color_image_>
super_type;
// Definition of the external virtual type.
// Definition of the extended virtual type.
typedef stc::abstraction_as_type<abstract::color_image>
image_typeness_type;
};
......
......@@ -85,10 +85,10 @@ namespace oln
delegated type (i.e. D = mlc::none), get_image_impl inherits
from oln::any_best_speed (trough get_image_impl_helper);
otherwise, get_image_impl is plugged to set_image_impl, a
class than can specialized by the user.
class than can be specialized by the user.
(*) This relation is not mandatory (set_image_impl is to be
defined by the user), but it every specialization of
(*) This relation is not systematic (set_image_impl is to be
defined by the user), but every specialization of
set_image_impl *should* inherit from oln::any_best_speed. */
template <typename A, typename D, typename E>
......
......@@ -51,7 +51,7 @@ namespace oln
/// Virtual types associated to abstract::piter<E>.
template <typename E>
struct vtypes_< abstract::piter<E> >
struct vtypes< abstract::piter<E> >
{
typedef mlc::undefined point_type;
};
......
......@@ -54,7 +54,7 @@ namespace oln
/// Virtual types associated to abstract::point<E>.
template <typename E>
struct vtypes_< abstract::point<E> >
struct vtypes< abstract::point<E> >
{
typedef mlc::undefined grid_type;
typedef mlc::undefined dpoint_type;
......
......@@ -44,7 +44,7 @@ namespace oln
/// Virtual types associated to oln::bbox_nd<point>.
template <typename E>
struct vtypes_< abstract::pset<E> >
struct vtypes< abstract::pset<E> >
{
typedef mlc::undefined point_type;
// typedef mlc::undefined fwd_piter_type;
......@@ -53,13 +53,13 @@ namespace oln
// template <typename E>
// struct vtype_< abstract::pset<E>, typedef_::coord_type >
// struct single_vtype< abstract::pset<E>, typedef_::coord_type >
// : type_of_< oln_type_of(E, point), typedef_::coord_type >
// {};
// template <typename E>
// struct extension_vtype_< abstract::pset<E>, typedef_::coord_type >
// struct ext_vtype< abstract::pset<E>, typedef_::coord_type >
// {
// private:
// typedef oln_type_of(E, point) P;
......@@ -69,7 +69,7 @@ namespace oln
template <typename E>
struct ext_vtype_< abstract::pset<E>, typedef_::grid_type >
struct ext_vtype< abstract::pset<E>, typedef_::grid_type >
{
typedef oln_type_of(E, point) P;
typedef oln_type_of(P, grid) ret;
......
......@@ -53,7 +53,7 @@ namespace oln
/// Virtual types associated to oln::bbox_<point>.
template <typename point>
struct vtypes_< bbox_<point> >
struct vtypes< bbox_<point> >
{
typedef point point_type;
// typedef fwd_piter_<point> fwd_piter_type;
......
......@@ -53,7 +53,7 @@ namespace oln
/// Virtual types associated to oln::bbox_<point>.
template <typename point>
struct vtypes_< bkd_piter_<point> >
struct vtypes< bkd_piter_<point> >
{
typedef point point_type;
typedef oln_type_of(point, grid) grid_type;
......
......@@ -53,7 +53,7 @@ namespace oln
/// Virtual types associated to oln::fwd_piter_<point>.
template <typename point>
struct vtypes_< fwd_piter_<point> >
struct vtypes< fwd_piter_<point> >
{
typedef point point_type;
typedef oln_type_of(point, grid) grid_type;
......
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