Lines Matching full:bytes
44 /// Constructs a zero bytes quantity.
45 units::bytes::bytes(void) : in bytes() function in units::bytes
51 /// Constructs an arbitrary bytes quantity.
53 /// \param count_ The amount of bytes in the quantity.
54 units::bytes::bytes(const uint64_t count_) : in bytes() function in units::bytes
60 /// Parses a string into a bytes quantity.
64 /// \return The converted bytes quantity.
67 units::bytes
68 units::bytes::parse(const std::string& in_str) in parse()
71 throw std::runtime_error("Bytes quantity cannot be empty"); in parse()
89 throw std::runtime_error("Bytes quantity cannot be empty"); in parse()
95 throw std::runtime_error(F("Invalid bytes quantity '%s'") % in_str); in parse()
102 throw std::runtime_error(F("Invalid bytes quantity '%s'") % in_str); in parse()
105 return bytes(uint64_t(count * multiplier)); in parse()
109 /// Formats a bytes quantity for user consumption.
111 /// \return A textual representation of the bytes quantiy.
113 units::bytes::format(void) const in format()
130 units::bytes::operator uint64_t(void) const in operator uint64_t()
136 /// Extracts a bytes quantity from a stream.
139 /// bytes quantity.
146 units::operator>>(std::istream& input, bytes& rhs) in operator >>()
152 rhs = bytes::parse(word); in operator >>()
161 /// Injects a bytes quantity into a stream.
163 /// \param output The stream into which to inject the bytes quantity as a
165 /// \param rhs The bytes quantity to format.
169 units::operator<<(std::ostream& output, const bytes& rhs) in operator <<()