#include <algorithms.h>
A Match represents a part of a sequence, consisting of start position and length. Depending on the operation, the position type may be either an iterator or an index.
Public Member Functions | |
Match ()=default | |
Match (const Match &)=default | |
Match & | operator= (Match &)=default |
Match (Match &&src) | |
Match & | operator= (Match &&src) |
MAXON_IMPLICIT | Match (NO_MATCH_TYPE) |
Match & | operator= (NO_MATCH_TYPE) |
MAXON_IMPLICIT | Match (ITERATOR position) |
Match (ITERATOR position, Int length) | |
ITERATOR | GetPosition () const |
operator ITERATOR () const | |
Int | GetLength () const |
Bool | IsFound () const |
operator Bool () const | |
Private Attributes | |
ITERATOR | _position |
Int | _length |
|
default |
Constructs a match that is NO_MATCH.
Implicit construction from NO_MATCH.
MAXON_IMPLICIT Match | ( | ITERATOR | position | ) |
Construction from a position with a default length of 1.
Match& operator= | ( | NO_MATCH_TYPE | ) |
Assignment of NO_MATCH.
ITERATOR GetPosition | ( | ) | const |
Returns the first position of the match.
operator ITERATOR | ( | ) | const |
Implicit conversion to position type. Equivalent to GetPosition().
Int GetLength | ( | void | ) | const |
Returns the length of the match.
Bool IsFound | ( | ) | const |
Returns, if this match represents a valid position, or if it is a NO_MATCH.
|
explicit |
Conversion to Bool in conditional expressions (i.e. if statements). Equivalent to IsFound().
|
private |
|
private |