JsonCpp project page | Classes | Namespace | JsonCpp home page

Classes | Public Types | Public Member Functions | List of all members
Json::SecureAllocator< T > Class Template Reference

`#include <json/allocator.h>`

Inheritance diagram for Json::SecureAllocator< T >:
Collaboration diagram for Json::SecureAllocator< T >:

## 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.
void | deallocate (pointer p, size_type n)
| Release memory which was allocated for N items at pointer P.
template<typename... Args>
void | construct (pointer p, Args &&... args)
| Construct an item in-place at pointer P.
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.
| SecureAllocator ()
template<typename U>
| SecureAllocator (const SecureAllocator< U > &)

## Detailed Description

template<typename T>
class Json::SecureAllocator< T >

Definition at line 17 of file allocator.h.

## Member Typedef Documentation

## ◆ const_pointer

template<typename T>

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

Definition at line 22 of file allocator.h.

## ◆ const_reference

template<typename T>

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

Definition at line 24 of file allocator.h.

## ◆ difference_type

template<typename T>

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

Definition at line 26 of file allocator.h.

## ◆ pointer

template<typename T>

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

Definition at line 21 of file allocator.h.

## ◆ reference

template<typename T>

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

Definition at line 23 of file allocator.h.

## ◆ size_type

template<typename T>

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

Definition at line 25 of file allocator.h.

## ◆ value_type

template<typename T>

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

Definition at line 20 of file allocator.h.

## Constructor & Destructor Documentation

## ◆ SecureAllocator() [1/2]

template<typename T>

Json::SecureAllocator< T >::SecureAllocator | ( |  | ) |
| inline

Definition at line 79 of file allocator.h.

## ◆ SecureAllocator() [2/2]

template<typename T>
template<typename U>

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

Definition at line 80 of file allocator.h.

## Member Function Documentation

## ◆ address() [1/2]

template<typename T>

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

Definition at line 68 of file allocator.h.

## ◆ address() [2/2]

template<typename T>

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

Definition at line 66 of file allocator.h.

## ◆ allocate()

template<typename T>

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

Allocate memory for N items using the standard allocator.

Definition at line 31 of file allocator.h.

## ◆ 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.

Definition at line 59 of file allocator.h.

## ◆ 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.

Definition at line 41 of file allocator.h.

## ◆ destroy()

template<typename T>

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

Destroy an item in-place at pointer P.

Definition at line 73 of file allocator.h.

## ◆ max_size()

template<typename T>

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

Definition at line 64 of file allocator.h.

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

- include/json/allocator.h