PLCnext API Documentation 25.0.2.69
Public Member Functions | Static Public Member Functions | List of all members
Arp::Base::Commons::Net::Url Class Reference

This class implements represents a Uniform Resource Locator. More...

#include <Url.hpp>

Public Member Functions

 Url (void)
 The default constructor.
 
 Url (const String &ipcAppName)
 Constructs a Url instance. More...
 
 Url (const String &host, int port, bool encrypt)
 Constructs a Url instance. More...
 
 Url (const String &host, int port, const char *scheme)
 Constructs a Url instance. More...
 
 Url (const Url &arg)
 The default copy constructor. More...
 
 Url (Url &&arg) noexcept
 The default move constructor. More...
 
Urloperator= (const Url &arg)
 The default copy-assignment operator. More...
 
Urloperator= (Url &&arg) noexcept
 The default move-assignment operator. More...
 
 ~Url (void)
 The default destructor.
 
bool IsEmpty (void) const
 Determines if this instance is empty. More...
 
bool IsEncrypted (void) const
 Determines if this instance specifies an encrypted protocol like <cTLS. More...
 
bool HasScheme (void) const
 Determines if this instance has a specified scheme. More...
 
bool HasIpcScheme (void) const
 Determines if this instance has a IPC scheme. More...
 
bool HasTcpScheme (void) const
 Determines if this instance has a TCP scheme. More...
 
bool HasTlsScheme (void) const
 Determines if this instance has a TLS scheme. More...
 
const StringGetScheme (void) const
 Gets the scheme string of this instance. More...
 
const StringGetHost (void) const
 Gets the host string of this instance. More...
 
const StringGetPath (void) const
 Gets the path string of this instance. More...
 
int GetPort (void) const
 Gets the port of this instance. More...
 
void Clear (void)
 Empties this instance.
 
String ToString (void) const
 Returns the entire Url string of this instance. More...
 
Impl & GetImpl (void)
 For internal use only. More...
 
const Impl & GetImpl (void) const
 

Static Public Member Functions

static Url GetEmpty (void)
 Returns an empty Url. More...
 
static Url Parse (const String &input)
 Parses an Url string. More...
 
static bool TryParse (const String &input, Url &result)
 Parses an Url string. More...
 

Detailed Description

This class implements represents a Uniform Resource Locator.

This class is used to identify and address a ressource, e.g.

Furthermore the communication procol might be specified.

Constructor & Destructor Documentation

◆ Url() [1/5]

Arp::Base::Commons::Net::Url::Url ( const String ipcAppName)
explicit

Constructs a Url instance.

Parameters
ipcAppNameThe name of the IPC process.

◆ Url() [2/5]

Arp::Base::Commons::Net::Url::Url ( const String host,
int  port,
bool  encrypt 
)

Constructs a Url instance.

Parameters
hostThe host to specify as IP address.
portThe TCP port.
encryptSpecifies if TCP or TLS is used.

◆ Url() [3/5]

Arp::Base::Commons::Net::Url::Url ( const String host,
int  port,
const char *  scheme 
)

Constructs a Url instance.

Parameters
hostThe host to specify as IP address.
portThe TCP port.
schemeSpecifies the scheme explicitly.

◆ Url() [4/5]

Arp::Base::Commons::Net::Url::Url ( const Url arg)
default

The default copy constructor.

Parameters
argThe argument to copy.

◆ Url() [5/5]

Arp::Base::Commons::Net::Url::Url ( Url &&  arg)
defaultnoexcept

The default move constructor.

Parameters
argThe argument to move.

Member Function Documentation

◆ GetEmpty()

Url Arp::Base::Commons::Net::Url::GetEmpty ( void  )
static

Returns an empty Url.

Returns
An empty Url.

◆ GetHost()

const String & Arp::Base::Commons::Net::Url::GetHost ( void  ) const

Gets the host string of this instance.

Returns
The host string of this instance.

◆ GetImpl()

const Url::Impl & Arp::Base::Commons::Net::Url::GetImpl ( void  )

For internal use only.

Returns
The impl instance.

◆ GetPath()

const String & Arp::Base::Commons::Net::Url::GetPath ( void  ) const

Gets the path string of this instance.

Returns
The path string of this instance.

◆ GetPort()

int Arp::Base::Commons::Net::Url::GetPort ( void  ) const

Gets the port of this instance.

Returns
The port of this instance.

If the port was not specified, zero is returned.

◆ GetScheme()

const String & Arp::Base::Commons::Net::Url::GetScheme ( void  ) const

Gets the scheme string of this instance.

Returns
The scheme string of this instance.

◆ HasIpcScheme()

bool Arp::Base::Commons::Net::Url::HasIpcScheme ( void  ) const

Determines if this instance has a IPC scheme.

Returns
true if this instance has a IPC scheme, otherwise false.

The IPC scheme specifies local inter-process communication using Unix-Domain sockets.

◆ HasScheme()

bool Arp::Base::Commons::Net::Url::HasScheme ( void  ) const

Determines if this instance has a specified scheme.

Returns
true if this instance has a specified scheme, otherwise false.

◆ HasTcpScheme()

bool Arp::Base::Commons::Net::Url::HasTcpScheme ( void  ) const

Determines if this instance has a TCP scheme.

Returns
true if this instance has a TCP scheme, otherwise false.

The TCP scheme specifies remote communication TCP sockets.

◆ HasTlsScheme()

bool Arp::Base::Commons::Net::Url::HasTlsScheme ( void  ) const

Determines if this instance has a TLS scheme.

Returns
true if this instance has a TLS scheme, otherwise false.

The TLS scheme specifies encrypted remote communication TCP sockets with TLS.

◆ IsEmpty()

bool Arp::Base::Commons::Net::Url::IsEmpty ( void  ) const

Determines if this instance is empty.

Returns
true if this instance is empty, otherwise false.

◆ IsEncrypted()

bool Arp::Base::Commons::Net::Url::IsEncrypted ( void  ) const

Determines if this instance specifies an encrypted protocol like <cTLS.

Returns
true if this instance specifies an encrypted protocol, otherwise false.

◆ operator=() [1/2]

Url & Arp::Base::Commons::Net::Url::operator= ( const Url arg)
default

The default copy-assignment operator.

Parameters
argThe argument to copy.
Returns
This instance.

◆ operator=() [2/2]

Url & Arp::Base::Commons::Net::Url::operator= ( Url &&  arg)
defaultnoexcept

The default move-assignment operator.

Parameters
argThe argument to move.
Returns
This instance.

◆ Parse()

Url Arp::Base::Commons::Net::Url::Parse ( const String input)
static

Parses an Url string.

Parameters
inputThe input string to parse.
Returns
The parsed Url.

<exception cref="ArgumentException/>If the input string does not represent an Url.</execption>

◆ ToString()

String Arp::Base::Commons::Net::Url::ToString ( void  ) const

Returns the entire Url string of this instance.

Returns
The entire Url string of this instance.

◆ TryParse()

bool Arp::Base::Commons::Net::Url::TryParse ( const String input,
Url result 
)
static

Parses an Url string.

Parameters
inputThe input string to parse.
resultThe resulting Url.
Returns
true on success, otherwise false.

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