ariba::addressing::tcpip_endpoint Class Reference

#include <source/ariba/utility/addressing/tcpip_endpoint.hpp>

Inherits address_convenience< tcpip_endpoint >.

Collaboration diagram for ariba::addressing::tcpip_endpoint:

Collaboration graph
[legend]

List of all members.

Public Types

typedef tcpip_endpoint self

Public Member Functions

 tcpip_endpoint ()
 tcpip_endpoint (const tcpip_endpoint &copy)
 tcpip_endpoint (uint16_t port)
 tcpip_endpoint (const ip_address &ip, const tcp_port_address &port)
 tcpip_endpoint (const std::string &ip, const std::string &port)
 tcpip_endpoint (const std::string &ip, uint16_t port)
 tcpip_endpoint (const std::string &text)
 tcpip_endpoint (const char *text)
 tcpip_endpoint (const uint8_t *bytes, size_t size)
bool assign (const self &copy)
int compare_to (const self &rhs) const
 implements comparison operators
bool is_bytes_size_static () const
 returns true, if this address has a fixed size in bytes
size_t to_bytes_size () const
 returns the number of bytes used for serialization of this address
void to_bytes (uint8_t *bytes) const
 converts this address to a binary representation
bool assign (const uint8_t *bytes, size_t size)
 Assigns an address using a bunch of bytes.
std::string to_string () const
 convert address to a string that can be used to reconstruct the address
bool assign (const std::string &text)
 Assigns an address using a human-readable.
const string & type_name () const
 returns the name of the address
uint16_t type_id () const
 returns the id of the address
ip_addressaddress ()
const ip_addressaddress () const
tcp_port_addressport ()
const tcp_port_addressport () const
tcp::endpoint asio () const
 returns the asio endpoint
void asio (tcp::endpoint &endp)
 sets the asio endpoint

Private Attributes

ip_address ip
tcp_port_address port_

Static Private Attributes

static const std::string protocol_name = "tcp-ip"


Detailed Description

TODO: Doc

Author:
Sebastian Mies <mies@tm.uka.de>

Definition at line 31 of file tcpip_endpoint.hpp.


Member Typedef Documentation

Definition at line 38 of file tcpip_endpoint.hpp.


Constructor & Destructor Documentation

ariba::addressing::tcpip_endpoint::tcpip_endpoint (  )  [inline]

Definition at line 41 of file tcpip_endpoint.hpp.

ariba::addressing::tcpip_endpoint::tcpip_endpoint ( const tcpip_endpoint copy  )  [inline]

Definition at line 45 of file tcpip_endpoint.hpp.

References assign().

ariba::addressing::tcpip_endpoint::tcpip_endpoint ( uint16_t  port  )  [inline]

Definition at line 49 of file tcpip_endpoint.hpp.

ariba::addressing::tcpip_endpoint::tcpip_endpoint ( const ip_address ip,
const tcp_port_address port 
) [inline]

Definition at line 52 of file tcpip_endpoint.hpp.

ariba::addressing::tcpip_endpoint::tcpip_endpoint ( const std::string &  ip,
const std::string &  port 
) [inline]

Definition at line 56 of file tcpip_endpoint.hpp.

ariba::addressing::tcpip_endpoint::tcpip_endpoint ( const std::string &  ip,
uint16_t  port 
) [inline]

Definition at line 60 of file tcpip_endpoint.hpp.

ariba::addressing::tcpip_endpoint::tcpip_endpoint ( const std::string &  text  )  [inline]

Definition at line 64 of file tcpip_endpoint.hpp.

References assign().

ariba::addressing::tcpip_endpoint::tcpip_endpoint ( const char *  text  )  [inline]

Definition at line 68 of file tcpip_endpoint.hpp.

References assign().

ariba::addressing::tcpip_endpoint::tcpip_endpoint ( const uint8_t *  bytes,
size_t  size 
) [inline]

Definition at line 72 of file tcpip_endpoint.hpp.

References assign().


Member Function Documentation

const ip_address& ariba::addressing::tcpip_endpoint::address (  )  const [inline]

Definition at line 165 of file tcpip_endpoint.hpp.

References ip.

ip_address& ariba::addressing::tcpip_endpoint::address (  )  [inline]

void ariba::addressing::tcpip_endpoint::asio ( tcp::endpoint &  endp  )  [inline]

tcp::endpoint ariba::addressing::tcpip_endpoint::asio (  )  const [inline]

bool ariba::addressing::tcpip_endpoint::assign ( const std::string &  text  )  [inline]

Assigns an address using a human-readable.

Definition at line 132 of file tcpip_endpoint.hpp.

References ariba::addressing::port_address_tpl< AddressInfo >::assign(), ariba::addressing::ip_address::assign(), ip, and port_.

bool ariba::addressing::tcpip_endpoint::assign ( const uint8_t *  bytes,
size_t  size 
) [inline]

Assigns an address using a bunch of bytes.

Definition at line 109 of file tcpip_endpoint.hpp.

References ariba::addressing::port_address_tpl< AddressInfo >::assign(), ariba::addressing::ip_address::assign(), ip, and port_.

bool ariba::addressing::tcpip_endpoint::assign ( const self copy  )  [inline]

Definition at line 76 of file tcpip_endpoint.hpp.

References ip, and port_.

Referenced by tcpip_endpoint(), and ariba::addressing::detail::test().

int ariba::addressing::tcpip_endpoint::compare_to ( const self rhs  )  const [inline]

bool ariba::addressing::tcpip_endpoint::is_bytes_size_static (  )  const [inline]

returns true, if this address has a fixed size in bytes

Definition at line 93 of file tcpip_endpoint.hpp.

const tcp_port_address& ariba::addressing::tcpip_endpoint::port (  )  const [inline]

Definition at line 173 of file tcpip_endpoint.hpp.

References port_.

tcp_port_address& ariba::addressing::tcpip_endpoint::port (  )  [inline]

void ariba::addressing::tcpip_endpoint::to_bytes ( uint8_t *  bytes  )  const [inline]

size_t ariba::addressing::tcpip_endpoint::to_bytes_size (  )  const [inline]

returns the number of bytes used for serialization of this address

Definition at line 98 of file tcpip_endpoint.hpp.

References ip, port_, ariba::addressing::port_address_tpl< AddressInfo >::to_bytes_size(), and ariba::addressing::ip_address::to_bytes_size().

Referenced by ariba::addressing::detail::test().

std::string ariba::addressing::tcpip_endpoint::to_string (  )  const [inline]

uint16_t ariba::addressing::tcpip_endpoint::type_id (  )  const [inline]

returns the id of the address

Definition at line 155 of file tcpip_endpoint.hpp.

const string& ariba::addressing::tcpip_endpoint::type_name (  )  const [inline]

returns the name of the address

Definition at line 150 of file tcpip_endpoint.hpp.

References protocol_name.


Member Data Documentation

Definition at line 33 of file tcpip_endpoint.hpp.

Referenced by address(), asio(), assign(), compare_to(), to_bytes(), to_bytes_size(), and to_string().

Definition at line 34 of file tcpip_endpoint.hpp.

Referenced by asio(), assign(), compare_to(), port(), to_bytes(), to_bytes_size(), and to_string().

const std::string ariba::addressing::tcpip_endpoint::protocol_name = "tcp-ip" [static, private]

Definition at line 35 of file tcpip_endpoint.hpp.

Referenced by type_name().


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

Generated on Fri Aug 14 23:39:15 2009 for Ariba by  doxygen 1.5.8