NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
rapidjson::internal::Hasher< Encoding, Allocator > Class Template Reference

Search Toolkit Book for rapidjson::internal::Hasher

#include <misc/jsonwrapp/rapidjson11/schema.h>

+ Collaboration diagram for rapidjson::internal::Hasher< Encoding, Allocator >:

Classes

struct  Number
 

Public Types

typedef Encoding::Ch Ch
 

Public Member Functions

 Hasher (Allocator *allocator=0, size_t stackCapacity=kDefaultSize)
 
bool Null ()
 
bool Bool (bool b)
 
bool Int (int i)
 
bool Uint (unsigned u)
 
bool Int64 (int64_t i)
 
bool Uint64 (uint64_t u)
 
bool Double (double d)
 
bool RawNumber (const Ch *str, SizeType len, bool)
 
bool String (const Ch *str, SizeType len, bool)
 
bool StartObject ()
 
bool Key (const Ch *str, SizeType len, bool copy)
 
bool EndObject (SizeType memberCount)
 
bool StartArray ()
 
bool EndArray (SizeType elementCount)
 
bool IsValid () const
 
uint64_t GetHashCode () const
 

Private Member Functions

bool WriteType (Type type)
 
bool WriteNumber (const Number &n)
 
bool WriteBuffer (Type type, const void *data, size_t len)
 

Static Private Member Functions

static uint64_t Hash (uint64_t h, uint64_t d)
 

Private Attributes

Stack< Allocatorstack_
 

Static Private Attributes

static const size_t kDefaultSize = 256
 

Detailed Description

template<typename Encoding, typename Allocator>
class rapidjson::internal::Hasher< Encoding, Allocator >

Definition at line 165 of file schema.h.

Member Typedef Documentation

◆ Ch

template<typename Encoding , typename Allocator >
typedef Encoding::Ch rapidjson::internal::Hasher< Encoding, Allocator >::Ch

Definition at line 167 of file schema.h.

Constructor & Destructor Documentation

◆ Hasher()

template<typename Encoding , typename Allocator >
rapidjson::internal::Hasher< Encoding, Allocator >::Hasher ( Allocator allocator = 0,
size_t  stackCapacity = kDefaultSize 
)
inline

Definition at line 169 of file schema.h.

Member Function Documentation

◆ Bool()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::Bool ( bool  b)
inline

Definition at line 172 of file schema.h.

References b, rapidjson::kFalseType, and rapidjson::kTrueType.

◆ Double()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::Double ( double  d)
inline

Definition at line 177 of file schema.h.

References n.

◆ EndArray()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::EndArray ( SizeType  elementCount)
inline

Definition at line 207 of file schema.h.

References util::Hash(), i, and rapidjson::kArrayType.

◆ EndObject()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::EndObject ( SizeType  memberCount)
inline

Definition at line 197 of file schema.h.

References util::Hash(), i, and rapidjson::kObjectType.

◆ GetHashCode()

template<typename Encoding , typename Allocator >
uint64_t rapidjson::internal::Hasher< Encoding, Allocator >::GetHashCode ( ) const
inline

Definition at line 218 of file schema.h.

References IsValid(), and RAPIDJSON_ASSERT.

◆ Hash()

template<typename Encoding , typename Allocator >
static uint64_t rapidjson::internal::Hasher< Encoding, Allocator >::Hash ( uint64_t  h,
uint64_t  d 
)
inlinestaticprivate

Definition at line 247 of file schema.h.

References RAPIDJSON_UINT64_C2.

◆ Int()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::Int ( int  i)
inline

Definition at line 173 of file schema.h.

References i, and n.

◆ Int64()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::Int64 ( int64_t  i)
inline

Definition at line 175 of file schema.h.

References i, and n.

◆ IsValid()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::IsValid ( void  ) const
inline

Definition at line 216 of file schema.h.

References uint64_t.

◆ Key()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::Key ( const Ch str,
SizeType  len,
bool  copy 
)
inline

Definition at line 196 of file schema.h.

References copy(), len, and str().

◆ Null()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::Null ( )
inline

Definition at line 171 of file schema.h.

References rapidjson::kNullType.

◆ RawNumber()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::RawNumber ( const Ch str,
SizeType  len,
bool   
)
inline

Definition at line 185 of file schema.h.

References rapidjson::kNumberType, len, and str().

◆ StartArray()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::StartArray ( )
inline

Definition at line 206 of file schema.h.

◆ StartObject()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::StartObject ( )
inline

Definition at line 195 of file schema.h.

◆ String()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::String ( const Ch str,
SizeType  len,
bool   
)
inline

Definition at line 190 of file schema.h.

References rapidjson::kStringType, len, and str().

◆ Uint()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::Uint ( unsigned  u)
inline

Definition at line 174 of file schema.h.

References n.

◆ Uint64()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::Uint64 ( uint64_t  u)
inline

Definition at line 176 of file schema.h.

References n.

◆ WriteBuffer()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::WriteBuffer ( Type  type,
const void *  data,
size_t  len 
)
inlineprivate

Definition at line 237 of file schema.h.

References data, util::Hash(), i, len, and RAPIDJSON_UINT64_C2.

◆ WriteNumber()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::WriteNumber ( const Number n)
inlineprivate

Definition at line 235 of file schema.h.

References rapidjson::kNumberType, and n.

◆ WriteType()

template<typename Encoding , typename Allocator >
bool rapidjson::internal::Hasher< Encoding, Allocator >::WriteType ( Type  type)
inlineprivate

Definition at line 233 of file schema.h.

Member Data Documentation

◆ kDefaultSize

template<typename Encoding , typename Allocator >
const size_t rapidjson::internal::Hasher< Encoding, Allocator >::kDefaultSize = 256
staticprivate

Definition at line 224 of file schema.h.

◆ stack_

template<typename Encoding , typename Allocator >
Stack<Allocator> rapidjson::internal::Hasher< Encoding, Allocator >::stack_
private

Definition at line 254 of file schema.h.


The documentation for this class was generated from the following file:
Modified on Sat May 25 14:21:11 2024 by modify_doxy.py rev. 669887