Apache Mesos
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Bytes Class Reference

#include <bytes.hpp>

Public Member Functions

constexpr Bytes (uint64_t bytes=0)
 
constexpr Bytes (uint64_t _value, uint64_t _unit)
 
uint64_t bytes () const
 
bool operator< (const Bytes &that) const
 
bool operator<= (const Bytes &that) const
 
bool operator> (const Bytes &that) const
 
bool operator>= (const Bytes &that) const
 
bool operator== (const Bytes &that) const
 
bool operator!= (const Bytes &that) const
 
Bytesoperator+= (const Bytes &that)
 
Bytesoperator-= (const Bytes &that)
 
Bytesoperator*= (uint64_t multiplier)
 
Bytesoperator/= (uint64_t divisor)
 

Static Public Member Functions

static Try< Bytesparse (const std::string &s)
 

Static Public Attributes

static constexpr uint64_t BYTES = 1
 
static constexpr uint64_t KILOBYTES = 1024 * BYTES
 
static constexpr uint64_t MEGABYTES = 1024 * KILOBYTES
 
static constexpr uint64_t GIGABYTES = 1024 * MEGABYTES
 
static constexpr uint64_t TERABYTES = 1024 * GIGABYTES
 

Constructor & Destructor Documentation

constexpr Bytes::Bytes ( uint64_t  bytes = 0)
inline
constexpr Bytes::Bytes ( uint64_t  _value,
uint64_t  _unit 
)
inline

Member Function Documentation

uint64_t Bytes::bytes ( ) const
inline
bool Bytes::operator!= ( const Bytes that) const
inline
Bytes& Bytes::operator*= ( uint64_t  multiplier)
inline
Bytes& Bytes::operator+= ( const Bytes that)
inline
Bytes& Bytes::operator-= ( const Bytes that)
inline
Bytes& Bytes::operator/= ( uint64_t  divisor)
inline
bool Bytes::operator< ( const Bytes that) const
inline
bool Bytes::operator<= ( const Bytes that) const
inline
bool Bytes::operator== ( const Bytes that) const
inline
bool Bytes::operator> ( const Bytes that) const
inline
bool Bytes::operator>= ( const Bytes that) const
inline
static Try<Bytes> Bytes::parse ( const std::string &  s)
inlinestatic

Member Data Documentation

constexpr uint64_t Bytes::BYTES = 1
static
constexpr uint64_t Bytes::GIGABYTES = 1024 * MEGABYTES
static
constexpr uint64_t Bytes::KILOBYTES = 1024 * BYTES
static
constexpr uint64_t Bytes::MEGABYTES = 1024 * KILOBYTES
static
constexpr uint64_t Bytes::TERABYTES = 1024 * GIGABYTES
static

The documentation for this class was generated from the following file: