| | |
The IndexRange class provides a range of indices that delimit a region of interest in a Polymer's Sequence instance. More...
| Header: | #include <MsXpS/libXpertMassCore/IndexRange.hpp> |
| Inherits: | QObject |
| IndexRange(QObject *parent = nullptr) | |
| IndexRange(qsizetype index_start, qsizetype index_stop, QObject *parent = nullptr) | |
| IndexRange(const MsXpS::libXpertMassCore::IndexRange &other, QObject *parent = nullptr) | |
| virtual | ~IndexRange() |
| MsXpS::libXpertMassCore::IndexRange * | clone(QObject *parent = nullptr) |
| QString | indicesAsText() const |
| void | initialize(const MsXpS::libXpertMassCore::IndexRange &other) |
| bool | isValid() const |
| QString | positionsAsText() const |
| void | reset() |
| void | sortAscending() |
| void | sortDescending() |
| bool | operator!=(const MsXpS::libXpertMassCore::IndexRange &other) const |
| bool | operator==(const MsXpS::libXpertMassCore::IndexRange &other) const |
| MsXpS::libXpertMassCore::IndexRange * | clone(const MsXpS::libXpertMassCore::IndexRange &other, QObject *parent = nullptr) |
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 cleavages or Oligomer fragmentations: the IndexRange enables the delimitation of the sequence of interest inside a given Polymer's Sequence 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().
[explicit] IndexRange::IndexRange(QObject *parent = nullptr)Constructs an IndexRange instance using parent as the parent object of this new instance.
Upon construction, the member data m_start and m_stop are initialized with std::numeric_limits<std::size_t>::max() values as a means to check if the IndexRange was initialized by the user or not.
[explicit] IndexRange::IndexRange(qsizetype index_start, qsizetype index_stop, QObject *parent = nullptr)brief 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 upon construction.
[explicit] IndexRange::IndexRange(const MsXpS::libXpertMassCore::IndexRange &other, QObject *parent = nullptr)Constructs an IndexRange instance using other as a template and parent as the parent of this new instance.
The values are sorted in ascending order upon construction.
See also sortAscending() and sortDescending().
[virtual noexcept] IndexRange::~IndexRange()brief Destructs this IndexRange instance.
Allocates an returns a new IndexRange instance, initializing it using this instance's member values and setting its parent to parent.
The values are sorted in ascending order in the clone.
See also sortAscending() and sortDescending().
[static] MsXpS::libXpertMassCore::IndexRange *IndexRange::clone(const MsXpS::libXpertMassCore::IndexRange &other, QObject *parent = nullptr)br*ief Allocates an returns a new IndexRange instance, initializing it using other and setting its parent to parent.
The values are sorted in ascending order in the clone.
See also sortAscending() and sortDescending().
Returns a string representing this IndexRange instance in the form "[start-stop]".
The start and stop values are indices (not positions).
See also positionsAsText().
Initializes this instance using other. The parent of this instance is unchanged.
The values are sorted in ascending order upon initialization.
See also sortAscending() and sortDescending().
Returns true if this instance is valid.
The IndexRange intance is considered valid if m_start and m_stop contain valid values, that is, not the default-assigned values.
Returns a string representing this IndexRange instance in the form "[start-stop]".
Note: The start and stop values are positions (not indices). This means that the returned values correspond to m_start and m_stop both incremented by one unit.
See also indicesAsText().
Resets the member data to default values.
Makes sure that m_start is <= to m_stop.
Makes sure that m_start is >= to m_stop.
Returns true if this and other IndexRange instances are different.
The parent is not checked.
Return the negation of operator==().
Returns true if this and other IndexRange instances are identical.
The parent is not checked.
Index that marks the start of the index range.
Index that marks the stop of the index range.