MySQL  8.0.27
Source Code Documentation
anonymous_namespace{json_path.cc}::Stream Class Reference

A simple input stream class for the JSON path parser. More...

Public Member Functions

 Stream (const char *string, size_t length)
 Creates an input stream reading from a character string. More...
 
const char * position () const
 Returns a pointer to the current position in the stream. More...
 
const char * end () const
 Returns a pointer to the position just after the end of the stream. More...
 
size_t remaining () const
 Returns the number of bytes remaining in the stream. More...
 
bool exhausted () const
 Tells if the stream has been exhausted. More...
 
char read ()
 Reads the next byte from the stream and moves the position forward. More...
 
char peek () const
 Reads the next byte from the stream without moving the position forward. More...
 
void skip_whitespace ()
 Moves the position to the next non-whitespace character. More...
 
void skip (size_t n)
 Moves the position n bytes forward. More...
 

Private Attributes

const char * m_position
 The current position in the stream. More...
 
const char *const m_end
 The end of the stream. More...
 

Detailed Description

A simple input stream class for the JSON path parser.

Constructor & Destructor Documentation

◆ Stream()

anonymous_namespace{json_path.cc}::Stream::Stream ( const char *  string,
size_t  length 
)
inline

Creates an input stream reading from a character string.

Parameters
stringthe input string
lengththe length of the input string

Member Function Documentation

◆ end()

const char* anonymous_namespace{json_path.cc}::Stream::end ( void  ) const
inline

Returns a pointer to the position just after the end of the stream.

◆ exhausted()

bool anonymous_namespace{json_path.cc}::Stream::exhausted ( ) const
inline

Tells if the stream has been exhausted.

◆ peek()

char anonymous_namespace{json_path.cc}::Stream::peek ( ) const
inline

Reads the next byte from the stream without moving the position forward.

◆ position()

const char* anonymous_namespace{json_path.cc}::Stream::position ( ) const
inline

Returns a pointer to the current position in the stream.

◆ read()

char anonymous_namespace{json_path.cc}::Stream::read ( )
inline

Reads the next byte from the stream and moves the position forward.

◆ remaining()

size_t anonymous_namespace{json_path.cc}::Stream::remaining ( ) const
inline

Returns the number of bytes remaining in the stream.

◆ skip()

void anonymous_namespace{json_path.cc}::Stream::skip ( size_t  n)
inline

Moves the position n bytes forward.

◆ skip_whitespace()

void anonymous_namespace{json_path.cc}::Stream::skip_whitespace ( )
inline

Moves the position to the next non-whitespace character.

Member Data Documentation

◆ m_end

const char* const anonymous_namespace{json_path.cc}::Stream::m_end
private

The end of the stream.

◆ m_position

const char* anonymous_namespace{json_path.cc}::Stream::m_position
private

The current position in the stream.


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