Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
dart::PortSet< T >::Iterator Class Reference

#include <port_set.h>

Public Member Functions

 Iterator (PortSet< T > *ports, intptr_t index)
 
DART_FORCE_INLINE Toperator-> () const
 
DART_FORCE_INLINE Toperator* () const
 
DART_FORCE_INLINE bool operator== (const Iterator &other) const
 
DART_FORCE_INLINE bool operator!= (const Iterator &other) const
 
DART_FORCE_INLINE Iteratoroperator++ ()
 
DART_FORCE_INLINE void Delete ()
 

Friends

class PortSet
 

Detailed Description

template<typename T>
class dart::PortSet< T >::Iterator

Definition at line 29 of file port_set.h.

Constructor & Destructor Documentation

◆ Iterator()

template<typename T >
dart::PortSet< T >::Iterator::Iterator ( PortSet< T > *  ports,
intptr_t  index 
)
inline

Definition at line 31 of file port_set.h.

31 : ports_(ports), index_(index) {
32#if defined(DEBUG)
33 dirty_counter_ = ports_->dirty_counter_;
34#endif
35 }

Member Function Documentation

◆ Delete()

template<typename T >
DART_FORCE_INLINE void dart::PortSet< T >::Iterator::Delete ( )
inline

Definition at line 75 of file port_set.h.

75 {
76 DEBUG_ASSERT(!WasModified());
77 ports_->map_[index_] = T();
78 ports_->map_[index_].port = kDeletedPort;
79 ports_->used_--;
80 ports_->deleted_++;
81 }
#define DEBUG_ASSERT(cond)
Definition assert.h:321
static constexpr Dart_Port kDeletedPort
Definition port_set.h:20
#define T

◆ operator!=()

template<typename T >
DART_FORCE_INLINE bool dart::PortSet< T >::Iterator::operator!= ( const Iterator other) const
inline

Definition at line 53 of file port_set.h.

53 {
54 DEBUG_ASSERT(!WasModified());
55 return !(*this == other);
56 }

◆ operator*()

template<typename T >
DART_FORCE_INLINE T & dart::PortSet< T >::Iterator::operator* ( ) const
inline

Definition at line 42 of file port_set.h.

42 {
43 ASSERT(index_ >= 0 && index_ < ports_->capacity_);
44 DEBUG_ASSERT(!WasModified());
45 return ports_->map_[index_];
46 }
#define ASSERT(E)

◆ operator++()

template<typename T >
DART_FORCE_INLINE Iterator & dart::PortSet< T >::Iterator::operator++ ( )
inline

Definition at line 58 of file port_set.h.

58 {
59 DEBUG_ASSERT(!WasModified());
60 index_++;
61 while (index_ < ports_->capacity_) {
62 const Dart_Port port = ports_->map_[index_].port;
63 if (port == kFreePort || port == kDeletedPort) {
64 index_++;
65 continue;
66 } else {
67 break;
68 }
69 }
70 return *this;
71 }
static constexpr Dart_Port kFreePort
Definition port_set.h:19
int64_t Dart_Port
Definition dart_api.h:1524
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service port
Definition switches.h:87

◆ operator->()

template<typename T >
DART_FORCE_INLINE T & dart::PortSet< T >::Iterator::operator-> ( ) const
inline

Definition at line 37 of file port_set.h.

37 {
38 ASSERT(index_ >= 0 && index_ < ports_->capacity_);
39 DEBUG_ASSERT(!WasModified());
40 return ports_->map_[index_];
41 }

◆ operator==()

template<typename T >
DART_FORCE_INLINE bool dart::PortSet< T >::Iterator::operator== ( const Iterator other) const
inline

Definition at line 48 of file port_set.h.

48 {
49 DEBUG_ASSERT(!WasModified());
50 return ports_ == other.ports_ && index_ == other.index_;
51 }

Friends And Related Symbol Documentation

◆ PortSet

template<typename T >
friend class PortSet
friend

Definition at line 84 of file port_set.h.


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