1#ifndef CONTAINERADAPTER_H
2#define CONTAINERADAPTER_H
46 template <
typename TYPE,
47 template <
typename,
typename>
typename SERIAL,
48 template <
typename>
typename ALLOC>
53 public comparable<containerAdapter<TYPE, SERIAL, ALLOC>>{
129 [[nodiscard]] std::string
toString(
bool enter)
const override;
135 template <
typename TYPE,
136 template <
typename,
typename>
typename SERIAL,
137 template <
typename>
typename ALLOC>
142 template <
typename TYPE,
143 template <
typename,
typename>
typename SERIAL,
144 template <
typename>
typename ALLOC>
151 template <
typename TYPE,
152 template <
typename,
typename>
typename SERIAL,
153 template <
typename>
typename ALLOC>
159 template <
typename TYPE,
160 template <
typename,
typename>
typename SERIAL,
161 template <
typename>
typename ALLOC>
167 template <
typename TYPE,
168 template <
typename,
typename>
typename SERIAL,
169 template <
typename>
typename ALLOC>
173 return serial_.compareTo(other.serial_);
176 template <
typename TYPE,
177 template <
typename,
typename>
typename SERIAL,
178 template <
typename>
typename ALLOC>
181 return "containerAdapter";
184 template <
typename TYPE,
185 template <
typename,
typename>
typename SERIAL,
186 template <
typename>
typename ALLOC>
189 std::stringstream ss;
192 for (
const auto e : this->
serial_)
194 if (!first) ss <<
", ";
199 if (enter) ss <<
"\n";
Provides a base class for variable-size serial containers.
Base class for comparable objects.
Definition comparable.h:31
SERIAL< TYPE, ALLOC< TYPE > > serial_
The underlying container instance.
Definition containerAdapter.h:60
u_integer size() const override
Returns the number of elements in the adapter.
Definition containerAdapter.h:146
containerAdapter(const SERIAL< TYPE, ALLOC< TYPE > > &serial)
Constructs a container adapter with specified underlying container.
Definition containerAdapter.h:139
void clear()
Removes all elements from the adapter.
Definition containerAdapter.h:155
std::string toString(bool enter) const override
Generates formatted string representation.
Definition containerAdapter.h:188
~containerAdapter() override=default
Virtual destructor for proper polymorphic cleanup.
integer compareTo(const containerAdapter &other) const override
Compares two container adapters lexicographically.
Definition containerAdapter.h:171
bool contains(const TYPE &e) const override
Checks for element existence in the adapter.
Definition containerAdapter.h:163
std::string className() const override
Gets class name identifier for type information.
Definition containerAdapter.h:180
container(ALLOC alloc=ALLOC{})
Definition container.h:129
Base class providing polymorphic string conversion capabilities.
Definition printable.h:25
static std::string formatString(const TYPE &t)
Universal value-to-string conversion.
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.
Definition types.h:157
Main namespace for the project Original.
Definition algorithms.h:21
std::uint32_t u_integer
32-bit unsigned integer type for sizes/indexes
Definition config.h:17
std::int64_t integer
64-bit signed integer type for arithmetic operations
Definition config.h:15
Interface for polymorphic string formatting and output.
Type system foundations and concept definitions.