Flutter Engine
The Flutter Engine
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 12702 of file object.h.

Member Enumeration Documentation

◆ Flags

Enumerator
kNone 
kGlobal 
kIgnoreCase 
kMultiLine 
kUnicode 
kDotAll 

Definition at line 12708 of file object.h.

12708 {
12709 kNone = 0,
12710 kGlobal = 1,
12711 kIgnoreCase = 2,
12712 kMultiLine = 4,
12713 kUnicode = 8,
12714 kDotAll = 16,
12715 };

Constructor & Destructor Documentation

◆ RegExpFlags() [1/2]

dart::RegExpFlags::RegExpFlags ( )
inline

Definition at line 12719 of file object.h.

12719: value_(kDefaultFlags) {}
static constexpr int kDefaultFlags
Definition: object.h:12717

◆ RegExpFlags() [2/2]

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

Definition at line 12720 of file object.h.

12720: value_(value) {}
int value() const
Definition: object.h:12742

Member Function Documentation

◆ IgnoreCase()

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

Definition at line 12723 of file object.h.

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

◆ IsDotAll()

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

Definition at line 12726 of file object.h.

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

◆ IsGlobal()

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

Definition at line 12722 of file object.h.

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

◆ IsMultiLine()

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

Definition at line 12724 of file object.h.

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

◆ IsUnicode()

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

Definition at line 12725 of file object.h.

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

◆ NeedsUnicodeCaseEquivalents()

bool dart::RegExpFlags::NeedsUnicodeCaseEquivalents ( )
inline

Definition at line 12728 of file object.h.

12728 {
12729 // Both unicode and ignore_case flags are set. We need to use ICU to find
12730 // the closure over case equivalents.
12731 return IsUnicode() && IgnoreCase();
12732 }
bool IsUnicode() const
Definition: object.h:12725
bool IgnoreCase() const
Definition: object.h:12723

◆ operator!=()

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

Definition at line 12747 of file object.h.

12747 {
12748 return value_ != other.value_;
12749 }

◆ operator==()

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

Definition at line 12744 of file object.h.

12744 {
12745 return value_ == other.value_;
12746 }

◆ SetDotAll()

void dart::RegExpFlags::SetDotAll ( )
inline

Definition at line 12738 of file object.h.

12738{ value_ |= kDotAll; }

◆ SetGlobal()

void dart::RegExpFlags::SetGlobal ( )
inline

Definition at line 12734 of file object.h.

12734{ value_ |= kGlobal; }

◆ SetIgnoreCase()

void dart::RegExpFlags::SetIgnoreCase ( )
inline

Definition at line 12735 of file object.h.

12735{ value_ |= kIgnoreCase; }

◆ SetMultiLine()

void dart::RegExpFlags::SetMultiLine ( )
inline

Definition at line 12736 of file object.h.

12736{ value_ |= kMultiLine; }

◆ SetUnicode()

void dart::RegExpFlags::SetUnicode ( )
inline

Definition at line 12737 of file object.h.

12737{ value_ |= kUnicode; }

◆ ToCString()

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

Definition at line 26686 of file object.cc.

26686 {
26687 switch (value_ & ~kGlobal) {
26689 return "imsu";
26691 return "ims";
26693 return "imu";
26694 case kIgnoreCase | kUnicode | kDotAll:
26695 return "ius";
26696 case kMultiLine | kDotAll | kUnicode:
26697 return "msu";
26698 case kIgnoreCase | kMultiLine:
26699 return "im";
26700 case kIgnoreCase | kDotAll:
26701 return "is";
26702 case kIgnoreCase | kUnicode:
26703 return "iu";
26704 case kMultiLine | kDotAll:
26705 return "ms";
26706 case kMultiLine | kUnicode:
26707 return "mu";
26708 case kDotAll | kUnicode:
26709 return "su";
26710 case kIgnoreCase:
26711 return "i";
26712 case kMultiLine:
26713 return "m";
26714 case kDotAll:
26715 return "s";
26716 case kUnicode:
26717 return "u";
26718 default:
26719 break;
26720 }
26721 return "";
26722}

◆ value()

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

Definition at line 12742 of file object.h.

12742{ return value_; }

Member Data Documentation

◆ kDefaultFlags

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

Definition at line 12717 of file object.h.


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