JUCE
|
Represents a MAC network card adapter address ID. More...
Public Member Functions | |
MACAddress () noexcept | |
Creates a null address (00-00-00-00-00-00). More... | |
MACAddress (const MACAddress &) noexcept | |
Creates a copy of another address. More... | |
MACAddress & | operator= (const MACAddress &) noexcept |
Creates a copy of another address. More... | |
MACAddress (const uint8 bytes[6]) noexcept | |
Creates an address from 6 bytes. More... | |
MACAddress (StringRef address) | |
Creates an address from a hex string. More... | |
const uint8 * | getBytes () const noexcept |
Returns a pointer to the 6 bytes that make up this address. More... | |
String | toString () const |
Returns a dash-separated string in the form "11-22-33-44-55-66". More... | |
String | toString (StringRef separator) const |
Returns a hex string of this address, using a custom separator between each byte. More... | |
int64 | toInt64 () const noexcept |
Returns the address in the lower 6 bytes of an int64. More... | |
bool | isNull () const noexcept |
Returns true if this address is null (00-00-00-00-00-00). More... | |
bool | operator== (const MACAddress &) const noexcept |
bool | operator!= (const MACAddress &) const noexcept |
Static Public Member Functions | |
static Array< MACAddress > | getAllAddresses () |
Returns a list of the MAC addresses of all the available network cards. More... | |
static void | findAllAddresses (Array< MACAddress > &results) |
Populates a list of the MAC addresses of all the available network cards. More... | |
Represents a MAC network card adapter address ID.
|
noexcept |
Creates a null address (00-00-00-00-00-00).
|
noexcept |
Creates a copy of another address.
|
explicitnoexcept |
Creates an address from 6 bytes.
|
explicit |
Creates an address from a hex string.
If the string isn't a 6-byte hex value, this will just default-initialise the object.
|
static |
Returns a list of the MAC addresses of all the available network cards.
|
static |
Populates a list of the MAC addresses of all the available network cards.
|
noexcept |
Creates a copy of another address.
|
noexcept |
Returns a pointer to the 6 bytes that make up this address.
References operator!=(), and operator==().
String MACAddress::toString | ( | ) | const |
Returns a dash-separated string in the form "11-22-33-44-55-66".
Returns a hex string of this address, using a custom separator between each byte.
|
noexcept |
Returns the address in the lower 6 bytes of an int64.
This uses a little-endian arrangement, with the first byte of the address being stored in the least-significant byte of the result value.
|
noexcept |
Returns true if this address is null (00-00-00-00-00-00).
|
noexcept |
|
noexcept |