Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Friends | List of all members
ui::AXTreeID Class Reference

#include <ax_tree_id.h>

Public Member Functions

 AXTreeID ()
 
 AXTreeID (const AXTreeID &other)
 
AXTreeIDoperator= (const AXTreeID &other)
 
std::string ToString () const
 
ax::mojom::AXTreeIDType type () const
 
const std::optional< base::SimpleToken > & token () const
 
bool operator== (const AXTreeID &rhs) const
 
bool operator!= (const AXTreeID &rhs) const
 
bool operator< (const AXTreeID &rhs) const
 
bool operator<= (const AXTreeID &rhs) const
 
bool operator> (const AXTreeID &rhs) const
 
bool operator>= (const AXTreeID &rhs) const
 

Static Public Member Functions

static AXTreeID CreateNewAXTreeID ()
 
static AXTreeID FromString (const std::string &string)
 
static AXTreeID FromToken (const base::SimpleToken &token)
 

Friends

class base::NoDestructor< AXTreeID >
 
void swap (AXTreeID &first, AXTreeID &second)
 

Detailed Description

Definition at line 18 of file ax_tree_id.h.

Constructor & Destructor Documentation

◆ AXTreeID() [1/2]

ui::AXTreeID::AXTreeID ( )

◆ AXTreeID() [2/2]

ui::AXTreeID::AXTreeID ( const AXTreeID other)
default

Member Function Documentation

◆ CreateNewAXTreeID()

AXTreeID ui::AXTreeID::CreateNewAXTreeID ( )
static

Definition at line 47 of file ax_tree_id.cc.

◆ FromString()

AXTreeID ui::AXTreeID::FromString ( const std::string &  string)
static

Definition at line 37 of file ax_tree_id.cc.

37 {
38 return AXTreeID(string);
39}

◆ FromToken()

AXTreeID ui::AXTreeID::FromToken ( const base::SimpleToken token)
static

Definition at line 42 of file ax_tree_id.cc.

42 {
43 return AXTreeID(token.ToString());
44}
const std::optional< base::SimpleToken > & token() const
Definition: ax_tree_id.h:43

◆ operator!=()

bool ui::AXTreeID::operator!= ( const AXTreeID rhs) const

Definition at line 74 of file ax_tree_id.cc.

74 {
75 return !(*this == rhs);
76}

◆ operator<()

bool ui::AXTreeID::operator< ( const AXTreeID rhs) const

Definition at line 78 of file ax_tree_id.cc.

78 {
79 return std::tie(type_, token_) < std::tie(rhs.type_, rhs.token_);
80}

◆ operator<=()

bool ui::AXTreeID::operator<= ( const AXTreeID rhs) const

Definition at line 82 of file ax_tree_id.cc.

82 {
83 return std::tie(type_, token_) <= std::tie(rhs.type_, rhs.token_);
84}

◆ operator=()

AXTreeID & ui::AXTreeID::operator= ( const AXTreeID other)
default

◆ operator==()

bool ui::AXTreeID::operator== ( const AXTreeID rhs) const

Definition at line 70 of file ax_tree_id.cc.

70 {
71 return type_ == rhs.type_ && token_ == rhs.token_;
72}

◆ operator>()

bool ui::AXTreeID::operator> ( const AXTreeID rhs) const

Definition at line 86 of file ax_tree_id.cc.

86 {
87 return !(*this <= rhs);
88}

◆ operator>=()

bool ui::AXTreeID::operator>= ( const AXTreeID rhs) const

Definition at line 90 of file ax_tree_id.cc.

90 {
91 return !(*this < rhs);
92}

◆ token()

const std::optional< base::SimpleToken > & ui::AXTreeID::token ( ) const
inline

Definition at line 43 of file ax_tree_id.h.

43{ return token_; }

◆ ToString()

std::string ui::AXTreeID::ToString ( ) const

Definition at line 53 of file ax_tree_id.cc.

53 {
54 switch (type_) {
56 return "";
58 return base::SimpleTokenToValue(*token_);
59 }
60
62 return std::string();
63}
std::string SimpleTokenToValue(const SimpleToken &token)
Definition: simple_token.cc:39
#define BASE_UNREACHABLE()
Definition: logging.h:69

◆ type()

ax::mojom::AXTreeIDType ui::AXTreeID::type ( ) const
inline

Definition at line 42 of file ax_tree_id.h.

42{ return type_; }

Friends And Related Function Documentation

◆ base::NoDestructor< AXTreeID >

friend class base::NoDestructor< AXTreeID >
friend

Definition at line 54 of file ax_tree_id.h.

◆ swap

void swap ( AXTreeID first,
AXTreeID second 
)
friend

Definition at line 65 of file ax_tree_id.cc.

65 {
66 std::swap(first.type_, second.type_);
67 std::swap(first.token_, second.token_);
68}
void swap(sk_sp< T > &a, sk_sp< T > &b)
Definition: SkRefCnt.h:341

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