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

Integral attribute. More...

#include <attributes.hh>

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

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef integral_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

 integral_type ()
 Basic Ctor.

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

template<class I>  integral_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 & getValue () const
 Accessor to value_.

const value_type & getReflevel () const
 Accessor to the reference level.

const value_type & getArea () const
 Accessor to the current area.

const value_type & getValue_impl () const
 Implementation of getValue().

const value_type & getReflevel_impl () const
 Implementation of getReflevel().

const value_type & getArea_impl () const
 Implementation of getArea().

void pe_impl (const self_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 reflevel_
 Reference level.

value_type area_
 Current area.

value_type value_
 Current value (deduced from area and level).


Detailed Description

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

Integral attribute.

It is equivalent to volume in 2D, and weight in 3D.

Definition at line 358 of file attributes.hh.


Member Typedef Documentation

template<class T = unsigned, class Exact = mlc::final>
typedef integral_type<T, Exact> oln::morpho::attr::integral_type< T, Exact >::self_type
 

Self type of the class.

Reimplemented from oln::morpho::attr::attribute< Exact >.

Definition at line 362 of file attributes.hh.


Constructor & Destructor Documentation

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

Basic Ctor.

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

Definition at line 371 of file attributes.hh.

00372           {
00373           };


Member Function Documentation

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

Accessor to the current area.

See also:
getArea_impl()

Definition at line 422 of file attributes.hh.

00423           {
00424             mlc_dispatch(getArea)();
00425           };

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

Implementation of getArea().

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

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

Definition at line 462 of file attributes.hh.

References oln::morpho::attr::integral_type< T, Exact >::area_.

00463           {
00464             return area_;
00465           };

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

Accessor to the reference level.

See also:
getReflevel_impl()

Definition at line 412 of file attributes.hh.

00413           {
00414             mlc_dispatch(getReflevel)();
00415           };

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

Implementation of getReflevel().

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

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

Definition at line 449 of file attributes.hh.

References oln::morpho::attr::integral_type< T, Exact >::reflevel_.

00450           {
00451             return reflevel_;
00452           };

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

Accessor to value_.

Virtual method.

See also:
getValue_impl()

Definition at line 402 of file attributes.hh.

00403           {
00404             mlc_dispatch(getValue)();
00405           };

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

Implementation of getValue().

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

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

Definition at line 436 of file attributes.hh.

00437           {
00438             return value_;
00439           };

template<class T = unsigned, class Exact = mlc::final>
bool oln::morpho::attr::integral_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 487 of file attributes.hh.

00488           {
00489             return value_ < lambda;
00490           };

template<class T = unsigned, class Exact = mlc::final>
bool oln::morpho::attr::integral_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 499 of file attributes.hh.

00500           {
00501             return lambda != value_;
00502           };

template<class T = unsigned, class Exact = mlc::final>
void oln::morpho::attr::integral_type< T, Exact >::pe_impl const self_type 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 474 of file attributes.hh.

References oln::morpho::attr::integral_type< T, Exact >::area_, and oln::morpho::attr::integral_type< T, Exact >::reflevel_.

00475           {
00476             value_ += rhs.getValue() + area_ * tools::diffabs(reflevel_, rhs.getReflevel());
00477             area_ += rhs.getArea();
00478           };


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