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

ACE_MEM_Addr Class Reference

Defines a C++ wrapper facade for the shared memory transport address family format. More...

#include <MEM_Addr.h>

Inheritance diagram for ACE_MEM_Addr

Inheritance graph
[legend]
Collaboration diagram for ACE_MEM_Addr:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACE_MEM_Addr (void)
 Default constructor.

 ACE_MEM_Addr (const ACE_MEM_Addr &)
 Copy constructor.

 ACE_MEM_Addr (u_short port_number)
 Creates an from a <port_number> and the remote <host_name>.

ACE_EXPLICIT ACE_MEM_Addr (const ACE_TCHAR port_name[])
 Creates an from a <port_name>.

 ~ACE_MEM_Addr (void)
 Default dtor.

int initialize_local (u_short port)
 default initialization routine.

int same_host (const ACE_INET_Addr& sap)
 Check if <sap> designate an enpoint withing the same host.

int set (u_short port_number, int encode = 1)
int set (const ACE_TCHAR port_name[])
 Uses <getservbyname> to initialize an from a <port_name>, the remote <host_name>, and the <protocol>.

virtual void* get_addr (void) const
 Return a pointer to the underlying network address.

virtual void set_addr (void *, int len)
 Set a pointer to the address.

virtual int addr_to_string (ACE_TCHAR buffer[], size_t size, int ipaddr_format = 1) const
 Transform the external address into string format.

virtual int string_to_addr (const ACE_TCHAR address[])
 Initializes the external from the .

void set_port_number (u_short, int encode = 1)
 Sets the port number.

u_short get_port_number (void) const
 Return the port number, converting it into host byte order.

int get_host_name (ACE_TCHAR hostname[], size_t hostnamelen) const
 Return the character representation of the hostname.

const char* get_host_name (void) const
const char* get_host_addr (void) const
 Return the "dotted decimal" external address.

ACE_UINT32 get_ip_address (void) const
 Return the 4-byte external IP address, converting it into host byte order.

const ACE_INET_Addrget_remote_addr (void) const
const ACE_INET_Addrget_local_addr (void) const
int operator== (const ACE_MEM_Addr &SAP) const
 Compare two addresses for equality. The addresses are considered equal if they contain the same IP address and port number.

int operator== (const ACE_INET_Addr &SAP) const
int operator!= (const ACE_MEM_Addr &SAP) const
 Compare two addresses for inequality.

int operator!= (const ACE_INET_Addr &SAP) const
virtual u_long hash (void) const
 Computes and returns hash value.

void dump (void) const
 Dump the state of an object.


Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.


Private Attributes

ACE_INET_Addr external_
 External INET addr used for identifying host.

ACE_INET_Addr internal_
 Internal INET addr for accepting/connecting.


Detailed Description

Defines a C++ wrapper facade for the shared memory transport address family format.


Constructor & Destructor Documentation

ACE_MEM_Addr::ACE_MEM_Addr ( void )
 

Default constructor.

ACE_MEM_Addr::ACE_MEM_Addr ( const ACE_MEM_Addr & sa )
 

Copy constructor.

ACE_MEM_Addr::ACE_MEM_Addr ( u_short port_number )
 

Creates an from a <port_number> and the remote <host_name>.

ACE_EXPLICIT ACE_MEM_Addr::ACE_MEM_Addr ( const ACE_TCHAR port_name[] )
 

Creates an from a <port_name>.

ACE_INLINE ACE_MEM_Addr::~ACE_MEM_Addr ( void )
 

Default dtor.


Member Function Documentation

int ACE_MEM_Addr::addr_to_string ( ACE_TCHAR buffer[],
size_t size,
int ipaddr_format = 1 ) const [virtual]
 

Transform the external address into string format.

void ACE_MEM_Addr::dump ( void ) const
 

Dump the state of an object.

Reimplemented from ACE_Addr.

void * ACE_MEM_Addr::get_addr ( void ) const [virtual]
 

Return a pointer to the underlying network address.

Reimplemented from ACE_Addr.

ACE_INLINE const char * ACE_MEM_Addr::get_host_addr ( void ) const
 

Return the "dotted decimal" external address.

const char * ACE_MEM_Addr::get_host_name ( void ) const
 

Return the character representation of the hostname (this version is non-reentrant since it returns a pointer to a static data area).

int ACE_MEM_Addr::get_host_name ( ACE_TCHAR hostname[],
size_t hostnamelen ) const
 

Return the character representation of the hostname.

ACE_INLINE ACE_UINT32 ACE_MEM_Addr::get_ip_address ( void ) const
 

Return the 4-byte external IP address, converting it into host byte order.

ACE_INLINE const ACE_INET_Addr & ACE_MEM_Addr::get_local_addr ( void ) const
 

ACE_INLINE u_short ACE_MEM_Addr::get_port_number ( void ) const
 

Return the port number, converting it into host byte order.

ACE_INLINE const ACE_INET_Addr & ACE_MEM_Addr::get_remote_addr ( void ) const
 

ACE_INLINE u_long ACE_MEM_Addr::hash ( void ) const [virtual]
 

Computes and returns hash value.

Reimplemented from ACE_Addr.

int ACE_MEM_Addr::initialize_local ( u_short port )
 

default initialization routine.

ACE_INLINE int ACE_MEM_Addr::operator!= ( const ACE_INET_Addr & sap ) const
 

ACE_INLINE int ACE_MEM_Addr::operator!= ( const ACE_MEM_Addr & sap ) const
 

Compare two addresses for inequality.

ACE_INLINE int ACE_MEM_Addr::operator== ( const ACE_INET_Addr & sap ) const
 

ACE_INLINE int ACE_MEM_Addr::operator== ( const ACE_MEM_Addr & sap ) const
 

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

int ACE_MEM_Addr::same_host ( const ACE_INET_Addr & sap )
 

Check if <sap> designate an enpoint withing the same host.

ACE_INLINE int ACE_MEM_Addr::set ( const ACE_TCHAR port_number[] )
 

Uses <getservbyname> to initialize an from a <port_name>, the remote <host_name>, and the <protocol>.

ACE_INLINE int ACE_MEM_Addr::set ( u_short port_number,
int encode = 1 )
 

Initializes an from a <port_number> and the remote <host_name>. If <encode> is enabled then <port_number> is converted into network byte order, otherwise it is assumed to be in network byte order already and are passed straight through.

void ACE_MEM_Addr::set_addr ( void * addr,
int len ) [virtual]
 

Set a pointer to the address.

Reimplemented from ACE_Addr.

ACE_INLINE void ACE_MEM_Addr::set_port_number ( u_short port_number,
int encode = 1 )
 

Sets the port number.

int ACE_MEM_Addr::string_to_addr ( const ACE_TCHAR address[] ) [virtual]
 

Initializes the external from the .


Member Data Documentation

ACE_MEM_Addr::ACE_ALLOC_HOOK_DECLARE
 

Declare the dynamic allocation hooks.

Reimplemented from ACE_Addr.

ACE_INET_Addr ACE_MEM_Addr::external_ [private]
 

External INET addr used for identifying host.

ACE_INET_Addr ACE_MEM_Addr::internal_ [private]
 

Internal INET addr for accepting/connecting.


The documentation for this class was generated from the following files:
Generated at Fri Oct 5 07:02:54 2001 for ACE by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000