1#ifndef ITERATIONSTREAM_H
2#define ITERATIONSTREAM_H
56 template<
typename TYPE,
typename DERIVED>
59 public comparable<iterationStream<TYPE, DERIVED>>,
60 public hashable<iterationStream<TYPE, DERIVED>> {
133 std::stringstream
ss;
136 for (
const auto it = this->
begin();
it.isValid(); ++
it) {
147template<
typename TYPE,
typename DERIVED>
160template <
typename TYPE,
typename DERIVED>
164 for (
const auto&
elem : *
this) {
170template<
typename TYPE,
typename DERIVED>
172 return "iterationStream";
175template<
typename TYPE,
typename DERIVED>
178 std::stringstream
ss;
const TYPE * get() const
Get managed pointer const version.
Definition autoPtr.h:629
Base class for comparable objects.
Definition comparable.h:35
static void hashCombine(u_integer &seed, const T &value) noexcept
Combines a hash value with another value's hash.
Definition hash.h:275
Forward declaration of hashable interface template.
Definition hash.h:220
A base class for iterable containers that support multiple iteration patterns.
Definition iterable.h:70
iterAdaptor first()
Returns an iterator adapter pointing to the first element.
Definition iterable.h:650
iterAdaptor begin()
Returns an iterator adapter pointing to the beginning of the container.
Definition iterable.h:626
A stream class that allows iteration, comparison, hashing and printing.
Definition iterationStream.h:60
u_integer toHash() const noexcept override
Computes a hash value for the iteration stream.
Definition iterationStream.h:161
std::string elementsString() const
Returns a string representation of the elements in the stream.
Definition iterationStream.h:131
integer compareTo(const iterationStream &other) const override
Compares the current iteration stream with another iteration stream.
Definition iterationStream.h:148
std::string className() const override
Returns the class name.
Definition iterationStream.h:171
std::string toString(bool enter) const override
Converts the iteration stream to a string representation.
Definition iterationStream.h:176
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
Interface for objects that can be compared.
Provides a generic hashing utility and interface for hashable types.
Base interface for iterable container types.
Main namespace for the project Original.
Definition algorithms.h:21
Standard namespace extensions for original::alternative.
Definition allocator.h:351
Interface for polymorphic string formatting and output.
Core type system foundations and concept definitions.