Realistic 3D camera system
3D camera system components
|
Implements IP version 4 style addresses. More...
#include <address_v4.hpp>
Public Types | |
typedef asio::detail::array< unsigned char, 4 > | bytes_type |
The type used to represent an address as an array of bytes. More... | |
Public Member Functions | |
address_v4 () | |
Default constructor. More... | |
ASIO_DECL | address_v4 (const bytes_type &bytes) |
Construct an address from raw bytes. More... | |
ASIO_DECL | address_v4 (unsigned long addr) |
Construct an address from a unsigned long in host byte order. More... | |
address_v4 (const address_v4 &other) | |
Copy constructor. More... | |
address_v4 & | operator= (const address_v4 &other) |
Assign from another address. More... | |
ASIO_DECL bytes_type | to_bytes () const |
Get the address in bytes, in network byte order. More... | |
ASIO_DECL unsigned long | to_ulong () const |
Get the address as an unsigned long in host byte order. More... | |
ASIO_DECL std::string | to_string () const |
Get the address as a string in dotted decimal format. More... | |
ASIO_DECL std::string | to_string (asio::error_code &ec) const |
Get the address as a string in dotted decimal format. More... | |
ASIO_DECL bool | is_loopback () const |
Determine whether the address is a loopback address. More... | |
ASIO_DECL bool | is_unspecified () const |
Determine whether the address is unspecified. More... | |
ASIO_DECL bool | is_class_a () const |
Determine whether the address is a class A address. More... | |
ASIO_DECL bool | is_class_b () const |
Determine whether the address is a class B address. More... | |
ASIO_DECL bool | is_class_c () const |
Determine whether the address is a class C address. More... | |
ASIO_DECL bool | is_multicast () const |
Determine whether the address is a multicast address. More... | |
Static Public Member Functions | |
static ASIO_DECL address_v4 | from_string (const char *str) |
Create an address from an IP address string in dotted decimal form. More... | |
static ASIO_DECL address_v4 | from_string (const char *str, asio::error_code &ec) |
Create an address from an IP address string in dotted decimal form. More... | |
static ASIO_DECL address_v4 | from_string (const std::string &str) |
Create an address from an IP address string in dotted decimal form. More... | |
static ASIO_DECL address_v4 | from_string (const std::string &str, asio::error_code &ec) |
Create an address from an IP address string in dotted decimal form. More... | |
static address_v4 | any () |
Obtain an address object that represents any address. More... | |
static address_v4 | loopback () |
Obtain an address object that represents the loopback address. More... | |
static address_v4 | broadcast () |
Obtain an address object that represents the broadcast address. More... | |
static ASIO_DECL address_v4 | broadcast (const address_v4 &addr, const address_v4 &mask) |
static ASIO_DECL address_v4 | netmask (const address_v4 &addr) |
Friends | |
bool | operator== (const address_v4 &a1, const address_v4 &a2) |
Compare two addresses for equality. More... | |
bool | operator!= (const address_v4 &a1, const address_v4 &a2) |
Compare two addresses for inequality. More... | |
bool | operator< (const address_v4 &a1, const address_v4 &a2) |
Compare addresses for ordering. More... | |
bool | operator> (const address_v4 &a1, const address_v4 &a2) |
Compare addresses for ordering. More... | |
bool | operator<= (const address_v4 &a1, const address_v4 &a2) |
Compare addresses for ordering. More... | |
bool | operator>= (const address_v4 &a1, const address_v4 &a2) |
Compare addresses for ordering. More... | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename Elem , typename Traits > | |
std::basic_ostream< Elem, Traits > & | operator<< (std::basic_ostream< Elem, Traits > &os, const address_v4 &addr) |
Output an address as a string. More... | |
Implements IP version 4 style addresses.
The asio::ip::address_v4 class provides the ability to use and manipulate IP version 4 addresses.
Definition at line 43 of file address_v4.hpp.
typedef asio::detail::array<unsigned char, 4> asio::ip::address_v4::bytes_type |
The type used to represent an address as an array of bytes.
std::array
when it is available. Otherwise, it uses boost:array
. Definition at line 54 of file address_v4.hpp.
|
inline |
Default constructor.
Definition at line 58 of file address_v4.hpp.
|
explicit |
Construct an address from raw bytes.
Definition at line 32 of file address_v4.ipp.
|
explicit |
Construct an address from a unsigned long in host byte order.
Definition at line 47 of file address_v4.ipp.
|
inline |
Copy constructor.
Definition at line 70 of file address_v4.hpp.
|
inlinestatic |
Obtain an address object that represents any address.
Definition at line 180 of file address_v4.hpp.
|
inlinestatic |
Obtain an address object that represents the broadcast address.
Definition at line 192 of file address_v4.hpp.
|
static |
Obtain an address object that represents the broadcast address that corresponds to the specified address and netmask.
Definition at line 157 of file address_v4.ipp.
|
static |
Create an address from an IP address string in dotted decimal form.
Definition at line 98 of file address_v4.ipp.
|
static |
Create an address from an IP address string in dotted decimal form.
Definition at line 106 of file address_v4.ipp.
|
static |
Create an address from an IP address string in dotted decimal form.
Definition at line 116 of file address_v4.ipp.
|
static |
Create an address from an IP address string in dotted decimal form.
Definition at line 121 of file address_v4.ipp.
bool asio::ip::address_v4::is_class_a | ( | ) | const |
Determine whether the address is a class A address.
Definition at line 137 of file address_v4.ipp.
bool asio::ip::address_v4::is_class_b | ( | ) | const |
Determine whether the address is a class B address.
Definition at line 142 of file address_v4.ipp.
bool asio::ip::address_v4::is_class_c | ( | ) | const |
Determine whether the address is a class C address.
Definition at line 147 of file address_v4.ipp.
bool asio::ip::address_v4::is_loopback | ( | ) | const |
Determine whether the address is a loopback address.
Definition at line 127 of file address_v4.ipp.
bool asio::ip::address_v4::is_multicast | ( | ) | const |
Determine whether the address is a multicast address.
Definition at line 152 of file address_v4.ipp.
bool asio::ip::address_v4::is_unspecified | ( | ) | const |
Determine whether the address is unspecified.
Definition at line 132 of file address_v4.ipp.
|
inlinestatic |
Obtain an address object that represents the loopback address.
Definition at line 186 of file address_v4.hpp.
|
static |
Obtain the netmask that corresponds to the address, based on its address class.
Definition at line 162 of file address_v4.ipp.
|
inline |
Assign from another address.
Definition at line 84 of file address_v4.hpp.
address_v4::bytes_type asio::ip::address_v4::to_bytes | ( | ) | const |
Get the address in bytes, in network byte order.
Definition at line 61 of file address_v4.ipp.
std::string asio::ip::address_v4::to_string | ( | ) | const |
Get the address as a string in dotted decimal format.
Definition at line 78 of file address_v4.ipp.
std::string asio::ip::address_v4::to_string | ( | asio::error_code & | ec | ) | const |
Get the address as a string in dotted decimal format.
Definition at line 86 of file address_v4.ipp.
unsigned long asio::ip::address_v4::to_ulong | ( | ) | const |
Get the address as an unsigned long in host byte order.
Definition at line 73 of file address_v4.ipp.
|
friend |
Compare two addresses for inequality.
Definition at line 150 of file address_v4.hpp.
|
friend |
Compare addresses for ordering.
Definition at line 156 of file address_v4.hpp.
|
related |
Output an address as a string.
Used to output a human-readable string for a specified address.
os | The output stream to which the string will be written. |
addr | The address to be written. |
Definition at line 28 of file address_v4.hpp.
|
friend |
Compare addresses for ordering.
Definition at line 168 of file address_v4.hpp.
|
friend |
Compare two addresses for equality.
Definition at line 144 of file address_v4.hpp.
|
friend |
Compare addresses for ordering.
Definition at line 162 of file address_v4.hpp.
|
friend |
Compare addresses for ordering.
Definition at line 174 of file address_v4.hpp.