R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
ENetAddressWrapper Class Referencefinal

#include <ENetAddress.hpp>

Inheritance diagram for ENetAddressWrapper:
Inheritance graph
Collaboration diagram for ENetAddressWrapper:
Collaboration graph

Public Member Functions

 ENetAddressWrapper (const std::string &hostname, uint16_t port)
 
 ENetAddressWrapper (const ENetAddress &address)
 
 ENetAddressWrapper (const ENetAddressWrapper &other)
 
ENetAddressWrapperoperator= (const ENetAddressWrapper &other)
 
std::string getHost () const override
 Get the hostname or IP address as a string.
 
uint16_t getPort () const override
 Get the port number.
 
void setHost (const std::string &hostname) override
 Set the hostname or IP address.
 
void setPort (uint16_t port) override
 Set the port number.
 
const ENetAddress & getNativeAddress () const
 
ENetAddress & getNativeAddress ()
 
- Public Member Functions inherited from IAddress
virtual ~IAddress ()=default
 

Private Attributes

ENetAddress _address
 

Detailed Description

Definition at line 14 of file ENetAddress.hpp.

Constructor & Destructor Documentation

◆ ENetAddressWrapper() [1/3]

ENetAddressWrapper::ENetAddressWrapper ( const std::string &  hostname,
uint16_t  port 
)
explicit

Definition at line 12 of file ENetAddress.cpp.

References _address.

◆ ENetAddressWrapper() [2/3]

ENetAddressWrapper::ENetAddressWrapper ( const ENetAddress &  address)
explicit

Definition at line 20 of file ENetAddress.cpp.

◆ ENetAddressWrapper() [3/3]

ENetAddressWrapper::ENetAddressWrapper ( const ENetAddressWrapper other)

Definition at line 22 of file ENetAddress.cpp.

Member Function Documentation

◆ getHost()

std::string ENetAddressWrapper::getHost ( ) const
overridevirtual

Get the hostname or IP address as a string.

Returns
The host address.

Implements IAddress.

Definition at line 31 of file ENetAddress.cpp.

References _address.

◆ getNativeAddress() [1/2]

ENetAddress & ENetAddressWrapper::getNativeAddress ( )

Definition at line 47 of file ENetAddress.cpp.

References _address.

◆ getNativeAddress() [2/2]

const ENetAddress & ENetAddressWrapper::getNativeAddress ( ) const

Definition at line 43 of file ENetAddress.cpp.

References _address.

◆ getPort()

uint16_t ENetAddressWrapper::getPort ( ) const
overridevirtual

Get the port number.

Returns
The port number.

Implements IAddress.

Definition at line 39 of file ENetAddress.cpp.

References _address.

◆ operator=()

ENetAddressWrapper & ENetAddressWrapper::operator= ( const ENetAddressWrapper other)

Definition at line 24 of file ENetAddress.cpp.

References _address.

◆ setHost()

void ENetAddressWrapper::setHost ( const std::string &  host)
overridevirtual

Set the hostname or IP address.

Parameters
hostThe hostname or IP address string.

Implements IAddress.

Definition at line 51 of file ENetAddress.cpp.

References _address.

◆ setPort()

void ENetAddressWrapper::setPort ( uint16_t  port)
overridevirtual

Set the port number.

Parameters
portThe port number.

Implements IAddress.

Definition at line 57 of file ENetAddress.cpp.

References _address.

Member Data Documentation

◆ _address

ENetAddress ENetAddressWrapper::_address
private

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