fipa_services
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
fipa::services::transports::Address Class Reference

Communication address specified by IP, port, and protocol. More...

#include <Address.hpp>

Public Member Functions

 Address ()
 
 Address (const std::string &ip, uint16_t port, const std::string &protocol="udt")
 
std::string toString () const
 
bool operator== (const Address &other) const
 
bool operator!= (const Address &other) const
 
bool operator< (const Address &other) const
 

Static Public Member Functions

static Address fromString (const std::string &address)
 

Public Attributes

std::string ip
 
uint16_t port
 
std::string protocol
 

Detailed Description

Communication address specified by IP, port, and protocol.

Constructor & Destructor Documentation

fipa::services::transports::Address::Address ( )
inline
fipa::services::transports::Address::Address ( const std::string &  ip,
uint16_t  port,
const std::string &  protocol = "udt" 
)

Member Function Documentation

Address fipa::services::transports::Address::fromString ( const std::string &  address)
static

Create address from string

Returns
std::invalid_argument if address is malformatted
bool fipa::services::transports::Address::operator!= ( const Address other) const
inline
bool fipa::services::transports::Address::operator< ( const Address other) const

Less than operator, to allow usage of this structure with std::set

Returns
true if other address is greater, false otherwise
bool fipa::services::transports::Address::operator== ( const Address other) const

Equals operator

Returns
True if equal, false otherwise
std::string fipa::services::transports::Address::toString ( ) const

Convert address to string

Returns
Address as string

Member Data Documentation

std::string fipa::services::transports::Address::ip
uint16_t fipa::services::transports::Address::port
std::string fipa::services::transports::Address::protocol

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