| |
The IndexRange structure provides a range of indices that delimit a region of interest in a Polymer Sequence instance. More...
| Header: | #include <IndexRangeCollection.hpp> |
| Inherits: | QObject |
| IndexRange() | |
| IndexRange(std::size_t index_start, std::size_t index_stop) | |
| IndexRange(const MsXpS::libXpertMassCore::IndexRange &other) | |
| QString | indicesAsText() const |
| QString | positionsAsText() const |
| void | sortAscending() |
| void | sortDescending() |
One major IndexRange use case is when defining for what sequence region of a Polymer the masses or the elemental composition is to be computed. Another use case is when performing Sequence cleavage or Oligomer fragmentation: the IndexRange enable the delimitation of the sequence of interest inside a given Polymer instance.
When instantiating a new IndexRange, the start and stop values are automatically sorted in ascending order (start <= stop).
See also IndexRangeCollection, sortAscending(), and sortDescending().
[default] IndexRange::IndexRange()Constructs an IndexRange instance with default std::numeric_limits<std::size_t>::max() start and stop index ranges.
The use of the max() function to initialize the start and stop member data is to have a means to check if the IndexRange was initialized by the user or not.
[default] IndexRange::IndexRange(std::size_t index_start, std::size_t index_stop)Constructs an IndexRange instance initializing the start and stop members to the index_start and index_stop values, respectively.
The values are sorted in ascending order.
This function overloads MsXpS::libXpertMassCore::IndexRange::IndexRange().
[default] IndexRange::IndexRange(const MsXpS::libXpertMassCore::IndexRange &other)Constructs an IndexRange instance as a copy of other.
Returns a reference to this IndexRange instance.
This function overloads MsXpS::libXpertMassCore::IndexRange::IndexRange().
Returns a string representing this IndexRange instance in the form "[start-stop]".
Returns a string representing this IndexRange instance in the form "[start-stop]".
Note: The values returned in the string correspond to positions in the Polymer Sequence, that is these values correspond to indices incremented by one.
[invokable] void IndexRange::sortAscending()Makes sure that start is <= to stop.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
[invokable] void IndexRange::sortDescending()Makes sure that start is >= to stop.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.