Flutter Engine
The Flutter Engine
Public Member Functions | Private Member Functions | List of all members
dart::ZoneWriteStream Class Reference

#include <datastream.h>

Inheritance diagram for dart::ZoneWriteStream:
dart::NonStreamingWriteStream dart::BaseWriteStream dart::ValueObject

Public Member Functions

 ZoneWriteStream (Zone *zone, intptr_t initial_size)
 
- Public Member Functions inherited from dart::NonStreamingWriteStream
 NonStreamingWriteStream (intptr_t initial_size)
 
uint8_t * buffer () const
 
DART_FORCE_INLINE void SetPosition (intptr_t value)
 
- Public Member Functions inherited from dart::BaseWriteStream
 BaseWriteStream (intptr_t initial_size)
 
virtual ~BaseWriteStream ()
 
DART_FORCE_INLINE intptr_t bytes_written () const
 
virtual intptr_t Position () const
 
intptr_t Align (intptr_t alignment, intptr_t offset=0)
 
void WriteWordWith32BitWrites (uword value)
 
template<typename T >
void WriteUnsigned (T value)
 
void WriteRefId (intptr_t value)
 
void WriteBytes (const void *addr, intptr_t len)
 
void WriteWord (uword value)
 
void WriteTargetWord (word value)
 
void Printf (const char *format,...) PRINTF_ATTRIBUTE(2
 
void va_start (args, format)
 
 VPrintf (format, args)
 
 va_end (args)
 
void VPrintf (const char *format, va_list args)
 
template<typename T >
void Write (T value)
 
template<typename T >
void WriteFixed (T value)
 
DART_FORCE_INLINE void WriteByte (uint8_t value)
 
void WriteString (const char *cstr)
 
template<typename T >
C::only_if_unsigned< T, void > WriteLEB128 (T value)
 
template<typename T >
C::only_if_signed< T, void > WriteLEB128 (T value)
 
template<typename T >
C::only_if_signed< T, void > WriteSLEB128 (T value)
 
template<typename T >
C::only_if_unsigned< T, void > WriteSLEB128 (T value)
 
- Public Member Functions inherited from dart::ValueObject
 ValueObject ()
 
 ~ValueObject ()
 

Private Member Functions

virtual void Realloc (intptr_t new_size)
 

Additional Inherited Members

- Protected Member Functions inherited from dart::BaseWriteStream
void EnsureSpace (intptr_t size_needed)
 
virtual void SetPosition (intptr_t value)
 
DART_FORCE_INLINE intptr_t Remaining () const
 
virtual void Realloc (intptr_t new_capacity)=0
 
 DISALLOW_COPY_AND_ASSIGN (BaseWriteStream)
 
- Protected Attributes inherited from dart::BaseWriteStream
const intptr_t initial_size_
 
uint8_t * buffer_ = nullptr
 
uint8_t * current_ = nullptr
 
intptr_t capacity_ = 0
 

Detailed Description

Definition at line 651 of file datastream.h.

Constructor & Destructor Documentation

◆ ZoneWriteStream()

dart::ZoneWriteStream::ZoneWriteStream ( Zone zone,
intptr_t  initial_size 
)
inline

Definition at line 653 of file datastream.h.

654 : NonStreamingWriteStream(initial_size), zone_(zone) {}
NonStreamingWriteStream(intptr_t initial_size)
Definition: datastream.h:611

Member Function Documentation

◆ Realloc()

void dart::ZoneWriteStream::Realloc ( intptr_t  new_size)
privatevirtual

Implements dart::BaseWriteStream.

Definition at line 28 of file datastream.cc.

28 {
29 const intptr_t old_offset = current_ - buffer_;
30 buffer_ = zone_->Realloc(buffer_, capacity_, new_size);
31 capacity_ = buffer_ != nullptr ? new_size : 0;
32 current_ = buffer_ != nullptr ? buffer_ + old_offset : nullptr;
33}
ElementType * Realloc(ElementType *old_array, intptr_t old_length, intptr_t new_length)

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