|
| | queue (const SERIAL< TYPE, ALLOC< TYPE > > &serial=SERIAL< TYPE, ALLOC< TYPE > >{}) |
| | Constructs queue with specified underlying container and allocator.
|
| |
| | queue (const std::initializer_list< TYPE > &lst) |
| | Constructs queue from initializer list with allocator.
|
| |
| | queue (const queue &other) |
| | Copy constructs a queue with allocator propagation.
|
| |
| queue & | operator= (const queue &other) |
| | Copy assignment operator.
|
| |
| | queue (queue &&other) noexcept |
| | Move constructs a queue with allocator propagation.
|
| |
| queue & | operator= (queue &&other) noexcept |
| | Move assignment operator.
|
| |
| void | push (const TYPE &e) |
| | Inserts element at the back of the queue.
|
| |
| TYPE | pop () |
| | Removes and returns front element from the queue.
|
| |
| TYPE | head () const |
| | Accesses front element of the queue.
|
| |
| TYPE | tail () const |
| | Accesses back element of the queue.
|
| |
| std::string | className () const override |
| | Gets class name identifier.
|
| |
| u_integer | size () const override |
| | Returns the number of elements in the adapter.
|
| |
| void | clear () |
| | Removes all elements from the adapter.
|
| |
| bool | contains (const TYPE &e) const override |
| | Checks for element existence in the adapter.
|
| |
| integer | compareTo (const containerAdapter &other) const override |
| | Compares two container adapters lexicographically.
|
| |
| std::string | toString (bool enter) const override |
| | Generates formatted string representation.
|
| |
|
| ~containerAdapter () override=default |
| | Virtual destructor for proper polymorphic cleanup.
|
| |
| | operator std::string () const |
| | Explicit conversion to std::string.
|
| |
| | operator const char * () const |
| | Explicit conversion to C-style string.
|
| |
| const char * | toCString (bool enter) const |
| | Direct C-string access with formatting control.
|
| |
|
template<typename TYPE > |
| auto | formatString (const TYPE &t) -> std::string |
| |
|
template<typename TYPE > |
| auto | formatCString (const TYPE &t) -> const char * |
| |
|
template<typename TYPE > |
| auto | formatEnum (const TYPE &t) -> std::string |
| |
|
template<typename TYPE > |
| auto | formatString (TYPE *const &ptr) -> std::string |
| |
| bool | empty () const |
| | Checks if the container is empty.
|
| |
| virtual | ~container ()=default |
| | Destructor for the container class.
|
| |
| bool | operator== (const containerAdapter< TYPE, SERIAL, ALLOC > &other) const |
| | Checks if the current object is equal to another.
|
| |
| bool | operator!= (const containerAdapter< TYPE, SERIAL, ALLOC > &other) const |
| | Checks if the current object is not equal to another.
|
| |
| bool | operator< (const containerAdapter< TYPE, SERIAL, ALLOC > &other) const |
| | Checks if the current object is less than another.
|
| |
| bool | operator> (const containerAdapter< TYPE, SERIAL, ALLOC > &other) const |
| | Checks if the current object is greater than another.
|
| |
| bool | operator<= (const containerAdapter< TYPE, SERIAL, ALLOC > &other) const |
| | Checks if the current object is less than or equal to another.
|
| |
| bool | operator>= (const containerAdapter< TYPE, SERIAL, ALLOC > &other) const |
| | Checks if the current object is greater than or equal to another.
|
| |
|
virtual | ~comparable ()=default |
| | Virtual destructor for proper cleanup of derived objects.
|
| |
|
| template<typename TYPE > |
| static std::string | formatString (const TYPE &t) |
| | Universal value-to-string conversion.
|
| |
| template<typename TYPE > |
| static std::string | formatString (TYPE *const &ptr) |
| | Pointer-specific formatting.
|
| |
| template<typename TYPE > |
| static const char * | formatCString (const TYPE &t) |
| | C-string cache for temporary usage.
|
| |
| template<typename TYPE > |
| static std::string | formatEnum (const TYPE &t) |
| | Enum formatting utility.
|
| |
|
template<> |
| auto | formatString (const char &t) -> std::string |
| |
|
template<> |
| auto | formatString (const bool &t) -> std::string |
| |
|
template<> |
| auto | formatString (const char *const &ptr) -> std::string |
| |
| | containerAdapter (const SERIAL< TYPE, ALLOC< TYPE > > &serial) |
| | Constructs a container adapter with specified underlying container.
|
| |
| | container (ALLOC< TYPE > alloc=ALLOC< TYPE > {}) |
| | Constructs a container with specified allocator.
|
| |
| TYPE * | allocate (u_integer size) |
| | Allocates raw memory for elements.
|
| |
| void | deallocate (TYPE *ptr, u_integer size) |
| | Deallocates memory previously allocated by allocate()
|
| |
| void | construct (O_TYPE *o_ptr, Args &&... args) |
| | Constructs an element in-place.
|
| |
| void | destroy (O_TYPE *o_ptr) |
| | Destroys an element.
|
| |
| SERIAL< TYPE, ALLOC< TYPE > > | serial_ |
| | The underlying container instance.
|
| |
| ALLOC< TYPE > | allocator |
| | The allocator instance used for memory management.
|
| |
template<typename TYPE, template< typename, typename > typename SERIAL = chain, template< typename > typename ALLOC = allocator>
class original::queue< TYPE, SERIAL, ALLOC >
First-In-First-Out (FIFO) container adapter.
- Template Parameters
-
| TYPE | Type of elements stored in the queue |
| SERIAL | Underlying container type (default: chain) |
| ALLOC | Allocator type for memory management (default: allocator<TYPE>) |
Implements queue operations using the specified underlying container. Supports insertion at back and removal from front. Inherits template constraints from original::containerAdapter.
The allocator is propagated to both the queue adapter and the underlying serial container for consistent memory management. The ALLOC type must meet the C++ allocator requirements.