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 oln::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_typegetMin () const
 Accessor to min value.
const value_typegetMax () const
 Accessor to max value.
const value_typegetMin_impl () const
 Implementation of getMin().
const value_typegetMax_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 723 of file morpho/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 736 of file morpho/attributes.hh.

00737           {
00738           };


Member Function Documentation

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 769 of file morpho/attributes.hh.

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

00770           {
00771             mlc_dispatch(getMin)();
00772           };

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 780 of file morpho/attributes.hh.

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

00781           {
00782             mlc_dispatch(getMax)();
00783           };

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 794 of file morpho/attributes.hh.

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

00795           {
00796             return min_;
00797           };

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 807 of file morpho/attributes.hh.

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

00808           {
00809             return max_;
00810           };

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 819 of file morpho/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_, oln::morpho::attr::height_type< T, Exact >::min_, and oln::morpho::attr::height_type< T, Exact >::value_.

00820           {
00821             min_ = ntg::min(min_, rhs.getMin());
00822             max_ = ntg::max(max_, rhs.getMax());
00823             value_ = max_ - min_;
00824           };

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 833 of file morpho/attributes.hh.

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

00834           {
00835             return value_ < lambda;
00836           };

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 845 of file morpho/attributes.hh.

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

00846           {
00847             return lambda != value_;
00848           };


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