Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
dart::Interval Class Reference

#include <regexp.h>

Public Member Functions

 Interval ()
 
 Interval (intptr_t from, intptr_t to)
 
Interval Union (Interval that)
 
bool Contains (intptr_t value) const
 
bool is_empty () const
 
intptr_t from () const
 
intptr_t to () const
 

Static Public Member Functions

static Interval Empty ()
 

Static Public Attributes

static constexpr intptr_t kNone = -1
 

Detailed Description

Definition at line 510 of file regexp.h.

Constructor & Destructor Documentation

◆ Interval() [1/2]

dart::Interval::Interval ( )
inline

Definition at line 512 of file regexp.h.

512: from_(kNone), to_(kNone) {}
static constexpr intptr_t kNone
Definition regexp.h:531

◆ Interval() [2/2]

dart::Interval::Interval ( intptr_t  from,
intptr_t  to 
)
inline

Definition at line 513 of file regexp.h.

513: from_(from), to_(to) {}
intptr_t to() const
Definition regexp.h:529
intptr_t from() const
Definition regexp.h:528

Member Function Documentation

◆ Contains()

bool dart::Interval::Contains ( intptr_t  value) const
inline

Definition at line 524 of file regexp.h.

524 {
525 return (from_ <= value) && (value <= to_);
526 }
uint8_t value

◆ Empty()

static Interval dart::Interval::Empty ( )
inlinestatic

Definition at line 530 of file regexp.h.

530{ return Interval(); }

◆ from()

intptr_t dart::Interval::from ( ) const
inline

Definition at line 528 of file regexp.h.

528{ return from_; }

◆ is_empty()

bool dart::Interval::is_empty ( ) const
inline

Definition at line 527 of file regexp.h.

527{ return from_ == kNone; }

◆ to()

intptr_t dart::Interval::to ( ) const
inline

Definition at line 529 of file regexp.h.

529{ return to_; }

◆ Union()

Interval dart::Interval::Union ( Interval  that)
inline

Definition at line 515 of file regexp.h.

515 {
516 if (that.from_ == kNone)
517 return *this;
518 else if (from_ == kNone)
519 return that;
520 else
521 return Interval(Utils::Minimum(from_, that.from_),
522 Utils::Maximum(to_, that.to_));
523 }
static constexpr T Maximum(T x, T y)
Definition utils.h:26
static T Minimum(T x, T y)
Definition utils.h:21

Member Data Documentation

◆ kNone

constexpr intptr_t dart::Interval::kNone = -1
staticconstexpr

Definition at line 531 of file regexp.h.


The documentation for this class was generated from the following file: