Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::BlockStack< BlockSize >::List Class Reference

#include <pointer_block.h>

Public Member Functions

 List ()
 
 ~List ()
 
void Push (Block *block)
 
BlockPop ()
 
intptr_t length () const
 
bool IsEmpty () const
 
BlockPopAll ()
 
BlockPeek ()
 

Detailed Description

template<int BlockSize>
class dart::BlockStack< BlockSize >::List

Definition at line 119 of file pointer_block.h.

Constructor & Destructor Documentation

◆ List()

template<int BlockSize>
dart::BlockStack< BlockSize >::List::List ( )
inline

Definition at line 121 of file pointer_block.h.

121: head_(nullptr), length_(0) {}

◆ ~List()

template<int BlockSize>
dart::BlockStack< BlockSize >::List::~List

Definition at line 220 of file pointer_block.cc.

220 {
221 while (!IsEmpty()) {
222 delete Pop();
223 }
224}

Member Function Documentation

◆ IsEmpty()

template<int BlockSize>
bool dart::BlockStack< BlockSize >::List::IsEmpty ( ) const
inline

Definition at line 126 of file pointer_block.h.

126{ return head_ == nullptr; }

◆ length()

template<int BlockSize>
intptr_t dart::BlockStack< BlockSize >::List::length ( ) const
inline

Definition at line 125 of file pointer_block.h.

125{ return length_; }

◆ Peek()

template<int BlockSize>
Block * dart::BlockStack< BlockSize >::List::Peek ( )
inline

Definition at line 128 of file pointer_block.h.

128{ return head_; }

◆ Pop()

template<int BlockSize>
BlockStack< BlockSize >::Block * dart::BlockStack< BlockSize >::List::Pop

Definition at line 227 of file pointer_block.cc.

227 {
228 Block* result = head_;
229 head_ = head_->next_;
230 --length_;
231 result->next_ = nullptr;
232 return result;
233}
GAsyncResult * result

◆ PopAll()

template<int BlockSize>
BlockStack< BlockSize >::Block * dart::BlockStack< BlockSize >::List::PopAll

Definition at line 236 of file pointer_block.cc.

236 {
237 Block* result = head_;
238 head_ = nullptr;
239 length_ = 0;
240 return result;
241}

◆ Push()

template<int BlockSize>
void dart::BlockStack< BlockSize >::List::Push ( Block block)

Definition at line 244 of file pointer_block.cc.

244 {
245 ASSERT(block->next_ == nullptr);
246 block->next_ = head_;
247 head_ = block;
248 ++length_;
249}
#define ASSERT(E)

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