TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GenericValue< Encoding, Allocator >::ShortString Struct Reference

#include <document.h>

Public Types

enum  { MaxChars = sizeof(String) / sizeof(Ch), MaxSize = MaxChars - 1, LenPos = MaxSize }
 

Public Member Functions

void SetLength (SizeType len)
 
SizeType GetLength () const
 

Static Public Member Functions

static bool Usable (SizeType len)
 

Public Attributes

Ch str [MaxChars]
 

Member Enumeration Documentation

template<typename Encoding, typename Allocator = MemoryPoolAllocator<>>
anonymous enum
Enumerator
MaxChars 
MaxSize 
LenPos 
1576 { MaxChars = sizeof(String) / sizeof(Ch), MaxSize = MaxChars - 1, LenPos = MaxSize };
Definition: document.h:1576
Encoding::Ch Ch
Character type derived from Encoding.
Definition: document.h:424
Definition: document.h:1576
Definition: document.h:1576

Member Function Documentation

template<typename Encoding, typename Allocator = MemoryPoolAllocator<>>
SizeType GenericValue< Encoding, Allocator >::ShortString::GetLength ( ) const
inline
1581 { return (SizeType)(MaxSize - str[LenPos]); }
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition: rapidjson.h:322
Definition: document.h:1576
Ch str[MaxChars]
Definition: document.h:1577
Definition: document.h:1576
template<typename Encoding, typename Allocator = MemoryPoolAllocator<>>
void GenericValue< Encoding, Allocator >::ShortString::SetLength ( SizeType  len)
inline
1580 { str[LenPos] = (Ch)(MaxSize - len); }
Definition: document.h:1576
Ch str[MaxChars]
Definition: document.h:1577
Encoding::Ch Ch
Character type derived from Encoding.
Definition: document.h:424
Definition: document.h:1576

+ Here is the caller graph for this function:

template<typename Encoding, typename Allocator = MemoryPoolAllocator<>>
static bool GenericValue< Encoding, Allocator >::ShortString::Usable ( SizeType  len)
inlinestatic
1579 { return (MaxSize >= len); }
Definition: document.h:1576

+ Here is the caller graph for this function:

Member Data Documentation

template<typename Encoding, typename Allocator = MemoryPoolAllocator<>>
Ch GenericValue< Encoding, Allocator >::ShortString::str[MaxChars]

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