Loading...
Searching...
No Matches
juce::MACAddress Class Referencefinal

## Detailed Description

Represents a MAC network card adapter address ID.

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

- juce_core/network/juce_MACAddress.h

## Public Member Functions

| MACAddress () noexcept
| Creates a null address (00-00-00-00-00-00).
| MACAddress (const MACAddress &) noexcept
| Creates a copy of another address.
MACAddress & | operator= (const MACAddress &) noexcept
| Creates a copy of another address.
| MACAddress (const uint8 bytes[6]) noexcept
| Creates an address from 6 bytes.
| MACAddress (StringRef address)
| Creates an address from a hex string.
const uint8 * | getBytes () const noexcept
| Returns a pointer to the 6 bytes that make up this address.
String | toString () const
| Returns a dash-separated string in the form "11-22-33-44-55-66".
String | toString (StringRef separator) const
| Returns a hex string of this address, using a custom separator between each byte.
int64 | toInt64 () const noexcept
| Returns the address in the lower 6 bytes of an int64.
bool | isNull () const noexcept
| Returns true if this address is null (00-00-00-00-00-00).
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.
static void | findAllAddresses (Array< MACAddress > &results)
| Populates a list of the MAC addresses of all the available network cards.

## Constructors and Destructors

## MACAddress() [1/4]

juce::MACAddress::MACAddress | ( |  | ) |

noexcept

Creates a null address (00-00-00-00-00-00).

Referenced by MACAddress(), MACAddress(), MACAddress(), operator!=(), operator=(), and operator==().

## MACAddress() [2/4]

juce::MACAddress::MACAddress | ( | const MACAddress & |  | ) |

noexcept

Creates a copy of another address.

References MACAddress().

## MACAddress() [3/4]

juce::MACAddress::MACAddress | ( | const uint8 | bytes[6] | ) |

explicit noexcept

Creates an address from 6 bytes.

References MACAddress().

## MACAddress() [4/4]

juce::MACAddress::MACAddress | ( | StringRef | address | ) |

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.

References MACAddress().

## Member Functions

## getAllAddresses()

Array< MACAddress > juce::MACAddress::getAllAddresses | ( |  | ) |

static

Returns a list of the MAC addresses of all the available network cards.

## findAllAddresses()

void juce::MACAddress::findAllAddresses | ( | Array< MACAddress > & | results | ) |

static

Populates a list of the MAC addresses of all the available network cards.

## operator=()

MACAddress & juce::MACAddress::operator= | ( | const MACAddress & |  | ) |

noexcept

Creates a copy of another address.

References MACAddress().

## getBytes()

const uint8 * juce::MACAddress::getBytes | ( |  | ) | const

inline noexcept

Returns a pointer to the 6 bytes that make up this address.

References getBytes().

Referenced by getBytes().

## toString() [1/2]

String juce::MACAddress::toString | ( |  | ) | const

Returns a dash-separated string in the form "11-22-33-44-55-66".

## toString() [2/2]

String juce::MACAddress::toString | ( | StringRef | separator | ) | const

Returns a hex string of this address, using a custom separator between each byte.

## toInt64()

int64 juce::MACAddress::toInt64 | ( |  | ) | const

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.

## isNull()

bool juce::MACAddress::isNull | ( |  | ) | const

noexcept

Returns true if this address is null (00-00-00-00-00-00).

References isNull().

Referenced by isNull().

## operator==()

bool juce::MACAddress::operator== | ( | const MACAddress & |  | ) | const

noexcept

References MACAddress().

## operator!=()

bool juce::MACAddress::operator!= | ( | const MACAddress & |  | ) | const

noexcept

References MACAddress().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited