#include <algorithms.h>
Match specialization for index position type.
Public Member Functions | |
| Match ()=default | |
| Match (const Match &)=default | |
| Match & | operator= (Match &)=default |
| MAXON_IMPLICIT | Match (NO_MATCH_TYPE) |
| Match & | operator= (NO_MATCH_TYPE) |
| MAXON_IMPLICIT | Match (Int index) |
| Match (Int index, Int length) | |
| Int | GetPosition () const |
| operator Int () const | |
| Int | GetLength () const |
| Bool | IsFound () const |
| operator Bool () const | |
Private Attributes | |
| Int | _index |
| Int | _length |
|
default |
Constructs a match that is NO_MATCH.
Implicit construction from NO_MATCH.
| MAXON_IMPLICIT Match | ( | Int | index | ) |
Construction from a index position with a default length of 1.
| Match& operator= | ( | NO_MATCH_TYPE | ) |
Assignment of NO_MATCH.
| Int GetPosition | ( | ) | const |
Returns the first position of the match.
| operator Int | ( | ) | const |
Returns the first position of the match.
| Int GetLength | ( | ) | const |
Implicit to index type Int. Equivalent to GetPosition().
| 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 |