|
| duration (time_val_type val=0, unit unit=MILLISECOND) |
| Constructs a duration with given value and unit.
|
|
| duration (const duration &other)=default |
| Default copy constructor.
|
|
duration & | operator= (const duration &other)=default |
| Default copy assignment.
|
|
| duration (duration &&other) noexcept |
| Move constructor.
|
|
duration & | operator= (duration &&other) noexcept |
| Move assignment.
|
|
time_val_type | value (unit unit=MILLISECOND) const |
| Gets the duration value in specified units.
|
|
integer | compareTo (const duration &other) const override |
| Compares this duration to another.
|
|
u_integer | toHash () const noexcept override |
| Computes hash value for this duration.
|
|
std::string | className () const override |
| Gets the class name.
|
|
std::string | toString (bool enter) const override |
| Converts duration to string representation.
|
|
duration & | operator++ () |
| Prefix increment (adds 1 nanosecond)
|
|
duration | operator++ (int postfix) |
| Postfix increment (adds 1 nanosecond)
|
|
duration & | operator-- () |
| Prefix decrement (subtracts 1 nanosecond)
|
|
duration | operator-- (int postfix) |
| Postfix decrement (subtracts 1 nanosecond)
|
|
duration & | operator+= (const duration &other) |
| Adds another duration to this one.
|
|
duration & | operator-= (const duration &other) |
| Subtracts another duration from this one.
|
|
duration & | operator*= (time_val_type factor) |
| Multiplies duration by a factor.
|
|
duration & | operator/= (time_val_type factor) |
| Divides duration by a factor.
|
|
duration & | operator/= (const duration &other) |
| Divides duration by another duration.
|
|
floating | div (time_val_type factor, unit unit=MILLISECOND) const |
| Floating-point division by a factor.
|
|
floating | div (const duration &other) const |
| Floating-point division by another duration.
|
|
virtual integer | compareTo (const duration &other) const=0 |
| Compares the current object with another of the same type.
|
|
bool | operator== (const duration &other) const |
| Checks if the current object is equal to another.
|
|
bool | operator!= (const duration &other) const |
| Checks if the current object is not equal to another.
|
|
bool | operator< (const duration &other) const |
| Checks if the current object is less than another.
|
|
bool | operator> (const duration &other) const |
| Checks if the current object is greater than another.
|
|
bool | operator<= (const duration &other) const |
| Checks if the current object is less than or equal to another.
|
|
bool | operator>= (const duration &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.
|
|
virtual bool | equals (const duration &other) const noexcept |
| Compares two objects for equality.
|
|
virtual | ~hashable ()=0 |
| Virtual destructor.
|
|
| 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 |
|
|
template<typename TYPE > |
static std::string | formatString (const TYPE &t) |
| Universal value-to-string conversion.
|
|
template<Printable TYPE> |
static std::string | formatString (const TYPE &t) |
| Specialization for printable types.
|
|
template<EnumType TYPE> |
static std::string | formatString (const TYPE &t) |
| Specialization for enum types.
|
|
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 |
|
Represents a time duration with nanosecond precision.
Supports arithmetic operations and conversions between different time units.