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

#include <schema.h>

Classes

struct  Number
 

Public Types

typedef Encoding::Ch Ch
 

Public Member Functions

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

Private Member Functions

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

Static Private Member Functions

static uint64_t Hash (uint64_t h, uint64_t d)
 

Private Attributes

Stack< Allocator > stack_
 

Static Private Attributes

static const size_t kDefaultSize = 256
 

Detailed Description

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

Definition at line 235 of file schema.h.

Member Typedef Documentation

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

Definition at line 238 of file schema.h.

Constructor & Destructor Documentation

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

Definition at line 240 of file schema.h.

Member Function Documentation

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

Definition at line 248 of file schema.h.

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

Definition at line 280 of file schema.h.

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

Definition at line 325 of file schema.h.

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

Definition at line 311 of file schema.h.

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

Definition at line 340 of file schema.h.

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

Definition at line 379 of file schema.h.

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

Definition at line 252 of file schema.h.

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

Definition at line 266 of file schema.h.

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

Definition at line 335 of file schema.h.

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

Definition at line 307 of file schema.h.

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

Definition at line 244 of file schema.h.

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

Definition at line 291 of file schema.h.

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

Definition at line 321 of file schema.h.

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

Definition at line 303 of file schema.h.

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

Definition at line 297 of file schema.h.

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

Definition at line 259 of file schema.h.

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

Definition at line 273 of file schema.h.

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

Definition at line 368 of file schema.h.

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

Definition at line 363 of file schema.h.

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

Definition at line 358 of file schema.h.

Member Data Documentation

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

Definition at line 347 of file schema.h.

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

Definition at line 387 of file schema.h.


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


xbot_talker
Author(s): wangxiaoyun
autogenerated on Sat Oct 10 2020 03:27:54