NCBI C++ ToolKit
Classes | Typedefs | Functions | Variables
rapidjson::internal Namespace Reference

Classes

struct  IsGenericValueImpl
 
struct  IsGenericValueImpl< T, typename Void< typename T::EncodingType >::Type, typename Void< typename T::AllocatorType >::Type >
 
struct  IsGenericValue
 
struct  TypeHelper
 
struct  TypeHelper< ValueType, bool >
 
struct  TypeHelper< ValueType, int >
 
struct  TypeHelper< ValueType, unsigned >
 
struct  TypeHelper< ValueType, int64_t >
 
struct  TypeHelper< ValueType, uint64_t >
 
struct  TypeHelper< ValueType, double >
 
struct  TypeHelper< ValueType, float >
 
struct  TypeHelper< ValueType, const typename ValueType::Ch * >
 
struct  TypeHelper< ValueType, typename ValueType::Array >
 
struct  TypeHelper< ValueType, typename ValueType::ConstArray >
 
struct  TypeHelper< ValueType, typename ValueType::Object >
 
struct  TypeHelper< ValueType, typename ValueType::ConstObject >
 
class  BigInteger
 
struct  DiyFp
 
class  Double
 
class  DecodedStream
 
class  GenericRegexSearch
 
class  GenericRegex
 Regular expression engine with subset of ECMAscript grammar. More...
 
class  Stack
 A type-unsafe stack for storing different types of data. More...
 
class  StreamLocalCopy
 
class  StreamLocalCopy< Stream, 1 >
 Do copy optimization. More...
 
class  StreamLocalCopy< Stream, 0 >
 Keep reference. More...
 
class  Schema
 
class  ISchemaValidator
 
class  ISchemaStateFactory
 
class  Hasher
 
struct  SchemaValidationContext
 
struct  TokenHelper
 
struct  TokenHelper< Stack, char >
 

Typedefs

typedef GenericRegex< UTF8<> > Regex
 
typedef GenericRegexSearch< RegexRegexSearch
 

Functions

DiyFp GetCachedPowerByIndex (size_t index)
 
DiyFp GetCachedPower (int e, int *K)
 
DiyFp GetCachedPower10 (int exp, int *outExp)
 
void GrisuRound (char *buffer, int len, uint64_t delta, uint64_t rest, uint64_t ten_kappa, uint64_t wp_w)
 
int CountDecimalDigit32 (uint32_t n)
 
void DigitGen (const DiyFp &W, const DiyFp &Mp, uint64_t delta, char *buffer, int *len, int *K)
 
void Grisu2 (double value, char *buffer, int *length, int *K)
 
char * WriteExponent (int K, char *buffer)
 
char * Prettify (char *buffer, int length, int k, int maxDecimalPlaces)
 
char * dtoa (double value, char *buffer, int maxDecimalPlaces=324)
 
const char * GetDigitsLut ()
 
char * u32toa (uint32_t value, char *buffer)
 
char * i32toa (int32_t value, char *buffer)
 
char * u64toa (uint64_t value, char *buffer)
 
char * i64toa (int64_t value, char *buffer)
 
double Pow10 (int n)
 Computes integer powers of 10 in double (10.0^n). More...
 
template<typename Ch >
SizeType StrLen (const Ch *s)
 Custom strlen() which works on different character types. More...
 
template<typename Encoding >
bool CountStringCodePoint (const typename Encoding::Ch *s, SizeType length, SizeType *outCount)
 Returns number of code points in a encoded string. More...
 
double FastPath (double significand, int exp)
 
double StrtodNormalPrecision (double d, int p)
 
template<typename T >
T Min3 (T a, T b, T c)
 
int CheckWithinHalfULP (double b, const BigInteger &d, int dExp)
 
bool StrtodFast (double d, int p, double *result)
 
bool StrtodDiyFp (const char *decimals, size_t length, size_t decimalPosition, int exp, double *result)
 
double StrtodBigInteger (double approx, const char *decimals, size_t length, size_t decimalPosition, int exp)
 
double StrtodFullPrecision (double d, int p, const char *decimals, size_t length, size_t decimalPosition, int exp)
 
template<typename T >
void Swap (T &a, T &b) RAPIDJSON_NOEXCEPT
 Custom swap() to avoid dependency on C++ <algorithm> header. More...
 

Variables

static const SizeType kRegexInvalidState = ~SizeType(0)
 Represents an invalid index in GenericRegex::State::out, out1. More...
 
static const SizeType kRegexInvalidRange = ~SizeType(0)
 

Typedef Documentation

◆ Regex

Definition at line 717 of file regex.h.

◆ RegexSearch

Definition at line 718 of file regex.h.

Function Documentation

◆ CheckWithinHalfULP()

int rapidjson::internal::CheckWithinHalfULP ( double  b,
const BigInteger d,
int  dExp 
)
inline

◆ CountDecimalDigit32()

int rapidjson::internal::CountDecimalDigit32 ( uint32_t  n)
inline

Definition at line 44 of file dtoa.h.

References n.

Referenced by DigitGen().

◆ CountStringCodePoint()

template<typename Encoding >
bool rapidjson::internal::CountStringCodePoint ( const typename Encoding::Ch *  s,
SizeType  length,
SizeType outCount 
)

Returns number of code points in a encoded string.

Definition at line 39 of file strfunc.h.

References Decode(), RAPIDJSON_ASSERT, and rapidjson::GenericStringStream< Encoding >::src_.

◆ DigitGen()

void rapidjson::internal::DigitGen ( const DiyFp W,
const DiyFp Mp,
uint64_t  delta,
char *  buffer,
int len,
int K 
)
inline

◆ dtoa()

char* rapidjson::internal::dtoa ( double  value,
char *  buffer,
int  maxDecimalPlaces = 324 
)
inline

◆ FastPath()

double rapidjson::internal::FastPath ( double  significand,
int  exp 
)
inline

Definition at line 26 of file strtod.h.

References Pow10().

Referenced by StrtodFast(), and StrtodNormalPrecision().

◆ GetCachedPower()

DiyFp rapidjson::internal::GetCachedPower ( int  e,
int K 
)
inline

Definition at line 226 of file diyfp.h.

References GetCachedPowerByIndex().

Referenced by Grisu2().

◆ GetCachedPower10()

DiyFp rapidjson::internal::GetCachedPower10 ( int  exp,
int outExp 
)
inline

Definition at line 240 of file diyfp.h.

References GetCachedPowerByIndex().

Referenced by StrtodDiyFp().

◆ GetCachedPowerByIndex()

DiyFp rapidjson::internal::GetCachedPowerByIndex ( size_t  index)
inline

Definition at line 164 of file diyfp.h.

References RAPIDJSON_UINT64_C2.

Referenced by GetCachedPower(), and GetCachedPower10().

◆ GetDigitsLut()

const char* rapidjson::internal::GetDigitsLut ( )
inline

Definition at line 23 of file itoa.h.

Referenced by u32toa(), u64toa(), and WriteExponent().

◆ Grisu2()

void rapidjson::internal::Grisu2 ( double  value,
char *  buffer,
int length,
int K 
)
inline

◆ GrisuRound()

void rapidjson::internal::GrisuRound ( char *  buffer,
int  len,
uint64_t  delta,
uint64_t  rest,
uint64_t  ten_kappa,
uint64_t  wp_w 
)
inline

Definition at line 35 of file dtoa.h.

References buffer, and len.

Referenced by DigitGen().

◆ i32toa()

char* rapidjson::internal::i32toa ( int32_t  value,
char *  buffer 
)
inline

◆ i64toa()

char* rapidjson::internal::i64toa ( int64_t  value,
char *  buffer 
)
inline

◆ Min3()

template<typename T >
T rapidjson::internal::Min3 ( T  a,
T  b,
T  c 
)
inline

Definition at line 47 of file strtod.h.

References a, b, and T.

Referenced by CheckWithinHalfULP().

◆ Pow10()

double rapidjson::internal::Pow10 ( int  n)
inline

Computes integer powers of 10 in double (10.0^n).

This function uses lookup table for fast and accurate results.

Parameters
nnon-negative exponent. Must <= 308.
Returns
10.0^n

Definition at line 28 of file pow10.h.

References n, and RAPIDJSON_ASSERT.

Referenced by FastPath(), and StrtodFast().

◆ Prettify()

char* rapidjson::internal::Prettify ( char *  buffer,
int  length,
int  k,
int  maxDecimalPlaces 
)
inline

Definition at line 150 of file dtoa.h.

References buffer, i, memmove, offset, and WriteExponent().

Referenced by dtoa().

◆ StrLen()

template<typename Ch >
SizeType rapidjson::internal::StrLen ( const Ch *  s)
inline

Custom strlen() which works on different character types.

Template Parameters
ChCharacter type (e.g. char, wchar_t, short)
Parameters
sNull-terminated input string.
Returns
Number of characters in the string.
Note
This has the same semantics as strlen(), the return value is not number of Unicode codepoints.

Definition at line 30 of file strfunc.h.

References RAPIDJSON_ASSERT.

◆ StrtodBigInteger()

double rapidjson::internal::StrtodBigInteger ( double  approx,
const char *  decimals,
size_t  length,
size_t  decimalPosition,
int  exp 
)
inline

Definition at line 206 of file strtod.h.

References a, approx(), and CheckWithinHalfULP().

Referenced by StrtodFullPrecision().

◆ StrtodDiyFp()

bool rapidjson::internal::StrtodDiyFp ( const char *  decimals,
size_t  length,
size_t  decimalPosition,
int  exp,
double *  result 
)
inline

◆ StrtodFast()

bool rapidjson::internal::StrtodFast ( double  d,
int  p,
double *  result 
)
inline

Definition at line 111 of file strtod.h.

References FastPath(), Pow10(), and result.

Referenced by StrtodFullPrecision().

◆ StrtodFullPrecision()

double rapidjson::internal::StrtodFullPrecision ( double  d,
int  p,
const char *  decimals,
size_t  length,
size_t  decimalPosition,
int  exp 
)
inline

◆ StrtodNormalPrecision()

double rapidjson::internal::StrtodNormalPrecision ( double  d,
int  p 
)
inline

◆ Swap()

template<typename T >
void rapidjson::internal::Swap ( T a,
T b 
)
inline

Custom swap() to avoid dependency on C++ <algorithm> header.

Template Parameters
TType of the arguments to swap, should be instantiated with primitive C++ types only.
Note
This has the same semantics as std::swap().

Definition at line 33 of file swap.h.

References a, b, T, and tmp.

Referenced by rapidjson::internal::GenericRegexSearch< RegexType, Allocator >::SearchWithAnchoring(), rapidjson::GenericDocument< Encoding, Allocator, StackAllocator >::Swap(), and rapidjson::internal::Stack< StackAllocator >::Swap().

◆ u32toa()

char* rapidjson::internal::u32toa ( uint32_t  value,
char *  buffer 
)
inline

◆ u64toa()

char* rapidjson::internal::u64toa ( uint64_t  value,
char *  buffer 
)
inline

◆ WriteExponent()

char* rapidjson::internal::WriteExponent ( int  K,
char *  buffer 
)
inline

Definition at line 126 of file dtoa.h.

References buffer, and GetDigitsLut().

Referenced by Prettify().

Variable Documentation

◆ kRegexInvalidRange

const SizeType rapidjson::internal::kRegexInvalidRange = ~SizeType(0)
static

◆ kRegexInvalidState

const SizeType rapidjson::internal::kRegexInvalidState = ~SizeType(0)
static
Modified on Tue May 21 10:59:22 2024 by modify_doxy.py rev. 669887