oln::morpher::slicing_morpher< SrcType, Exact > Struct Template Reference

The default slicing morpher class. More...

#include <slicing_morpher.hh>

Inheritance diagram for oln::morpher::slicing_morpher< SrcType, Exact >:

Inheritance graph
[legend]
Collaboration diagram for oln::morpher::slicing_morpher< SrcType, Exact >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef slicing_morpher< SrcType,
Exact > 
self_type
 The self type.

typedef image_id< self_type
>::exact_type 
exact_type
 The exact type of the morpher.

typedef super_slicing_morpher<
SrcType, exact_type
super_type
 The upper class.

typedef image_id< exact_type
>::point_type 
point_type
 The morpher point type.

typedef image_id< exact_type
>::img_type 
img_type
typedef image_id< exact_type
>::value_type 
value_type
 The morpher value type.


Public Member Functions

 slicing_morpher (const SrcType &ima, coord slice)
 Construct a slicing morpher.
  • ima The image.
  • slice The slice value.


 slicing_morpher (const self_type &r)
 Construct a slicing morpher from another one.

 slicing_morpher ()
 Empty constructor.

value_typeat (const point_type &p)
 Return the stored value at the point.
  • p The point.


const value_type at (const point_type &p) const
 Return a reference to the value stored at p in the current image.

self_typeassign (self_type &rhs)
 Perform a shallow copy from the decorated image of rhs to the current decorated image. The points will be shared by the two images.

self_typeoperator= (self_type &rhs)
 This operator= assigns rhs to the current image.


Static Public Member Functions

std::string name ()
 Useful to debug.


Detailed Description

template<class SrcType, class Exact>
struct oln::morpher::slicing_morpher< SrcType, Exact >

The default slicing morpher class.

Using this class, a slicing of picture is a picture.

See also:
oln::morpher::abstract::generic_morpher

oln::morpher::slicing_morph

Definition at line 235 of file slicing_morpher.hh.


Constructor & Destructor Documentation

template<class SrcType, class Exact>
oln::morpher::slicing_morpher< SrcType, Exact >::slicing_morpher  )  [inline]
 

Empty constructor.

Needed by mlc_hierarchy::any_with_diamond.

Definition at line 266 of file slicing_morpher.hh.

00266 {}


Member Function Documentation

template<class SrcType, class Exact>
const value_type oln::morpher::slicing_morpher< SrcType, Exact >::at const point_type p  )  const [inline]
 

Return a reference to the value stored at p in the current image.

Warning:
This method must not be overloaded, unlike operator[].
See also:
image::operator[]()

Reimplemented from oln::abstract::image_with_impl< Impl, Exact >.

Definition at line 280 of file slicing_morpher.hh.

00281       {
00282         typename SrcType::point_type tmp_p(p, slice_);
00283         return this->ima_[tmp_p];
00284       }

template<class SrcType, class Exact>
value_type& oln::morpher::slicing_morpher< SrcType, Exact >::at const point_type p  )  [inline]
 

Return the stored value at the point.

  • p The point.

Returns:
The stored value.

Reimplemented from oln::abstract::image_with_impl< Impl, Exact >.

Definition at line 274 of file slicing_morpher.hh.

Referenced by oln::morpher::slicing_morpher< SrcType, Exact >::assign().

00275       {
00276         typename SrcType::point_type tmp_p(p, slice_);
00277         return const_cast<value_type &>(this->ima_)[tmp_p];
00278       }


The documentation for this struct was generated from the following file:
Generated on Thu Apr 15 20:16:39 2004 for Olena by doxygen 1.3.6-20040222