#include <address.h>
Inheritance diagram for network_address:


Public Types | |
| enum | address_type { ADDRESS_SENTINEL_BEGIN = 0, UNINITIALIZED_ADDRESS = 0, INVALID_ADDRESS = UNINITIALIZED_ADDRESS, IPC_ADDRESS, INTERNET_ADDRESS, SERIAL_PORT_ADDRESS, ADDRESS_SENTINEL_END } |
Public Member Functions | |
| network_address () | |
| network_address (const network_address &to_copy) | |
| network_address (const internet_address &address) | |
| network_address (const serial_port_address &address) | |
| network_address (const ipc_address &address) | |
| ~network_address () | |
| IMPLEMENT_CLASS_NAME ("network_address") | |
| network_address & | operator= (const network_address &to_copy) |
| bool | valid () const |
| const char * | type_name () const |
| address_type | type () const |
| internet_address * | internet () |
| const internet_address * | internet () const |
| serial_port_address * | serial () |
| const serial_port_address * | serial () const |
| ipc_address * | ipc () |
| const ipc_address * | ipc () const |
| bool | comparable (address_type a, address_type b) const |
| bool | same_host (const network_address &to_compare) const |
| bool | same_port (const network_address &to_compare) const |
| bool | operator== (const network_address &to_compare) const |
| bool | operator!= (const network_address &to_compare) const |
| bool | shareable (const network_address &to_compare) const |
| istring | text_form (bool show_type=true) const |
| istring | tokenize () const |
| bool | detokenize (const istring &info) |
| void | parse_pack (byte_array &packed_form) const |
| bool | parse_unpack (byte_array &packed_form) |
| machine_uid | convert () const |
| istring | unified_hostname () const |
| virtual int | packed_size () const |
| Estimates the space needed for the packed structure. | |
| void | pack (byte_array &packed_form) const |
| Creates a packed form of the packable object in "packed_form". | |
| bool | unpack (byte_array &packed_form) |
| Restores the packable from the "packed_form". | |
Static Public Member Functions | |
| static istring | text_for_type (address_type type) |
| static address_type | type_from_text (const istring &text) |
| static network_address | load (configurator &config, const istring §ion, const istring &name, const network_address &default_address) |
| static bool | store (configurator &config, const istring §ion, const istring &name, const network_address &to_store) |
Definition at line 256 of file address.h.
| network_address::network_address | ( | ) |
| network_address::network_address | ( | const network_address & | to_copy | ) |
Definition at line 52 of file address.cpp.
| network_address::network_address | ( | const internet_address & | address | ) |
Definition at line 58 of file address.cpp.
| network_address::network_address | ( | const serial_port_address & | address | ) |
Definition at line 65 of file address.cpp.
| network_address::network_address | ( | const ipc_address & | address | ) |
Definition at line 70 of file address.cpp.
| network_address::~network_address | ( | ) |
| network_address::IMPLEMENT_CLASS_NAME | ( | "network_address" | ) |
| network_address & network_address::operator= | ( | const network_address & | to_copy | ) |
Definition at line 83 of file address.cpp.
References _addr, _type, address_base::create_copy(), and WHACK().
| bool network_address::valid | ( | ) | const |
Definition at line 93 of file address.cpp.
References ADDRESS_SENTINEL_BEGIN, and ADDRESS_SENTINEL_END.
| const char* network_address::type_name | ( | ) | const [inline] |
| address_type network_address::type | ( | ) | const [inline] |
Definition at line 294 of file address.h.
Referenced by connection_table::find_low_level(), text_form(), tokenize(), unified_hostname(), and unpack().
| istring network_address::text_for_type | ( | address_type | type | ) | [static] |
Definition at line 161 of file address.cpp.
References INTERNET_ADDRESS, IPC_ADDRESS, SERIAL_PORT_ADDRESS, and UNINITIALIZED_ADDRESS.
Referenced by text_form(), and tokenize().
| network_address::address_type network_address::type_from_text | ( | const istring & | text | ) | [static] |
| internet_address * network_address::internet | ( | ) |
| const internet_address * network_address::internet | ( | ) | const |
Definition at line 107 of file address.cpp.
| serial_port_address * network_address::serial | ( | ) |
Definition at line 100 of file address.cpp.
| const serial_port_address * network_address::serial | ( | ) | const |
Definition at line 111 of file address.cpp.
| ipc_address * network_address::ipc | ( | ) |
Definition at line 103 of file address.cpp.
| const ipc_address * network_address::ipc | ( | ) | const |
Definition at line 114 of file address.cpp.
| bool network_address::comparable | ( | address_type | a, | |
| address_type | b | |||
| ) | const |
| bool network_address::same_host | ( | const network_address & | to_compare | ) | const |
Definition at line 131 of file address.cpp.
References _addr, _type, comparable(), FUNCDEF, and address_base::same_host().
Referenced by operator==().
| bool network_address::same_port | ( | const network_address & | to_compare | ) | const |
Definition at line 140 of file address.cpp.
References _addr, _type, comparable(), FUNCDEF, and address_base::same_port().
Referenced by operator==().
| bool network_address::operator== | ( | const network_address & | to_compare | ) | const |
| bool network_address::operator!= | ( | const network_address & | to_compare | ) | const [inline] |
| bool network_address::shareable | ( | const network_address & | to_compare | ) | const |
| istring network_address::text_form | ( | bool | show_type = true |
) | const |
Definition at line 188 of file address.cpp.
References text_for_type(), address_base::text_form(), and type().
Referenced by dns_entry::text_form(), and connection::text_form().
| istring network_address::tokenize | ( | ) | const |
Definition at line 214 of file address.cpp.
References text_for_type(), TOKEN_ASSIGN(), TOKEN_SEPARATOR(), address_base::tokenize(), and type().
Referenced by load(), parse_pack(), and store().
| bool network_address::detokenize | ( | const istring & | info | ) |
Definition at line 237 of file address.cpp.
References FILL, istring::find(), FUNCDEF, INTERNET_ADDRESS, IPC_ADDRESS, istring::length(), LOG, istring::lower(), negative(), SERIAL_PORT_ADDRESS, istring::strip_spaces(), istring::substring(), TOKEN_ASSIGN(), TOKEN_SEPARATOR(), type_from_text(), type_name(), UNINITIALIZED_ADDRESS, and WHACK().
Referenced by load(), and parse_unpack().
| network_address network_address::load | ( | configurator & | config, | |
| const istring & | section, | |||
| const istring & | name, | |||
| const network_address & | default_address | |||
| ) | [static] |
Definition at line 281 of file address.cpp.
References detokenize(), configurator::get(), network_address(), configurator::put(), and tokenize().
| bool network_address::store | ( | configurator & | config, | |
| const istring & | section, | |||
| const istring & | name, | |||
| const network_address & | to_store | |||
| ) | [static] |
| void network_address::parse_pack | ( | byte_array & | packed_form | ) | const |
| bool network_address::parse_unpack | ( | byte_array & | packed_form | ) |
| machine_uid network_address::convert | ( | ) | const |
| istring network_address::unified_hostname | ( | ) | const |
Definition at line 201 of file address.cpp.
References internet(), INTERNET_ADDRESS, IPC_ADDRESS, internet_address::normalize_host(), and type().
| int network_address::packed_size | ( | ) | const [virtual] |
Estimates the space needed for the packed structure.
Reimplemented from packable.
Definition at line 125 of file address.cpp.
References address_base::packed_size().
| void network_address::pack | ( | byte_array & | packed_form | ) | const [virtual] |
Creates a packed form of the packable object in "packed_form".
This must append to the data in "packed_form" rather than clearing prior contents.
Implements packable.
Definition at line 324 of file address.cpp.
References basis::attach(), and packable::pack().
Referenced by string_array().
| bool network_address::unpack | ( | byte_array & | packed_form | ) | [virtual] |
Restores the packable from the "packed_form".
This object becomes the unpacked form, and therefore must lose any of its prior contents that depend on the data in "packed_form". This is up to the derived unpack function to figure out. The "packed_form" is modified by extracting all of the pieces that are used for this object; the remainder stays in "packed_form". true is returned if the unpacking was successful.
Implements packable.
Definition at line 330 of file address.cpp.
References basis::detach(), FUNCDEF, INTERNET_ADDRESS, IPC_ADDRESS, LOG, SERIAL_PORT_ADDRESS, type(), UNINITIALIZED_ADDRESS, packable::unpack(), and WHACK().
Referenced by string_array().
1.5.1