ZeusBase-Library
2.0.4
|
#include <IPAddress.h>
Public Member Functions | |
TIPAddress () | |
TIPAddress (const IString &rHostAddress, Uint uiPort) | |
virtual | ~TIPAddress () |
virtual Uint | getPort () const |
virtual TString | getHostAddress () const |
virtual bool | isEqual (const TIPAddress &rAddress) const |
virtual TIPAddress * | createNewAddress ()=0 |
virtual TString | getHostName () const =0 |
virtual bool | getRawAddress (IList< Uint16 > &rArray) const =0 |
virtual bool | isValid () const =0 |
virtual const struct sockaddr & | getSocketAddress () const =0 |
virtual Int | getSocketAddressSize () const =0 |
virtual int | getSocketFamily () const =0 |
virtual void | reset ()=0 |
virtual void | setPort (Uint uiPort) |
bool | operator== (const TIPAddress &rAddress) const |
Public Member Functions inherited from zeus::TZObject | |
TZObject () | |
TZObject (const TString &strName) | |
TZObject (const IString &strName) | |
Uint | getHash () const |
TString | toString () const |
virtual TString | getObjName () const |
virtual void | setObjName (const TString &name) |
virtual Retval MQUALIFIER | askForInterface (const InterfaceID &rInterfaceID, IZUnknown *&rpIface) |
virtual void MQUALIFIER | addRef () const |
virtual void MQUALIFIER | release () const |
Static Public Member Functions | |
static Retval | createAddress (const IString &rstrAddr, Uint uiPort, TIPAddress *&rpAddress) |
Protected Attributes | |
Uint | m_uiPort |
Port addresse. More... | |
TString | m_strHostAddress |
IP Addresse. More... | |
Protected Attributes inherited from zeus::TZObject | |
Uint | m_uiID |
Additional Inherited Members | |
Protected Member Functions inherited from zeus::TZObject | |
virtual | ~TZObject () |
TZObject (const TZObject &rObject) | |
TZObject & | operator= (const TZObject &rObject) |
Int | getRefCounter () const |
This class implememts the datatype to wrapp a IP address. IPv4 and IPv6 are supported.
TIPAddress::TIPAddress | ( | ) |
Creates an empty address object
TIPAddress::TIPAddress | ( | const IString & | rHostAddress, |
Uint | uiPort | ||
) |
Creates an address out of the ip address and the port
rHostAddress | : Host address as a string |
uiPort | : Port |
|
virtual |
Destroys the address object
|
static |
Creates a new IP address out of a host address and port number. The host address can also be a host name only.
::isalpha(rstrAddr.getChar(0))
|
pure virtual |
Creates and returns a new address. This is abstract since the IPv4 or IPv6 address can be created
Implemented in zeus::TIPv6Address, zeus::TBTAddress, and zeus::TIPv4Address.
|
inlinevirtual |
Returns the host address
|
pure virtual |
Returns the host name of this ip. This is done with a reverse lookup.
Implemented in zeus::TIPv6Address, zeus::TBTAddress, and zeus::TIPv4Address.
|
inlinevirtual |
Returns the port
Returns the raw byte address of the ip address
rArray | : Return parameter |
true | : IP address returned |
false | error returning address (invalid address) |
Implemented in zeus::TIPv6Address, zeus::TBTAddress, and zeus::TIPv4Address.
|
pure virtual |
returns the socket address
Implemented in zeus::TIPv6Address, zeus::TBTAddress, and zeus::TIPv4Address.
|
pure virtual |
returns the size of the socket address
Implemented in zeus::TIPv6Address, zeus::TBTAddress, and zeus::TIPv4Address.
|
pure virtual |
returns the family of the socket address
Implemented in zeus::TIPv6Address, zeus::TBTAddress, and zeus::TIPv4Address.
|
inlinevirtual |
checks if the address is equal to this address.
rAddress | : Address instance |
true | : Addresses are equal |
false | Addresses are not equal |
|
pure virtual |
checks if the address is valid
Implemented in zeus::TIPv6Address, zeus::TBTAddress, and zeus::TIPv4Address.
|
inline |
|
pure virtual |
resets the address depending on the internal socket structure
Implemented in zeus::TIPv6Address, zeus::TBTAddress, and zeus::TIPv4Address.
|
inlinevirtual |
sets the new port of an address
Reimplemented in zeus::TIPv6Address, and zeus::TIPv4Address.
|
protected |
IP Addresse.
|
protected |
Port addresse.