|
| | tuple (const TYPES &... e) |
| | Constructs a tuple with given elements.
|
| |
| | tuple (const tuple &other) |
| | Copy constructor.
|
| |
| tuple & | operator= (const tuple &other) |
| | Copy assignment operator.
|
| |
| | tuple (tuple &&other) noexcept |
| | Move constructor.
|
| |
| tuple & | operator= (tuple &&other) noexcept |
| | Move assignment operator.
|
| |
| template<u_integer IDX> |
| const auto & | get () const |
| | Access element by index (const lvalue-reference version)
|
| |
| template<u_integer IDX> |
| auto & | get () |
| | Access element by index (non const lvalue-reference version)
|
| |
| template<u_integer IDX, typename E > |
| tuple & | set (const E &e) |
| | Set (modify) the value of the element at the specified index.
|
| |
| template<u_integer BEGIN_IDX, u_integer N_ELEMS> |
| auto | slice () const |
| | Slice the tuple from a specific index.
|
| |
| integer | compareTo (const tuple &other) const override |
| | Compare two tuples lexicographically.
|
| |
| std::string | toString (bool enter) const override |
| | Generate formatted string representation.
|
| |
| std::string | className () const override |
| | Get class name identifier.
|
| |
|
template<typename... O_TYPES, original::u_integer... T_SIZE, original::u_integer... O_SIZE> |
| original::tuple< TYPES..., O_TYPES... > | _concat (const tuple< O_TYPES... > &other, std::integer_sequence< u_integer, T_SIZE... >, std::integer_sequence< u_integer, O_SIZE... >) const |
| |
|
template<original::u_integer IDX, typename E > |
| original::tuple< TYPES... > & | set (const E &e) |
| |
| | 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 |
| |
| virtual integer | compareTo (const tuple< TYPES... > &other) const=0 |
| | Compares the current object with another of the same type.
|
| |
| bool | operator== (const tuple< TYPES... > &other) const |
| | Checks if the current object is equal to another.
|
| |
| bool | operator!= (const tuple< TYPES... > &other) const |
| | Checks if the current object is not equal to another.
|
| |
| bool | operator< (const tuple< TYPES... > &other) const |
| | Checks if the current object is less than another.
|
| |
| bool | operator> (const tuple< TYPES... > &other) const |
| | Checks if the current object is greater than another.
|
| |
| bool | operator<= (const tuple< TYPES... > &other) const |
| | Checks if the current object is less than or equal to another.
|
| |
| bool | operator>= (const tuple< TYPES... > &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.
|
| |
|
| static constexpr u_integer | size () |
| | Get the number of elements in the tuple.
|
| |
| 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 |
| |
template<typename... TYPES>
class original::tuple< TYPES >
Container for multiple heterogeneous elements.
- Template Parameters
-
| TYPES | Variadic template parameter list of element types |
Stores a sequence of elements with type safety. Provides:
- Compile-time fixed size container
- Element access via index (compile-time checked)
- Element modification via index
- Deep copy/move operations
- Lexicographical comparison
- String serialization through printable interface
- Comparable interface implementation
- Structured binding support via std::tuple_size and std::tuple_element specializations
- Tuple concatenation and slicing operations
- Examples
- /home/runner/work/original/original/src/core/tuple.h.