Bitcoin Core  27.99.0
P2P Digital Currency
Public Member Functions | Private Member Functions | Private Attributes | List of all members
JSONUTF8StringFilter Class Reference

Filter that generates and validates UTF-8, as well as collates UTF-16 surrogate pairs as specified in RFC4627. More...

#include <univalue_utffilter.h>

Public Member Functions

 JSONUTF8StringFilter (std::string &s)
 
void push_back (unsigned char ch)
 
void push_back_u (unsigned int codepoint_)
 
bool finalize ()
 

Private Member Functions

void append_codepoint (unsigned int codepoint_)
 

Private Attributes

std::string & str
 
bool is_valid {true}
 
unsigned int codepoint {0}
 
int state {0}
 
unsigned int surpair {0}
 

Detailed Description

Filter that generates and validates UTF-8, as well as collates UTF-16 surrogate pairs as specified in RFC4627.

Definition at line 13 of file univalue_utffilter.h.

Constructor & Destructor Documentation

◆ JSONUTF8StringFilter()

JSONUTF8StringFilter::JSONUTF8StringFilter ( std::string &  s)
inlineexplicit

Definition at line 16 of file univalue_utffilter.h.

Member Function Documentation

◆ append_codepoint()

void JSONUTF8StringFilter::append_codepoint ( unsigned int  codepoint_)
inlineprivate

Definition at line 99 of file univalue_utffilter.h.

Here is the caller graph for this function:

◆ finalize()

bool JSONUTF8StringFilter::finalize ( )
inline

Definition at line 74 of file univalue_utffilter.h.

◆ push_back()

void JSONUTF8StringFilter::push_back ( unsigned char  ch)
inline

Definition at line 21 of file univalue_utffilter.h.

Here is the call graph for this function:

◆ push_back_u()

void JSONUTF8StringFilter::push_back_u ( unsigned int  codepoint_)
inline

Definition at line 49 of file univalue_utffilter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ codepoint

unsigned int JSONUTF8StringFilter::codepoint {0}
private

Definition at line 84 of file univalue_utffilter.h.

◆ is_valid

bool JSONUTF8StringFilter::is_valid {true}
private

Definition at line 82 of file univalue_utffilter.h.

◆ state

int JSONUTF8StringFilter::state {0}
private

Definition at line 85 of file univalue_utffilter.h.

◆ str

std::string& JSONUTF8StringFilter::str
private

Definition at line 81 of file univalue_utffilter.h.

◆ surpair

unsigned int JSONUTF8StringFilter::surpair {0}
private

Definition at line 97 of file univalue_utffilter.h.


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