|
The CoordinateList class provides a list of Coordinates allocated instances. More...
Header: | #include <CoordinateList> |
Inherits: | QList |
Inherited By: |
CoordinateList(QString comment = QString(), QList<Coordinates *> *list = 0) | |
CoordinateList(const CoordinateList &other) | |
~CoordinateList() | |
void | appendCoordinates(const Coordinates &coordinates) |
QString | comment() const |
void | debugPutStdErr() |
void | empty() |
bool | encompassIndex(int index) const |
QString | indicesAsText() const |
bool | isLeftMostCoordinates(Coordinates *coordinates) const |
bool | isRightMostCoordinates(Coordinates *coordinates) const |
int | leftMostCoordinates(QList<int> &index_list) const |
bool | overlap() const |
QString | positionsAsText() const |
int | rightMostCoordinates(QList<int> &index_list) const |
void | setComment(QString text) |
void | setCoordinates(const Coordinates &coordinates) |
void | setCoordinates(const CoordinateList &list) |
int | setCoordinates(const QString &coordinates_string) |
CoordinateList & | operator=(const CoordinateList &other) |
QString | m_comment |
The Coordinates instances are allocated on the heap and stored as a QList.
Constructs a CoordinateList using comment and list.
The Coordinates instances in list are duplicated and stored in this CoordinateList.
Constructs a CoordinateList as a copy of other.
The copy is a deep copy, with all the Coordinates instances in other duplicated and stored in this CoordinateList.
[noexcept]
CoordinateList::~CoordinateList()Destructs this CoordinateList.
The Coordinates instances are freed.
Add a copy of coordinates this CoordinateList instance.
Returns the comment.
See also setComment().
Outputs a string listing all the Coordinates using qDebug().
Clears this CoordinateList of all its Coordinates.
The Coordinates instances are free
'd.
Returns true if index is found to be between the start and end indices of at least one Coordinates instance in this CoordinateList, false otherwise.
Returns a string documenting the Coordinates in this CoordinateList.
Each Coordinates instance is described like the following with the values being the indices m_start and m_end:
[156-350]
See also positionsAsText().
Returns true if coordinates is the left-most Coordinates in this CoordinateList. false otherwise.
Returns true if coordinates is the right-most Coordinates in this CoordinateList. false otherwise.
Searches all the Coordinates that have the smallest m_start value.
Searches all the Coordinates instances in this CoordinateList that share the same Coordinates::m_start value that is actually the smallest such value in the list. Each found Coordinates instance's index in this CoordinateList is added to index_list.
Note: index_list is first emptied.
Returns the count of Coordinates instances added to index_list.
See also rightMostCoordinates(), isLeftMostCoordinates(), and isRightMostCoordinates.
Returns true if at least two Coordinates instances overlap.
Two Coordinates instances overlap if the second's m_start member is less than the first's m_end and greater than the first's m_start.
See also encompassIndex().
Returns a string documenting the Coordinates in this CoordinateList.
Each Coordinates instance is described like the following with the values being the indices m_start+1 and m_end+1:
[157-351]
Note: The values reported are not indices, but positions.
See also indicesAsText().
Searches all the Coordinates that have the greatest m_end value.
Searches all the Coordinates instances in this CoordinateList that share the same Coordinates::m_end value that is actually the greatest such value in the list. Each found Coordinates instance's index in this CoordinateList is added to index_list.
Note: index_list is first emptied.
Returns the count of Coordinates instances added to index_list.
See also leftMostCoordinates(), isLeftMostCoordinates(), and isRightMostCoordinates.
Sets the comment to text.
See also comment().
Adds a copy of coordinates to this CoordinateList instance.
Note: This CoordinateList's list of Coordinates instances is first emptied, essentially replacing its contents with a copy of coordinates.
Allocates a copy of each Coordinates instance in list and adds it to this CoordinateList instance.
Note: This CoordinateList's list of Coordinates instances is first emptied, essentially replacing its contents with a copy of those in list.
Creates the Coordinates instances based on coordinates_string and add them to this CoordinateList's list of Coordinates.
Note: This CoordinateList's list of Coordinates instances is first emptied
The format of the coordinates_string is
"[228-246]"
if there are not multiple regions. If there are multiple regions (for example when a cross-link exists), the format changes to account for the multiple regions:
"[228-246][276-282][247-275]"
Note: It is expected that the values in the coordinates_string are positions strings and not indices.
Returns the count of added Coordinates instances or -1 if an error occurred.
Assigns to this CoordinateList the members of other.
The copy involves duplicationg all the Coordinates objects in other and all other members.
Returns a reference to this CoordinateList instance.
This variable holds a comment string.