v8  3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InputBuffer< Reader, Input, kSize > Class Template Reference

#include <unicode.h>

Inheritance diagram for InputBuffer< Reader, Input, kSize >:
Collaboration diagram for InputBuffer< Reader, Input, kSize >:

Public Member Functions

virtual void Rewind ()
 
void Reset (Input input)
 
void Seek (unsigned position)
 
void Reset (unsigned position, Input input)
 
- Public Member Functions inherited from CharacterStream
uchar GetNext ()
 
bool has_more ()
 
unsigned Length ()
 
unsigned Utf16Length ()
 
virtual ~CharacterStream ()
 

Protected Member Functions

 InputBuffer ()
 
 InputBuffer (Input input)
 
virtual void FillBuffer ()
 
virtual bool BoundsCheck (unsigned offset)
 

Protected Attributes

unsigned offset_
 
Input input_
 
byte util_buffer_ [kSize]
 
- Protected Attributes inherited from CharacterStream
unsigned remaining_
 
unsigned cursor_
 
const bytebuffer_
 

Additional Inherited Members

- Static Public Member Functions inherited from CharacterStream
static bool EncodeCharacter (uchar c, byte *buffer, unsigned capacity, unsigned &offset)
 
static bool EncodeAsciiCharacter (uchar c, byte *buffer, unsigned capacity, unsigned &offset)
 
static bool EncodeNonAsciiCharacter (uchar c, byte *buffer, unsigned capacity, unsigned &offset)
 
static uchar DecodeCharacter (const byte *buffer, unsigned *offset)
 

Detailed Description

template<class Reader, class Input = Reader*, unsigned kSize = 256>
class unibrow::InputBuffer< Reader, Input, kSize >

Provides efficient access to encoded characters in strings. It does so by reading characters one block at a time, rather than one character at a time, which gives string implementations an opportunity to optimize the decoding.

Definition at line 222 of file unicode.h.

Constructor & Destructor Documentation

InputBuffer ( )
inlineprotected

Definition at line 229 of file unicode.h.

InputBuffer ( Input  input)
inlineexplicitprotected

Definition at line 230 of file unicode.h.

Member Function Documentation

virtual bool BoundsCheck ( unsigned  offset)
inlineprotectedvirtual

Implements CharacterStream.

Definition at line 232 of file unicode.h.

void FillBuffer ( )
protectedvirtual

Implements CharacterStream.

Definition at line 214 of file unicode-inl.h.

References buffer_.

void Reset ( unsigned  position,
I  input 
)
inline

Definition at line 224 of file unicode-inl.h.

References buffer_.

void Rewind ( )
virtual

Implements CharacterStream.

Definition at line 219 of file unicode-inl.h.

void Seek ( unsigned  position)
virtual

Reimplemented from CharacterStream.

Definition at line 238 of file unicode-inl.h.

References buffer_.

Field Documentation

Input input_
protected

Definition at line 240 of file unicode.h.

unsigned offset_
protected

Definition at line 238 of file unicode.h.

byte util_buffer_[kSize]
protected

Definition at line 245 of file unicode.h.

Referenced by InputBuffer< String, String *, 1024 >::BoundsCheck().


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