oln::morpho::attr::height_type< T, Exact > Class Template Reference

Attribute working on height between components. More...

#include <attributes.hh>

Inheritance diagram for oln::morpho::attr::height_type< T, Exact >:

Inheritance graph
[legend]
Collaboration diagram for oln::morpho::attr::height_type< T, Exact >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef height_type< T, Exact > self_type
typedef mlc::exact_vt< self_type,
Exact >::ret 
exact_type
typedef oln::morpho::attr::attr_traits<
exact_type >::value_type 
value_type
typedef oln::morpho::attr::attr_traits<
exact_type >::env_type 
env_type
typedef oln::morpho::attr::attr_traits<
exact_type >::lambda_type 
lambda_type

Public Member Functions

 height_type ()
 Basic Ctor.

 height_type (const lambda_type &lambda)
 Ctor from a lambda_type value.

template<class I>  height_type (const abstract::image< I > &input, const typename mlc::exact< I >::ret::point_type &p, const env_type &)
 Ctor from a point and an image.

const value_type & getMin () const
 Accessor to min value.

const value_type & getMax () const
 Accessor to max value.

const value_type & getMin_impl () const
 Implementation of getMin().

const value_type & getMax_impl () const
 Implementation of getMax().

void pe_impl (const height_type &rhs)
 += operator implementation.

bool less_impl (const lambda_type &lambda) const
 "<" operator implementation.

bool ne_impl (const lambda_type &lambda) const
 != operator implementation.


Protected Attributes

value_type value_
 Current value.

value_type min_
 Current minimum.

value_type max_
 Current maximum.


Detailed Description

template<class T = unsigned, class Exact = mlc::final>
class oln::morpho::attr::height_type< T, Exact >

Attribute working on height between components.

Definition at line 744 of file attributes.hh.


Constructor & Destructor Documentation

template<class T = unsigned, class Exact = mlc::final>
oln::morpho::attr::height_type< T, Exact >::height_type  )  [inline]
 

Basic Ctor.

Warning:
After this call, the object is only instantiated (not initialized).

Definition at line 757 of file attributes.hh.

00758           {
00759           };


Member Function Documentation

template<class T = unsigned, class Exact = mlc::final>
const value_type& oln::morpho::attr::height_type< T, Exact >::getMax  )  const [inline]
 

Accessor to max value.

Virtual method.

See also:
getMax_impl()

Definition at line 801 of file attributes.hh.

Referenced by oln::morpho::attr::height_type< T, Exact >::pe_impl().

00802           {
00803             mlc_dispatch(getMax)();
00804           };

template<class T = unsigned, class Exact = mlc::final>
const value_type& oln::morpho::attr::height_type< T, Exact >::getMax_impl  )  const [inline]
 

Implementation of getMax().

Override this method in order to provide a new version of getMax().

Warning:
Do not call this method, use getMax() instead.

Definition at line 828 of file attributes.hh.

References oln::morpho::attr::height_type< T, Exact >::max_.

00829           {
00830             return max_;
00831           };

template<class T = unsigned, class Exact = mlc::final>
const value_type& oln::morpho::attr::height_type< T, Exact >::getMin  )  const [inline]
 

Accessor to min value.

Virtual method.

See also:
getMin_impl()

Definition at line 790 of file attributes.hh.

Referenced by oln::morpho::attr::height_type< T, Exact >::pe_impl().

00791           {
00792             mlc_dispatch(getMin)();
00793           };

template<class T = unsigned, class Exact = mlc::final>
const value_type& oln::morpho::attr::height_type< T, Exact >::getMin_impl  )  const [inline]
 

Implementation of getMin().

Override this method in order to provide a new version of getMin().

Warning:
Do not call this method, use getMin() instead.

Definition at line 815 of file attributes.hh.

References oln::morpho::attr::height_type< T, Exact >::min_.

00816           {
00817             return min_;
00818           };

template<class T = unsigned, class Exact = mlc::final>
bool oln::morpho::attr::height_type< T, Exact >::less_impl const lambda_type &  lambda  )  const [inline]
 

"<" operator implementation.

This is an implementation of the += operator. Override this method to provide a new implementation of this operator.

Warning:
This method SHOULDN'T directly be called.

Definition at line 854 of file attributes.hh.

00855           {
00856             return value_ < lambda;
00857           };

template<class T = unsigned, class Exact = mlc::final>
bool oln::morpho::attr::height_type< T, Exact >::ne_impl const lambda_type &  lambda  )  const [inline]
 

!= operator implementation.

This is an implementation of the += operator. Override this method to provide a new implementation of this operator.

Warning:
This method SHOULDN'T directly be called.

Definition at line 866 of file attributes.hh.

00867           {
00868             return lambda != value_;
00869           };

template<class T = unsigned, class Exact = mlc::final>
void oln::morpho::attr::height_type< T, Exact >::pe_impl const height_type< T, Exact > &  rhs  )  [inline]
 

+= operator implementation.

This is an implementation of the += operator. Override this method to provide a new implementation of this operator.

Warning:
This method SHOULDN'T directly be called.

Definition at line 840 of file attributes.hh.

References oln::morpho::attr::height_type< T, Exact >::getMax(), oln::morpho::attr::height_type< T, Exact >::getMin(), oln::morpho::attr::height_type< T, Exact >::max_, and oln::morpho::attr::height_type< T, Exact >::min_.

00841           {
00842             min_ = ntg::min(min_, rhs.getMin());
00843             max_ = ntg::max(max_, rhs.getMax());
00844             value_ = max_ - min_;
00845           };


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