ACEXML  6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ACEXML_URL_Addr Class Reference

#include <URL_Addr.h>

Inheritance diagram for ACEXML_URL_Addr:
Inheritance graph
Collaboration diagram for ACEXML_URL_Addr:
Collaboration graph

Public Member Functions

 ACEXML_URL_Addr (void)
 Initialization and termination methods.
 
 ACEXML_URL_Addr (const ACEXML_Char *host_name, const ACEXML_Char *path_name, unsigned short port=ACE_DEFAULT_HTTP_PORT)
 Constructor.
 
 ACEXML_URL_Addr (const ACEXML_URL_Addr &addr)
 Copy constructor.
 
int set (const ACEXML_URL_Addr &addr)
 Essentially the copy constructor.
 
virtual int string_to_addr (const ACEXML_Char *address, int address_family=AF_UNSPEC)
 
virtual int addr_to_string (ACEXML_Char *s, size_t size, int ipaddr_format=1) const
 
virtual const ACEXML_Charaddr_to_string (int ipaddr_format=1)
 
void operator= (const ACEXML_URL_Addr &addr)
 Assignment operator.
 
 ~ACEXML_URL_Addr (void)
 Destructor.
 
bool operator== (const ACEXML_URL_Addr &SAP) const
 
bool operator!= (const ACEXML_URL_Addr &SAP) const
 Compare two addresses for inequality.
 
virtual u_long hash (void) const
 Computes and returns hash value.
 
const ACEXML_Charget_path_name (void) const
 Return the path name.
 
int destroy (void)
 Commit suicide.
 
- Public Member Functions inherited from ACE_INET_Addr
 ACE_INET_Addr (void)
 
 ACE_INET_Addr (const ACE_INET_Addr &)
 
 ACE_INET_Addr (const sockaddr_in *addr, int len)
 
 ACE_INET_Addr (u_short port_number, const char host_name[], int address_family=AF_UNSPEC)
 
 ACE_INET_Addr (const char address[], int address_family=AF_UNSPEC)
 
 ACE_INET_Addr (u_short port_number, ACE_UINT32 ip_addr=INADDR_ANY)
 
 ACE_INET_Addr (const char port_name[], const char host_name[], const char protocol[]="tcp")
 
 ACE_INET_Addr (const char port_name[], ACE_UINT32 ip_addr, const char protocol[]="tcp")
 
 ACE_INET_Addr (u_short port_number, const wchar_t host_name[], int address_family=AF_UNSPEC)
 
 ACE_INET_Addr (const wchar_t address[], int address_family=AF_UNSPEC)
 
 ACE_INET_Addr (const wchar_t port_name[], const wchar_t host_name[], const wchar_t protocol[]=ACE_TEXT_WIDE("tcp"))
 
 ACE_INET_Addr (const wchar_t port_name[], ACE_UINT32 ip_addr, const wchar_t protocol[]=ACE_TEXT_WIDE("tcp"))
 
 ~ACE_INET_Addr (void)
 
int set (const ACE_INET_Addr &)
 
int set (u_short port_number, const char host_name[], int encode=1, int address_family=AF_UNSPEC)
 
int set (u_short port_number, ACE_UINT32 ip_addr=INADDR_ANY, int encode=1, int map=0)
 
int set (const char port_name[], const char host_name[], const char protocol[]="tcp")
 
int set (const char port_name[], ACE_UINT32 ip_addr, const char protocol[]="tcp")
 
int set (const char addr[], int address_family=AF_UNSPEC)
 
int set (const sockaddr_in *, int len)
 
int set (u_short port_number, const wchar_t host_name[], int encode=1, int address_family=AF_UNSPEC)
 
int set (const wchar_t port_name[], const wchar_t host_name[], const wchar_t protocol[]=ACE_TEXT_WIDE("tcp"))
 
int set (const wchar_t port_name[], ACE_UINT32 ip_addr, const wchar_t protocol[]=ACE_TEXT_WIDE("tcp"))
 
int set (const wchar_t addr[], int address_family=AF_UNSPEC)
 
virtual void * get_addr (void) const
 
int get_addr_size (void) const
 
virtual void set_addr (void *, int len)
 
virtual void set_addr (void *, int len, int map)
 
virtual int addr_to_string (ACE_TCHAR buffer[], size_t size, int ipaddr_format=1) const
 
virtual int string_to_addr (const char address[], int address_family=AF_UNSPEC)
 
void set_port_number (u_short, int encode=1)
 
int set_address (const char *ip_addr, int len, int encode=1, int map=0)
 
int set_interface (const char *intf_name)
 
u_short get_port_number (void) const
 
int get_host_name (char hostname[], size_t hostnamelen) const
 
int get_host_name (wchar_t hostname[], size_t hostnamelen) const
 
const char * get_host_name (void) const
 
const char * get_host_addr (char *addr, int addr_size) const
 
const char * get_host_addr (void) const
 
ACE_UINT32 get_ip_address (void) const
 
bool is_any (void) const
 
bool is_loopback (void) const
 
bool is_multicast (void) const
 
bool is_linklocal (void) const
 
bool is_ipv4_mapped_ipv6 (void) const
 
bool is_ipv4_compat_ipv6 (void) const
 
bool operator< (const ACE_INET_Addr &rhs) const
 
bool operator== (const ACE_INET_Addr &SAP) const
 
bool operator!= (const ACE_INET_Addr &SAP) const
 
bool is_ip_equal (const ACE_INET_Addr &SAP) const
 
void dump (void) const
 
 ACE_Addr (int type=-1, int size=-1)
 
virtual ~ACE_Addr (void)
 
int get_size (void) const
 
void set_size (int size)
 
int get_type (void) const
 
void set_type (int type)
 
bool operator== (const ACE_Addr &sap) const
 
bool operator!= (const ACE_Addr &sap) const
 
void base_set (int type, int size)
 
void dump (void) const
 
- Public Member Functions inherited from ACE_Addr
 ACE_Addr (int type=-1, int size=-1)
 
int get_size (void) const
 
void set_size (int size)
 
int get_type (void) const
 
void set_type (int type)
 
bool operator== (const ACE_Addr &sap) const
 
bool operator!= (const ACE_Addr &sap) const
 
void base_set (int type, int size)
 
void dump (void) const
 

Private Member Functions

size_t calculate_length (int ipaddr_format) const
 Calculate the maximum length of the address string.
 

Private Attributes

ACEXML_Charpath_name_
 Our path name.
 
ACEXML_Charaddr_string_
 
size_t addr_string_len_
 Current length of the <addr_string_>
 

Additional Inherited Members

- Public Attributes inherited from ACE_INET_Addr
 ACE_ALLOC_HOOK_DECLARE
 
sockaddr_in in4_
 
sockaddr_in6 in6_
 
- Static Public Attributes inherited from ACE_INET_Addr
static const ACE_Addr sap_any
 
- Protected Attributes inherited from ACE_INET_Addr
int addr_type_
 
int addr_size_
 

Detailed Description

Defines a URL address family address format.

Constructor & Destructor Documentation

ACEXML_URL_Addr::ACEXML_URL_Addr ( void  )

Initialization and termination methods.

ACEXML_URL_Addr::ACEXML_URL_Addr ( const ACEXML_Char host_name,
const ACEXML_Char path_name,
unsigned short  port = ACE_DEFAULT_HTTP_PORT 
)

Constructor.

ACEXML_URL_Addr::ACEXML_URL_Addr ( const ACEXML_URL_Addr addr)

Copy constructor.

ACEXML_URL_Addr::~ACEXML_URL_Addr ( void  )

Destructor.

Member Function Documentation

int ACEXML_URL_Addr::addr_to_string ( ACEXML_Char s,
size_t  size,
int  ipaddr_format = 1 
) const
virtual

Transform the current <ACE_INET_Addr> address into string format. If <ipaddr_format> is non-0 this produces "ip-number:port-number/path-name" (e.g., "128.252.166.57:80/~schmidt/"), whereas if <ipaddr_format> is 0 this produces "ip-name:port-number" (e.g., "www.cs.wustl.edu:80/~schmidt/"). Returns -1 if the <size> of the <buffer> is too small, else 0.

const ACEXML_Char * ACEXML_URL_Addr::addr_to_string ( int  ipaddr_format = 1)
virtual

Transform the current <ACE_INET_Addr> address into string format. If <ipaddr_format> is non-0 this produces "ip-number:port-number/path-name" (e.g., "128.252.166.57:80/~schmidt/"), whereas if <ipaddr_format> is 0 this produces "ip-name:port-number" (e.g., "www.cs.wustl.edu:80/~schmidt/"). Uses dynamic memory, which is allocated on demand and deallocated when the object is destroyed. Returns -1 if dynamic memory fails, else 0.

ACE_INLINE size_t ACEXML_URL_Addr::calculate_length ( int  ipaddr_format) const
private

Calculate the maximum length of the address string.

ACE_INLINE int ACEXML_URL_Addr::destroy ( void  )

Commit suicide.

ACE_INLINE const ACEXML_Char * ACEXML_URL_Addr::get_path_name ( void  ) const

Return the path name.

ACE_INLINE u_long ACEXML_URL_Addr::hash ( void  ) const
virtual

Computes and returns hash value.

Reimplemented from ACE_INET_Addr.

ACE_INLINE bool ACEXML_URL_Addr::operator!= ( const ACEXML_URL_Addr SAP) const

Compare two addresses for inequality.

ACE_INLINE void ACEXML_URL_Addr::operator= ( const ACEXML_URL_Addr addr)

Assignment operator.

ACE_INLINE bool ACEXML_URL_Addr::operator== ( const ACEXML_URL_Addr SAP) const

Compare two addresses for equality. The addresses are considered equal if they contain the same IP address, port number, and path name.

int ACEXML_URL_Addr::set ( const ACEXML_URL_Addr addr)

Essentially the copy constructor.

int ACEXML_URL_Addr::string_to_addr ( const ACEXML_Char address,
int  address_family = AF_UNSPEC 
)
virtual

Initializes an <ACEXML_URL_Addr> from the <address>, which can be "ip-number:port-number/path-name" (e.g., "www.cs.wustl.edu:1234/~schmidt/" "ip-number:port-number/path-name" (e.g., "128.252.166.57:1234/~schmidt"). If there is no ':' in the <address> it is assumed to be an ip-number or ip-address number, with the port number <ACE_DEFAULT_HTTP_PORT>.

Member Data Documentation

ACEXML_Char* ACEXML_URL_Addr::addr_string_
private

The dynamically created address string that's used for the <addr_to_string> method.

size_t ACEXML_URL_Addr::addr_string_len_
private

Current length of the <addr_string_>

ACEXML_Char* ACEXML_URL_Addr::path_name_
private

Our path name.


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