Representation of a Peak2D, RichPeak2D or Feature . More...
#include <OpenMS/KERNEL/FeatureHandle.h>
Classes | |
| class | FeatureHandleMutable_ |
| Helper class returned by FeatureHandle::asMutable(), which see. More... | |
| struct | IndexLess |
| Comparator by map and unique id. More... | |
Public Types | |
Type definitions | |
| typedef Int | ChargeType |
| Charge type. | |
| typedef Real | WidthType |
| Feature width type. | |
Public Member Functions | |
| bool | operator== (const FeatureHandle &i) const |
| Equality operator. | |
| bool | operator!= (const FeatureHandle &i) const |
| Equality operator. | |
Constructors and destructor | |
| FeatureHandle () | |
| Default constructor. | |
| FeatureHandle (UInt64 map_index, const Peak2D &point, UInt64 element_index) | |
| Constructor with map index, element index and position. | |
| FeatureHandle (UInt64 map_index, const BaseFeature &feature) | |
| Constructor from map index and basic feature. | |
| FeatureHandle (const FeatureHandle &rhs) | |
| Copy constructor. | |
| FeatureHandle & | operator= (const FeatureHandle &rhs) |
| Assignment operator. | |
| virtual | ~FeatureHandle () |
| Destructor. | |
| FeatureHandleMutable_ & | asMutable () const |
| Override (most of all) constness. | |
Accessors | |
| UInt64 | getMapIndex () const |
| Returns the map index. | |
| void | setMapIndex (UInt64 i) |
| Set the map index. | |
| void | setCharge (ChargeType charge) |
| Sets the charge. | |
| ChargeType | getCharge () const |
| Returns the charge. | |
| void | setWidth (WidthType width) |
| Sets the width (FWHM). | |
| WidthType | getWidth () const |
| Returns the width (FWHM). | |
Protected Attributes | |
| UInt64 | map_index_ |
| Index of the element's container. | |
| Int | charge_ |
| Charge of the feature. | |
| Real | width_ |
| Width of the feature (FWHM). | |
Representation of a Peak2D, RichPeak2D or Feature .
The position and the intensity of the referenced feature are stored in the base class Peak2D. The original datapoint is referenced by the map and unique id.
| typedef Int ChargeType |
Charge type.
| FeatureHandle | ( | ) | [inline] |
Default constructor.
| FeatureHandle | ( | UInt64 | map_index, | |
| const Peak2D & | point, | |||
| UInt64 | element_index | |||
| ) | [inline] |
Constructor with map index, element index and position.
| FeatureHandle | ( | UInt64 | map_index, | |
| const BaseFeature & | feature | |||
| ) | [inline] |
Constructor from map index and basic feature.
| FeatureHandle | ( | const FeatureHandle & | rhs | ) | [inline] |
Copy constructor.
| virtual ~FeatureHandle | ( | ) | [inline, virtual] |
Destructor.
| FeatureHandle::FeatureHandleMutable_ & asMutable | ( | ) | const [inline] |
Override (most of all) constness.
We provide this such that you can modify instances FeatureHandle which are stored within a ConsensusFeature. Note that std::set does not provide non-const iterators, because these could be used to change the relative ordering of the elements, and iterators are (by design/concept) unaware of their containers. Since ConsensusFeature uses the ordering by IndexLess (which see), you must not modify the map index of element index if there is more than one FeatureHandle stored in a ConsensusFeature. Consequently, we "disable" setMapIndex() or setElementIndex() even within FeatureHandleMutable_. On the other hand, it is perfectly safe to apply FeatureHandle::setRT(), FeatureHandle::setMZ(), FeatureHandle::setIntensity(), FeatureHandle::setCharge(), etc..
| ChargeType getCharge | ( | ) | const [inline] |
Returns the charge.
| UInt64 getMapIndex | ( | ) | const [inline] |
Returns the map index.
| WidthType getWidth | ( | ) | const [inline] |
Returns the width (FWHM).
| bool operator!= | ( | const FeatureHandle & | i | ) | const [inline] |
Equality operator.
| FeatureHandle& operator= | ( | const FeatureHandle & | rhs | ) | [inline] |
Assignment operator.
References FeatureHandle::charge_, FeatureHandle::map_index_, UniqueIdInterface::operator=(), Peak2D::operator=(), and FeatureHandle::width_.
| bool operator== | ( | const FeatureHandle & | i | ) | const [inline] |
Equality operator.
References FeatureHandle::charge_, FeatureHandle::map_index_, UniqueIdInterface::operator==(), and FeatureHandle::width_.
| void setCharge | ( | ChargeType | charge | ) | [inline] |
Sets the charge.
| void setMapIndex | ( | UInt64 | i | ) | [inline] |
Set the map index.
| void setWidth | ( | WidthType | width | ) | [inline] |
Sets the width (FWHM).
Charge of the feature.
Referenced by FeatureHandle::operator=(), and FeatureHandle::operator==().
UInt64 map_index_ [protected] |
Index of the element's container.
Referenced by FeatureHandle::IndexLess::operator()(), FeatureHandle::operator=(), and FeatureHandle::operator==().
Width of the feature (FWHM).
Referenced by FeatureHandle::operator=(), and FeatureHandle::operator==().
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:54 using doxygen 1.7.1 |