25template <
typename TYPE,
typename ALLOC>
75 template<
typename O_TYPE>
126template<
typename TYPE,
typename ALLOC>
130template<
typename TYPE,
typename ALLOC>
135template<
typename TYPE,
typename ALLOC>
140template<
typename TYPE,
typename ALLOC>
146template<
typename TYPE,
typename ALLOC>
147template<
typename O_TYPE>
152template <
typename TYPE,
typename ALLOC>
154 return this->size() == 0;
void construct(O_TYPE *o_ptr, Args &&... args)
Constructs an object in allocated memory.
Definition allocator.h:391
static void destroy(O_TYPE *o_ptr)
Destroys an object without deallocating.
Definition allocator.h:397
Default memory allocator using allocators utilities.
Definition allocator.h:153
void deallocate(TYPE *ptr, u_integer size) override
Deallocates memory using global operator delete.
Definition allocator.h:407
TYPE * allocate(u_integer size) override
Allocates memory using global operator new.
Definition allocator.h:402
Abstract base class for containers.
Definition container.h:26
ALLOC allocator
The allocator instance used for memory management.
Definition container.h:32
virtual u_integer size() const =0
Gets the number of elements in the container.
bool empty() const
Checks if the container is empty.
Definition container.h:153
virtual ~container()=default
Destructor for the container class.
void deallocate(TYPE *ptr, u_integer size)
Deallocates memory previously allocated by allocate()
Definition container.h:136
container(ALLOC alloc=ALLOC{})
Constructs a container with specified allocator.
Definition container.h:127
TYPE * allocate(u_integer size)
Allocates raw memory for elements.
Definition container.h:131
virtual bool contains(const TYPE &e) const =0
Checks if an element is contained in the container.
void destroy(O_TYPE *o_ptr)
Destroys an element.
Definition container.h:148
void construct(O_TYPE *o_ptr, Args &&... args)
Constructs an element in-place.
Definition container.h:142
Unique ownership smart pointer with move semantics.
Definition ownerPtr.h:37
Platform-independent type definitions and compiler/platform detection.
std::uint32_t u_integer
32-bit unsigned integer type for sizes and indexes
Definition config.h:263
Main namespace for the project Original.
Definition algorithms.h:21
Standard namespace extensions for original::alternative.
Definition allocator.h:351