fixed bug in attaching nics to hosts, changed documentation format and generator (buggy but usable)

This commit is contained in:
2025-09-14 00:40:53 -04:00
parent 9ab64e18a4
commit c4141cd683
40 changed files with 5223 additions and 577 deletions

View File

@@ -1,36 +1,61 @@
# core/time.h
## Free functions
### `constexpr Time operator""_ns(unsigned long long v) noexcept { ... }`
### `return Time::from_ns(static_cast<Time::rep>(v));`
### `constexpr Time operator""_us(unsigned long long v) noexcept { ... }`
### `return Time::from_us(static_cast<Time::rep>(v));`
### `constexpr Time operator""_ms(unsigned long long v) noexcept { ... }`
### `return Time::from_ms(static_cast<Time::rep>(v));`
### `constexpr Time operator""_s (unsigned long long v) noexcept { ... }`
### `return Time::from_s (static_cast<Time::rep>(v));`
## class Time — public interface
### `constexpr Time() : _nsec(0) { ... }`
### `explicit constexpr Time(rep ns) : _nsec(ns) { ... }`
### `static constexpr Time from_ns(rep ns) noexcept { ... }`
### `return Time(ns);`
### `static constexpr Time from_us(rep us) noexcept { ... }`
### `return Time(us * 1000ULL);`
### `static constexpr Time from_ms(rep ms) noexcept { ... }`
### `return Time(ms * 1000ULL * 1000ULL);`
### `static constexpr Time from_s (rep s ) noexcept { ... }`
### `return Time(s * 1000ULL * 1000ULL * 1000ULL);`
### `constexpr rep ns() const noexcept { ... }`
### `constexpr rep count() const noexcept { ... }`
### `static constexpr rep us_to_ns(rep us) noexcept { ... }`
### `static constexpr rep ms_to_ns(rep ms) noexcept { ... }`
### `return Time(a._nsec + b._nsec);`
### `return Time(a._nsec * b._nsec);`
### `return safe_sub(a, b);`
### `if (a._nsec < b._nsec) { ... }`
### `return Time(a._nsec - b._nsec);`
### `constexpr Time unsafe_sub(Time t) const noexcept { ... }`
### `return Time(this->_nsec - t._nsec);`
## `Time`
`return Time(a._nsec * b._nsec);`
## `Time`
`return Time(a._nsec + b._nsec);`
## `Time`
`return Time(a._nsec - b._nsec);`
## `Time`
`return Time(ms * 1000ULL * 1000ULL);`
## `Time`
`return Time(ns);`
## `Time`
`return Time(s * 1000ULL * 1000ULL * 1000ULL);`
## `Time`
`return Time(this->_nsec - t._nsec);`
## `Time`
`return Time(us * 1000ULL);`
## `Time::Time`
`constexpr Time() : _nsec(0)`
## `Time::Time`
`explicit constexpr Time(rep ns) : _nsec(ns)`
## `Time::count`
`constexpr rep count() const noexcept`
## `Time::from_ms`
`static constexpr Time from_ms(rep ms) noexcept`
## `Time::from_ns`
`static constexpr Time from_ns(rep ns) noexcept`
## `Time::from_s`
`static constexpr Time from_s (rep s ) noexcept`
## `Time::from_us`
`static constexpr Time from_us(rep us) noexcept`
## `Time::ms_to_ns`
`static constexpr rep ms_to_ns(rep ms) noexcept`
## `Time::ns`
`constexpr rep ns() const noexcept`
## `Time::us_to_ns`
`static constexpr rep us_to_ns(rep us) noexcept`
## `_ms`
`constexpr Time operator _ms(unsigned long long v) noexcept{`
## `_ns`
`constexpr Time operator _ns(unsigned long long v) noexcept{`
## `_s`
`constexpr Time operator _s (unsigned long long v) noexcept{`
## `_us`
`constexpr Time operator _us(unsigned long long v) noexcept{`
## `from_ms`
`static constexpr Time from_ms(rep ms) noexcept{`
## `from_ns`
`static constexpr Time from_ns(rep ns) noexcept{`
## `from_s`
`static constexpr Time from_s (rep s ) noexcept{`
## `from_us`
`static constexpr Time from_us(rep us) noexcept{`
## `ms_to_ns`
`static constexpr rep ms_to_ns(rep ms) noexcept{`
## `safe_sub`
`friend constexpr std::optional<Time> safe_sub(Time a, Time b) noexcept{`
## `safe_sub`
`return safe_sub(a, b);`
## `us_to_ns`
`static constexpr rep us_to_ns(rep us) noexcept{`