#include <attributes.hh>
Inheritance diagram for oln::morpho::attr::volume_type< I, Exact >:
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_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 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). |
It is equivalent to volume in 2D, and weight in 3D.
Definition at line 222 of file morpho/attributes.hh.
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.
oln::morpho::attr::volume_type< I, Exact >::volume_type | ( | ) | [inline] |
Basic Ctor.
Definition at line 235 of file morpho/attributes.hh.
const value_type& oln::morpho::attr::volume_type< I, Exact >::getValue | ( | ) | const [inline] |
Accessor to value_.
Virtual method.
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 };
const value_type& oln::morpho::attr::volume_type< I, Exact >::getReflevel | ( | ) | const [inline] |
Accessor to the reference level.
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 };
const value_type& oln::morpho::attr::volume_type< I, Exact >::getArea | ( | ) | const [inline] |
Accessor to the current area.
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 };
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().
Definition at line 301 of file morpho/attributes.hh.
References oln::morpho::attr::volume_type< I, Exact >::value_.
00302 { 00303 return value_; 00304 };
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().
Definition at line 314 of file morpho/attributes.hh.
References oln::morpho::attr::volume_type< I, Exact >::reflevel_.
00315 { 00316 return reflevel_; 00317 };
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().
Definition at line 327 of file morpho/attributes.hh.
References oln::morpho::attr::volume_type< I, Exact >::area_.
00328 { 00329 return area_; 00330 };
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.
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 };
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.
Definition at line 352 of file morpho/attributes.hh.
References oln::morpho::attr::volume_type< I, Exact >::value_.
00353 { 00354 return value_ < lambda; 00355 };
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.
Definition at line 364 of file morpho/attributes.hh.
References oln::morpho::attr::volume_type< I, Exact >::value_.
00365 { 00366 return lambda != value_; 00367 };