JsonCpp project page Classes Namespace JsonCpp home page

Json::SecureAllocator< T > Class Template Reference

#include <json/allocator.h>

Classes

struct  rebind
 

Public Types

using value_type = T
 
using pointer = T *
 
using const_pointer = const T *
 
using reference = T &
 
using const_reference = const T &
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 

Public Member Functions

pointer allocate (size_type n)
 Allocate memory for N items using the standard allocator. More...
 
void deallocate (pointer p, size_type n)
 Release memory which was allocated for N items at pointer P. More...
 
template<typename... Args>
void construct (pointer p, Args &&... args)
 Construct an item in-place at pointer P. More...
 
size_type max_size () const
 
pointer address (reference x) const
 
const_pointer address (const_reference x) const
 
void destroy (pointer p)
 Destroy an item in-place at pointer P. More...
 
 SecureAllocator ()
 
template<typename U >
 SecureAllocator (const SecureAllocator< U > &)
 

Member Typedef Documentation

◆ const_pointer

template<typename T >
using Json::SecureAllocator< T >::const_pointer = const T*

◆ const_reference

template<typename T >
using Json::SecureAllocator< T >::const_reference = const T&

◆ difference_type

template<typename T >
using Json::SecureAllocator< T >::difference_type = std::ptrdiff_t

◆ pointer

template<typename T >
using Json::SecureAllocator< T >::pointer = T*

◆ reference

template<typename T >
using Json::SecureAllocator< T >::reference = T&

◆ size_type

template<typename T >
using Json::SecureAllocator< T >::size_type = std::size_t

◆ value_type

template<typename T >
using Json::SecureAllocator< T >::value_type = T

Constructor & Destructor Documentation

◆ SecureAllocator() [1/2]

template<typename T >
Json::SecureAllocator< T >::SecureAllocator ( )
inline

◆ SecureAllocator() [2/2]

template<typename T >
template<typename U >
Json::SecureAllocator< T >::SecureAllocator ( const SecureAllocator< U > &  )
inline

Member Function Documentation

◆ address() [1/2]

template<typename T >
const_pointer Json::SecureAllocator< T >::address ( const_reference  x) const
inline

◆ address() [2/2]

template<typename T >
pointer Json::SecureAllocator< T >::address ( reference  x) const
inline

◆ allocate()

template<typename T >
pointer Json::SecureAllocator< T >::allocate ( size_type  n)
inline

Allocate memory for N items using the standard allocator.

◆ construct()

template<typename T >
template<typename... Args>
void Json::SecureAllocator< T >::construct ( pointer  p,
Args &&...  args 
)
inline

Construct an item in-place at pointer P.

◆ deallocate()

template<typename T >
void Json::SecureAllocator< T >::deallocate ( pointer  p,
size_type  n 
)
inline

Release memory which was allocated for N items at pointer P.

The memory block is filled with zeroes before being released.

◆ destroy()

template<typename T >
void Json::SecureAllocator< T >::destroy ( pointer  p)
inline

Destroy an item in-place at pointer P.

◆ max_size()

template<typename T >
size_type Json::SecureAllocator< T >::max_size ( ) const
inline

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