|
DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
Class that represents an IP address and a port TODO: should be replaced by something better ? More...
#include <ip_format.hpp>
Public Member Functions | |
| IPFormat (const std::string &ip="0.0.0.0", int port=0) | |
| Constructor that set the IP address and the port. | |
| IPFormat (const IPFormat &o) | |
| Copy constructor. | |
| IPFormat & | operator= (IPFormat const &)=default |
| Defualt = operator. | |
| bool | operator== (IPFormat const &o) const |
| == operator | |
| bool | operator< (IPFormat const &o) const |
| < operator | |
| std::string | get_ip_port () const |
| Get the IP address and the port in the format "ip:port". | |
| bool | is_default () const |
| Check if the IP address and the port are set to the default values. | |
| void | set_port (int port) |
| char * | strtok_s (char *s, const char *delim, char **context) |
| void | set_ip (const std::string &ip) |
| Set the IP address, must be called after set_port() if the port is specified in the IP address ex 0.0.0.0:1234. | |
| std::string | get_ip () const |
| int | get_port () const |
Private Attributes | |
| std::string | m_ip = "0.0.0.0" |
| IP address. | |
| int | m_port = 0 |
| Port. | |
Class that represents an IP address and a port TODO: should be replaced by something better ?
Definition at line 25 of file ip_format.hpp.
|
inlineexplicit |
Constructor that set the IP address and the port.
| ip | IP address |
| port | Port |
Definition at line 33 of file ip_format.hpp.
|
inline |
Copy constructor.
Definition at line 40 of file ip_format.hpp.
|
inline |
Definition at line 116 of file ip_format.hpp.
|
inline |
Get the IP address and the port in the format "ip:port".
Definition at line 57 of file ip_format.hpp.
|
inline |
Definition at line 117 of file ip_format.hpp.
|
inline |
Check if the IP address and the port are set to the default values.
Definition at line 61 of file ip_format.hpp.
< operator
Definition at line 53 of file ip_format.hpp.
Defualt = operator.
== operator
Definition at line 50 of file ip_format.hpp.
|
inline |
Set the IP address, must be called after set_port() if the port is specified in the IP address ex 0.0.0.0:1234.
Definition at line 80 of file ip_format.hpp.
|
inline |
Definition at line 64 of file ip_format.hpp.
|
inline |
Definition at line 75 of file ip_format.hpp.
|
private |
IP address.
Definition at line 121 of file ip_format.hpp.
|
private |
Port.
Definition at line 123 of file ip_format.hpp.