oln::morpher::border_morpher< SrcType, BehaviorType, Exact > Struct Template Reference

The default border morpher class. More...

#include <border_morpher.hh>

Inheritance diagram for oln::morpher::border_morpher< SrcType, BehaviorType, Exact >:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef border_morpher< SrcType,
BehaviorType, Exact > 
self_type
 The self type.
typedef image_id< self_type
>::exact_type 
exact_type
 The exact type of the morpher.
typedef super_border_morpher<
SrcType, BehaviorType, 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
>::dpoint_type 
dpoint_type
 The morpher dpoint type.
typedef image_id< exact_type
>::size_type 
size_type
 The morpher size type.
typedef image_id< exact_type
>::value_type 
value_type
 The morpher value type.

Public Member Functions

 border_morpher (const SrcType &ima, const coord width, const BehaviorType &be)
 Construct the border morpher with an image ima.
 border_morpher (const self_type &r)
 Construct the border morpher with another border morpher.
 border_morpher ()
 Empty constructor.
value_typeat (const point_type &p)
 Return the stored value at the point.
const value_type at (const point_type &p) const
 Return the stored value at the point.
self_typeassign (self_type &rhs)
self_typeoperator= (SrcType &rhs)
 This operator= assigns rhs to the current image.

Static Public Member Functions

static std::string name ()
 Useful to debug.

Detailed Description

template<class SrcType, class BehaviorType, class Exact>
struct oln::morpher::border_morpher< SrcType, BehaviorType, Exact >

The default border morpher class.

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

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

oln::morpher::border_morph

Definition at line 191 of file border_morpher.hh.


Constructor & Destructor Documentation

template<class SrcType, class BehaviorType, class Exact>
oln::morpher::border_morpher< SrcType, BehaviorType, Exact >::border_morpher (  )  [inline]

Empty constructor.

Needed by mlc_hierarchy::any_with_diamond.

Definition at line 224 of file border_morpher.hh.

00225       {}


Member Function Documentation

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

Return the stored value at the point.

Definition at line 233 of file border_morpher.hh.

00234       {
00235         return const_cast<value_type &>
00236           ( const_cast<SrcType &>(this->ima_)[p + this->get_dp()] );
00237       }

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

Return the stored value at the point.

Definition at line 245 of file border_morpher.hh.

00246       {
00247         return this->ima_[p + this->get_dp()];
00248       }

template<class SrcType, class BehaviorType, class Exact>
self_type& oln::morpher::border_morpher< SrcType, BehaviorType, Exact >::assign ( self_type rhs  )  [inline]

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

Definition at line 255 of file border_morpher.hh.

00256       {
00257         oln_iter_type(SrcType)  it(rhs);
00258 
00259         for_all(it)
00260           this->at(it) = rhs[it];
00261         return this->exact();
00262       }


The documentation for this struct was generated from the following file:
Generated on Tue Feb 20 20:28:01 2007 for Olena by  doxygen 1.5.1