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

#include <object.h>

Public Types

enum  Flags {
  kNone = 0 , kGlobal = 1 , kIgnoreCase = 2 , kMultiLine = 4 ,
  kUnicode = 8 , kDotAll = 16
}
 

Public Member Functions

 RegExpFlags ()
 
 RegExpFlags (int value)
 
bool IsGlobal () const
 
bool IgnoreCase () const
 
bool IsMultiLine () const
 
bool IsUnicode () const
 
bool IsDotAll () const
 
bool NeedsUnicodeCaseEquivalents ()
 
void SetGlobal ()
 
void SetIgnoreCase ()
 
void SetMultiLine ()
 
void SetUnicode ()
 
void SetDotAll ()
 
const char * ToCString () const
 
int value () const
 
bool operator== (const RegExpFlags &other) const
 
bool operator!= (const RegExpFlags &other) const
 

Static Public Attributes

static constexpr int kDefaultFlags = 0
 

Detailed Description

Definition at line 12676 of file object.h.

Member Enumeration Documentation

◆ Flags

Enumerator
kNone 
kGlobal 
kIgnoreCase 
kMultiLine 
kUnicode 
kDotAll 

Definition at line 12682 of file object.h.

12682 {
12683 kNone = 0,
12684 kGlobal = 1,
12685 kIgnoreCase = 2,
12686 kMultiLine = 4,
12687 kUnicode = 8,
12688 kDotAll = 16,
12689 };

Constructor & Destructor Documentation

◆ RegExpFlags() [1/2]

dart::RegExpFlags::RegExpFlags ( )
inline

Definition at line 12693 of file object.h.

12693: value_(kDefaultFlags) {}
static constexpr int kDefaultFlags
Definition object.h:12691

◆ RegExpFlags() [2/2]

dart::RegExpFlags::RegExpFlags ( int  value)
inlineexplicit

Definition at line 12694 of file object.h.

12694: value_(value) {}
int value() const
Definition object.h:12716

Member Function Documentation

◆ IgnoreCase()

bool dart::RegExpFlags::IgnoreCase ( ) const
inline

Definition at line 12697 of file object.h.

12697{ return (value_ & kIgnoreCase) != 0; }

◆ IsDotAll()

bool dart::RegExpFlags::IsDotAll ( ) const
inline

Definition at line 12700 of file object.h.

12700{ return (value_ & kDotAll) != 0; }

◆ IsGlobal()

bool dart::RegExpFlags::IsGlobal ( ) const
inline

Definition at line 12696 of file object.h.

12696{ return (value_ & kGlobal) != 0; }

◆ IsMultiLine()

bool dart::RegExpFlags::IsMultiLine ( ) const
inline

Definition at line 12698 of file object.h.

12698{ return (value_ & kMultiLine) != 0; }

◆ IsUnicode()

bool dart::RegExpFlags::IsUnicode ( ) const
inline

Definition at line 12699 of file object.h.

12699{ return (value_ & kUnicode) != 0; }

◆ NeedsUnicodeCaseEquivalents()

bool dart::RegExpFlags::NeedsUnicodeCaseEquivalents ( )
inline

Definition at line 12702 of file object.h.

12702 {
12703 // Both unicode and ignore_case flags are set. We need to use ICU to find
12704 // the closure over case equivalents.
12705 return IsUnicode() && IgnoreCase();
12706 }
bool IsUnicode() const
Definition object.h:12699
bool IgnoreCase() const
Definition object.h:12697

◆ operator!=()

bool dart::RegExpFlags::operator!= ( const RegExpFlags other) const
inline

Definition at line 12721 of file object.h.

12721 {
12722 return value_ != other.value_;
12723 }

◆ operator==()

bool dart::RegExpFlags::operator== ( const RegExpFlags other) const
inline

Definition at line 12718 of file object.h.

12718 {
12719 return value_ == other.value_;
12720 }

◆ SetDotAll()

void dart::RegExpFlags::SetDotAll ( )
inline

Definition at line 12712 of file object.h.

12712{ value_ |= kDotAll; }

◆ SetGlobal()

void dart::RegExpFlags::SetGlobal ( )
inline

Definition at line 12708 of file object.h.

12708{ value_ |= kGlobal; }

◆ SetIgnoreCase()

void dart::RegExpFlags::SetIgnoreCase ( )
inline

Definition at line 12709 of file object.h.

12709{ value_ |= kIgnoreCase; }

◆ SetMultiLine()

void dart::RegExpFlags::SetMultiLine ( )
inline

Definition at line 12710 of file object.h.

12710{ value_ |= kMultiLine; }

◆ SetUnicode()

void dart::RegExpFlags::SetUnicode ( )
inline

Definition at line 12711 of file object.h.

12711{ value_ |= kUnicode; }

◆ ToCString()

const char * dart::RegExpFlags::ToCString ( ) const

Definition at line 26765 of file object.cc.

26765 {
26766 switch (value_ & ~kGlobal) {
26768 return "imsu";
26770 return "ims";
26772 return "imu";
26773 case kIgnoreCase | kUnicode | kDotAll:
26774 return "ius";
26775 case kMultiLine | kDotAll | kUnicode:
26776 return "msu";
26777 case kIgnoreCase | kMultiLine:
26778 return "im";
26779 case kIgnoreCase | kDotAll:
26780 return "is";
26781 case kIgnoreCase | kUnicode:
26782 return "iu";
26783 case kMultiLine | kDotAll:
26784 return "ms";
26785 case kMultiLine | kUnicode:
26786 return "mu";
26787 case kDotAll | kUnicode:
26788 return "su";
26789 case kIgnoreCase:
26790 return "i";
26791 case kMultiLine:
26792 return "m";
26793 case kDotAll:
26794 return "s";
26795 case kUnicode:
26796 return "u";
26797 default:
26798 break;
26799 }
26800 return "";
26801}

◆ value()

int dart::RegExpFlags::value ( ) const
inline

Definition at line 12716 of file object.h.

12716{ return value_; }

Member Data Documentation

◆ kDefaultFlags

constexpr int dart::RegExpFlags::kDefaultFlags = 0
staticconstexpr

Definition at line 12691 of file object.h.


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