oln::morpho::attr::volume_type< I, Exact > Class Template Reference

Integral attribute. More...

#include <attributes.hh>

Inheritance diagram for oln::morpho::attr::volume_type< I, Exact >:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef volume_type< I, 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

 volume_type ()
 Basic Ctor.
 volume_type (const lambda_type &lambda)
 Ctor from a lambda_type value.
template<class J>
 volume_type (const oln::abstract::image< J > &, const typename mlc::exact< J >::ret::point_type &p, const env_type &e)
 Ctor from a point and an image.
const value_typegetValue () const
 Accessor to value_.
const value_typegetReflevel () const
 Accessor to the reference level.
const value_typegetArea () const
 Accessor to the current area.
const value_typegetValue_impl () const
 Implementation of getValue().
const value_typegetReflevel_impl () const
 Implementation of getReflevel().
const value_typegetArea_impl () const
 Implementation of getArea().
void pe_impl (const volume_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 I, class Exact = mlc::final>
class oln::morpho::attr::volume_type< I, Exact >

Integral attribute.

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

Todo:
FIXME: Change the name and explain the diferences with integral.

Definition at line 222 of file morpho/attributes.hh.


Member Typedef Documentation

template<class I, class Exact = mlc::final>
typedef volume_type<I, Exact> oln::morpho::attr::volume_type< I, Exact >::self_type

Self type of the class.

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

Definition at line 226 of file morpho/attributes.hh.


Constructor & Destructor Documentation

template<class I, class Exact = mlc::final>
oln::morpho::attr::volume_type< I, Exact >::volume_type (  )  [inline]

Basic Ctor.

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

Definition at line 235 of file morpho/attributes.hh.

00236           {
00237           };


Member Function Documentation

template<class I, class Exact = mlc::final>
const value_type& oln::morpho::attr::volume_type< I, Exact >::getValue (  )  const [inline]

Accessor to value_.

Virtual method.

See also:
getValue_impl()

Definition at line 267 of file morpho/attributes.hh.

Referenced by oln::morpho::attr::volume_type< I, Exact >::pe_impl().

00268           {
00269             mlc_dispatch(getValue)();
00270           };

template<class I, class Exact = mlc::final>
const value_type& oln::morpho::attr::volume_type< I, Exact >::getReflevel (  )  const [inline]

Accessor to the reference level.

See also:
getReflevel_impl()

Definition at line 277 of file morpho/attributes.hh.

Referenced by oln::morpho::attr::volume_type< I, Exact >::pe_impl().

00278           {
00279             mlc_dispatch(getReflevel)();
00280           };

template<class I, class Exact = mlc::final>
const value_type& oln::morpho::attr::volume_type< I, Exact >::getArea (  )  const [inline]

Accessor to the current area.

See also:
getArea_impl()

Definition at line 287 of file morpho/attributes.hh.

Referenced by oln::morpho::attr::volume_type< I, Exact >::pe_impl().

00288           {
00289             mlc_dispatch(getArea)();
00290           };

template<class I, class Exact = mlc::final>
const value_type& oln::morpho::attr::volume_type< I, 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 301 of file morpho/attributes.hh.

References oln::morpho::attr::volume_type< I, Exact >::value_.

00302           {
00303             return value_;
00304           };

template<class I, class Exact = mlc::final>
const value_type& oln::morpho::attr::volume_type< I, 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 314 of file morpho/attributes.hh.

References oln::morpho::attr::volume_type< I, Exact >::reflevel_.

00315           {
00316             return reflevel_;
00317           };

template<class I, class Exact = mlc::final>
const value_type& oln::morpho::attr::volume_type< I, 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 327 of file morpho/attributes.hh.

References oln::morpho::attr::volume_type< I, Exact >::area_.

00328           {
00329             return area_;
00330           };

template<class I, class Exact = mlc::final>
void oln::morpho::attr::volume_type< I, Exact >::pe_impl ( const volume_type< I, 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 339 of file morpho/attributes.hh.

References oln::morpho::attr::volume_type< I, Exact >::area_, oln::morpho::attr::tools::diffabs(), oln::morpho::attr::volume_type< I, Exact >::getArea(), oln::morpho::attr::volume_type< I, Exact >::getReflevel(), oln::morpho::attr::volume_type< I, Exact >::getValue(), oln::morpho::attr::volume_type< I, Exact >::reflevel_, and oln::morpho::attr::volume_type< I, Exact >::value_.

00340           {
00341             value_ += rhs.getValue() + area_ * tools::diffabs(reflevel_, rhs.getReflevel());
00342             area_ += rhs.getArea();
00343           };

template<class I, class Exact = mlc::final>
bool oln::morpho::attr::volume_type< I, 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 352 of file morpho/attributes.hh.

References oln::morpho::attr::volume_type< I, Exact >::value_.

00353           {
00354             return value_ < lambda;
00355           };

template<class I, class Exact = mlc::final>
bool oln::morpho::attr::volume_type< I, 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 364 of file morpho/attributes.hh.

References oln::morpho::attr::volume_type< I, Exact >::value_.

00365           {
00366             return lambda != value_;
00367           };


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