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 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_typegetValue () const
 Accessor to value_.
const value_typegetValue_impl () const
 Implementation of getValue().
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 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. FIXME: Add math definition here.

Definition at line 387 of file morpho/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::abstract::attribute< Exact >.

Definition at line 391 of file morpho/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 400 of file morpho/attributes.hh.

00401           {
00402           };


Member Function Documentation

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

00430           {
00431             mlc_dispatch(getValue)();
00432           };

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

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

00444           {
00445             return value_;
00446           };

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

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

00457           {
00458             value_ += rhs.getValue();
00459           };

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

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

00469           {
00470             return value_ < lambda;
00471           };

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

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

00481           {
00482             return lambda != value_;
00483           };


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