Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACEXML_URL_Addr Class Reference

Defines a URL address family address format. More...

#include "ACEXML/common/URL_Addr.h"

Inheritance diagram for ACEXML_URL_Addr:

Inheritance graph
[legend]
Collaboration diagram for ACEXML_URL_Addr:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACEXML_URL_Addr (void)
 Initialization and termination methods. More...

 ACEXML_URL_Addr (const ACEXML_Char *host_name, const ACEXML_Char *path_name, unsigned short port=ACE_DEFAULT_HTTP_PORT)
 Constructor. More...

 ACEXML_URL_Addr (const ACEXML_URL_Addr &addr)
 Copy constructor. More...

int set (const ACEXML_URL_Addr &addr)
 Essentially the copy constructor. More...

virtual int string_to_addr (const ACEXML_Char *address)
 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"). More...

virtual int addr_to_string (ACEXML_Char *s, size_t size, int ipaddr_format=1) const
 Transform the current <ACE_INET_Addr> address into string format. More...

virtual const ACEXML_Charaddr_to_string (int ipaddr_format=1)
 Transform the current <ACE_INET_Addr> address into string format. More...

void operator= (const ACEXML_URL_Addr &addr)
 Assignment operator. More...

 ~ACEXML_URL_Addr (void)
 Destructor. More...

int operator== (const ACEXML_URL_Addr &SAP) const
 Compare two addresses for equality. More...

int operator!= (const ACEXML_URL_Addr &SAP) const
 Compare two addresses for inequality. More...

virtual u_long hash (void) const
 Computes and returns hash value. More...

const ACEXML_Charget_path_name (void) const
 Return the path name. More...

int destroy (void)
 Commit suicide. More...


Private Methods

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


Private Attributes

ACEXML_Charpath_name_
 Our path name. More...

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

size_t addr_string_len_
 Current length of the <addr_string_>. More...


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

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.

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.

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 int ACEXML_URL_Addr::operator!= const ACEXML_URL_Addr &    addr const
 

Compare two addresses for inequality.

ACE_INLINE void ACEXML_URL_Addr::operator= const ACEXML_URL_Addr &    addr
 

Assignment operator.

ACE_INLINE int ACEXML_URL_Addr::operator== const ACEXML_URL_Addr &    addr 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   s [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:
Generated on Thu Oct 10 17:28:10 2002 for ACEXML by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001