28 using size_type =
typename std::allocator<T>::size_type;
29 using value_type =
typename std::allocator<T>::value_type;
31 using pointer =
typename std::allocator<T>::pointer;
46 if(_free && n <= _size)
52 return _fall_back.allocate(n, hint);
63 _fall_back.deallocate(p, n);
75 bool _use_heap =
false;
76 std::allocator<T> _fall_back;
typename std::allocator< T >::difference_type difference_type
Definition: BufferAllocator.h:30
MAQUINA_EXPORT Node reference(Node &root, const std::wstring &filepath, const std::string &reference_root_name="")
Reference the content of a file into the project.
typename std::allocator< T >::size_type size_type
Definition: BufferAllocator.h:28
This version of the SDK is unstable, i-e, it may change with no warning.
Definition: AddCurveAction.h:20
BufferAllocator(T *ptr, size_type size)
Creates a BufferAllocator.
Definition: BufferAllocator.h:42
typename std::allocator< T >::const_pointer const_pointer
Definition: BufferAllocator.h:32
typename std::allocator< T >::pointer pointer
Definition: BufferAllocator.h:31
T * allocate(size_type n, const void *hint=0)
Definition: BufferAllocator.h:44
bool use_heap() const
Return true if the heap allocator has been used by this allocator. Return false if only the buffer ha...
Definition: BufferAllocator.h:67
typename std::allocator< T >::reference reference
Definition: BufferAllocator.h:33
void deallocate(T *p, std::size_t n)
Definition: BufferAllocator.h:55
std::true_type propagate_on_container_move_assignment
Definition: BufferAllocator.h:35
Allocator to use with std::vector. Allocates memory first in the user provided buffer and then using ...
Definition: BufferAllocator.h:25
typename std::allocator< T >::const_reference const_reference
Definition: BufferAllocator.h:34
typename std::allocator< T >::value_type value_type
Definition: BufferAllocator.h:29