|
| couple () |
| Default constructs both elements.
|
|
| couple (F_TYPE *first, S_TYPE *second) |
| Constructs from pointer elements.
|
|
| couple (const F_TYPE &first, const S_TYPE &second) |
| Constructs from element copies.
|
|
| couple (const couple &other) |
| Copy constructor.
|
|
couple & | operator= (const couple &other) |
| Copy assignment operator.
|
|
template<u_integer IDX> |
auto | get () const |
| element access template method
|
|
template<u_integer IDX, typename T> |
void | set (const T &e) |
| element modifies the template method
|
|
integer | compareTo (const couple &other) const override |
| Lexicographical comparison operation.
|
|
F_TYPE & | first () |
| Access first element.
|
|
S_TYPE & | second () |
| Access second element.
|
|
| ~couple () override |
| Default destructor.
|
|
std::string | className () const override |
| Gets class name identifier.
|
|
std::string | toString (bool enter) const override |
| Formats pair elements as string.
|
|
| 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 | operator== (const couple< F_TYPE, S_TYPE > &other) const |
| Checks if the current object is equal to another.
|
|
bool | operator!= (const couple< F_TYPE, S_TYPE > &other) const |
| Checks if the current object is not equal to another.
|
|
bool | operator< (const couple< F_TYPE, S_TYPE > &other) const |
| Checks if the current object is less than another.
|
|
bool | operator> (const couple< F_TYPE, S_TYPE > &other) const |
| Checks if the current object is greater than another.
|
|
bool | operator<= (const couple< F_TYPE, S_TYPE > &other) const |
| Checks if the current object is less than or equal to another.
|
|
bool | operator>= (const couple< F_TYPE, S_TYPE > &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 |
|
template<typename F_TYPE, typename S_TYPE>
class original::couple< F_TYPE, S_TYPE >
Container for two heterogeneous elements.
- Template Parameters
-
F_TYPE | Type of the first element |
S_TYPE | Type of the second element |
Stores a pair of elements with type safety. Provides:
- Element access and copy operations
- Lexicographical comparison (first element precedence)
- Formatted string output through printable interface
- Comparable interface implementation