IN2OSM  1.0.1
GenericValue< Encoding, Allocator >::ShortString

#include <document.h>

Collaboration diagram for GenericValue< Encoding, Allocator >::ShortString:
Collaboration graph

Public Types

enum  { MaxChars = sizeof(static_cast<Flag*>(0)->payload) / 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]
 

Detailed Description

template<typename Encoding, typename Allocator = MemoryPoolAllocator<>>
struct GenericValue< Encoding, Allocator >::ShortString

Definition at line 1970 of file document.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MaxChars 
MaxSize 
LenPos 

Definition at line 1971 of file document.h.

1971 { MaxChars = sizeof(static_cast<Flag*>(0)->payload) / sizeof(Ch), MaxSize = MaxChars - 1, LenPos = MaxSize };
Encoding::Ch Ch
Character type derived from Encoding.
Definition: document.h:584

Member Function Documentation

◆ GetLength()

SizeType GetLength ( ) const
inline

Definition at line 1976 of file document.h.

1976 { return static_cast<SizeType>(MaxSize - str[LenPos]); }
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition: rapidjson.h:384

◆ SetLength()

void SetLength ( SizeType  len)
inline

Definition at line 1975 of file document.h.

1975 { str[LenPos] = static_cast<Ch>(MaxSize - len); }
Encoding::Ch Ch
Character type derived from Encoding.
Definition: document.h:584

◆ Usable()

static bool Usable ( SizeType  len)
inlinestatic

Definition at line 1974 of file document.h.

1974 { return (MaxSize >= len); }

Member Data Documentation

◆ str

Ch str[MaxChars]

Definition at line 1972 of file document.h.


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