PLCnext API Documentation  21.0.0.35466
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Arp::System::Commons::Net::IpAddress Class Reference

Unified representation for ip address schemes. More...

#include <IpAddress.hpp>

Public Types

typedef uint32 IpV4Value
 Value-type-definition for ip addresses using version 4 scheme. More...
 

Public Member Functions

 IpAddress (void)=default
 Constructs an IpAddress instance. More...
 
 IpAddress (uint32 ip4address)
 Constructs a new representation based on an encoded ip v4 address. More...
 
 IpAddress (const IpAddress &arg)=default
 Copy constructor. More...
 
IpAddressoperator= (const IpAddress &arg)=default
 Assignment operator. More...
 
 ~IpAddress (void)=default
 Destructs this instance and frees all resources. More...
 
void operator= (Arp::uint32 ip4Address)
 Assigns a new ip v4 address value. More...
 
IpV4Value GetIpv4Value (void) const
 Returns the ip address in ip v4 address scheme. More...
 
String ToString (void) const
 

Static Public Member Functions

static IpAddress Parse (const String &input)
 Parses an ip address from string bases representation, e.g. "127.0.0.1". More...
 
static bool TryParse (const String &input, IpAddress &result)
 Tries to parse an address from string based representation. More...
 

Detailed Description

Unified representation for ip address schemes.

Member Typedef Documentation

◆ IpV4Value

Value-type-definition for ip addresses using version 4 scheme.

Constructor & Destructor Documentation

◆ IpAddress() [1/3]

Arp::System::Commons::Net::IpAddress::IpAddress ( void  )
default

Constructs an IpAddress instance.

◆ IpAddress() [2/3]

Arp::System::Commons::Net::IpAddress::IpAddress ( uint32  ip4address)
inline

Constructs a new representation based on an encoded ip v4 address.

Parameters
ip4addressThe encoded ip v4 address value.

◆ IpAddress() [3/3]

Arp::System::Commons::Net::IpAddress::IpAddress ( const IpAddress arg)
default

Copy constructor.

◆ ~IpAddress()

Arp::System::Commons::Net::IpAddress::~IpAddress ( void  )
default

Destructs this instance and frees all resources.

Member Function Documentation

◆ GetIpv4Value()

IpAddress::IpV4Value Arp::System::Commons::Net::IpAddress::GetIpv4Value ( void  ) const
inline

Returns the ip address in ip v4 address scheme.

Returns
Ip address in v4 address scheme.

◆ operator=() [1/2]

IpAddress& Arp::System::Commons::Net::IpAddress::operator= ( const IpAddress arg)
default

Assignment operator.

◆ operator=() [2/2]

void Arp::System::Commons::Net::IpAddress::operator= ( Arp::uint32  ip4Address)
inline

Assigns a new ip v4 address value.

Parameters
ip4AddressNew ip v4 value.

◆ Parse()

static IpAddress Arp::System::Commons::Net::IpAddress::Parse ( const String input)
static

Parses an ip address from string bases representation, e.g. "127.0.0.1".

Parameters
inputThe string based representation of the ip address.
Exceptions
Arp::System::Commons::ArgumentExceptionif the string does not fit any known representation.
Returns
Instance of unified representation.

◆ TryParse()

static bool Arp::System::Commons::Net::IpAddress::TryParse ( const String input,
IpAddress result 
)
static

Tries to parse an address from string based representation.

Parameters
inputThe string based representation of the ip address.
resultThe container for the parsed ip address.
Returns
True if parsing was sucessfull, otherwise false is returned.

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