1#ifndef CONTAINERADAPTER_H
2#define CONTAINERADAPTER_H
47 template <
typename TYPE,
48 template <
typename,
typename>
typename SERIAL,
49 template <
typename>
typename ALLOC>
50 requires ExtendsOf<baseList<TYPE, ALLOC<TYPE>>, SERIAL<TYPE, ALLOC<TYPE>>>
54 public comparable<containerAdapter<TYPE, SERIAL, ALLOC>>,
55 public hashable<containerAdapter<TYPE, SERIAL, ALLOC>> {
158 template <
typename TYPE,
159 template <
typename,
typename>
typename SERIAL,
160 template <
typename>
typename ALLOC>
167 template <
typename TYPE,
168 template <
typename,
typename>
typename SERIAL,
169 template <
typename>
typename ALLOC>
178 template <
typename TYPE,
179 template <
typename,
typename>
typename SERIAL,
180 template <
typename>
typename ALLOC>
186 template <
typename TYPE,
187 template <
typename,
typename>
typename SERIAL,
188 template <
typename>
typename ALLOC>
194 template <
typename TYPE,
195 template <
typename,
typename>
typename SERIAL,
196 template <
typename>
typename ALLOC>
203 template <
typename TYPE,
204 template <
typename,
typename>
typename SERIAL,
205 template <
typename>
typename ALLOC>
209 return this->serial_.
toHash();
212 template <
typename TYPE,
213 template <
typename,
typename>
typename SERIAL,
214 template <
typename>
typename ALLOC>
217 return "containerAdapter";
220 template <
typename TYPE,
221 template <
typename,
typename>
typename SERIAL,
222 template <
typename>
typename ALLOC>
225 std::stringstream
ss;
230 if (!first)
ss <<
", ";
249 template <
typename TYPE,
250 template <
typename,
typename>
typename SERIAL,
251 template <
typename>
typename ALLOC>
Provides a base class for variable-size serial containers.
integer compareTo(const autoPtr &other) const override
Compare reference counters.
Definition autoPtr.h:714
void swap(autoPtr &other) noexcept
Swaps the reference counters between two autoPtr instances.
Definition autoPtr.h:703
u_integer toHash() const noexcept override
Compute hash value for the pointer.
Definition autoPtr.h:735
Base class for variable-size serial containers.
Definition baseList.h:43
Base class for comparable objects.
Definition comparable.h:35
Adapter class that provides unified interface for various container types.
Definition containerAdapter.h:55
u_integer toHash() const noexcept override
Computes hash value for the container adapter.
Definition containerAdapter.h:207
SERIAL< TYPE, ALLOC< TYPE > > serial_
The underlying container instance.
Definition containerAdapter.h:62
u_integer size() const override
Returns the number of elements in the adapter.
Definition containerAdapter.h:162
containerAdapter(const SERIAL< TYPE, ALLOC< TYPE > > &serial)
Constructs a container adapter with specified underlying container.
Definition containerAdapter.h:155
void clear()
Removes all elements from the adapter.
Definition containerAdapter.h:182
std::string toString(bool enter) const override
Generates formatted string representation.
Definition containerAdapter.h:224
void swap(containerAdapter &other) noexcept
Swaps the contents of this container adapter with another.
Definition containerAdapter.h:171
integer compareTo(const containerAdapter &other) const override
Compares two container adapters lexicographically.
Definition containerAdapter.h:198
bool contains(const TYPE &e) const override
Checks for element existence in the adapter.
Definition containerAdapter.h:190
std::string className() const override
Gets class name identifier for type information.
Definition containerAdapter.h:216
Abstract base class for containers.
Definition container.h:26
Forward declaration of hashable interface template.
Definition hash.h:220
Unique ownership smart pointer with move semantics.
Definition ownerPtr.h:37
Base class providing polymorphic string conversion capabilities.
Definition printable.h:39
static std::string formatString(const TYPE &t)
Universal value-to-string conversion with type-specific formatting.
Definition printable.h:339
Abstract base class for sequential containers with index-based access.
Definition serial.h:34
Interface for objects that can be compared.
Checks derivation or type identity using std::derived_from.
Definition types.h:472
std::uint32_t u_integer
32-bit unsigned integer type for sizes and indexes
Definition config.h:263
std::int64_t integer
64-bit signed integer type for arithmetic operations
Definition config.h:254
Provides a generic hashing utility and interface for hashable types.
Main namespace for the project Original.
Definition algorithms.h:21
Standard namespace extensions for original::alternative.
Definition allocator.h:351
void swap(original::objPoolAllocator< TYPE > &lhs, original::objPoolAllocator< TYPE > &rhs) noexcept
Specialization of std::swap for objPoolAllocator.
Definition allocator.h:635
Interface for polymorphic string formatting and output.
Core type system foundations and concept definitions.