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

ACE_Addr Class Reference

Defines the base class for the "address family independent" address format. More...

#include <Addr.h>

Inheritance diagram for ACE_Addr:

Inheritance graph
[legend]
Collaboration diagram for ACE_Addr:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACE_Addr (int type=-1, int size=-1)
 Initializes instance variables. More...

virtual ~ACE_Addr (void)
 Destructor. More...

int get_size (void) const
 Return the size of the address. More...

void set_size (int size)
 Sets the size of the address. More...

int get_type (void) const
 Get the type of the address. More...

void set_type (int type)
 Set the type of the address. More...

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

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

int operator== (const ACE_Addr &sap) const
 Check for address equality. More...

int operator!= (const ACE_Addr &sap) const
 Check for address inequality. More...

void base_set (int type, int size)
 Initializes instance variables. More...

virtual unsigned long hash (void) const
 Returns a hash value. This should be overwritten by a subclass that can produce a better hash value. More...

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


Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks. More...


Static Public Attributes

const ACE_Addr sap_any
 Wild-card address. More...


Protected Attributes

int addr_type_
 e.g., AF_UNIX, AF_INET, AF_SPIPE, etc. More...

int addr_size_
 Number of bytes in the address. More...


Detailed Description

Defines the base class for the "address family independent" address format.

Definition at line 30 of file Addr.h.


Constructor & Destructor Documentation

ACE_Addr::ACE_Addr int    type = -1,
int    size = -1
 

Initializes instance variables.

Definition at line 60 of file Addr.cpp.

References base_set.

00061 {
00062   this->base_set (type, size);
00063 }

ACE_Addr::~ACE_Addr void    [virtual]
 

Destructor.

Definition at line 65 of file Addr.cpp.

00066 {
00067 }


Member Function Documentation

void ACE_Addr::base_set int    type,
int    size
 

Initializes instance variables.

Definition at line 51 of file Addr.cpp.

References addr_size_, and addr_type_.

Referenced by ACE_Addr, ACE_UNIX_Addr::set, ACE_SPIPE_Addr::set, ACE_INET_Addr::set, ACE_FILE_Addr::set, ACE_DEV_Addr::set, ACE_ATM_Addr::set, ACE_UNIX_Addr::set_addr, ACE_SPIPE_Addr::set_addr, ACE_ATM_Addr::set_addr, ACE_INET_Addr::set_address, and ACE_ATM_Addr::string_to_addr.

00052 {
00053   this->addr_type_ = type;
00054   this->addr_size_ = size;
00055 }

void ACE_Addr::dump void    const
 

Dump the state of an object.

Reimplemented in ACE_ATM_Addr.

Definition at line 38 of file Addr.cpp.

References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_LIB_TEXT, ACE_TRACE, and LM_DEBUG.

00039 {
00040   ACE_TRACE ("ACE_Addr::dump");
00041 
00042   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00043   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("addr_type_ = %d"), this->addr_type_));
00044   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\naddr_size_ = %d"), this->addr_size_));
00045   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00046 }

ACE_INLINE void * ACE_Addr::get_addr void    const [virtual]
 

Return a pointer to the address.

Reimplemented in ACE_ATM_Addr.

Definition at line 9 of file Addr.i.

Referenced by ACE_SOCK_Acceptor::accept, ACE_LSOCK_Acceptor::accept, ACE_XTI_ATM_Mcast::add_leaf, ACE_TLI_Connector::complete, ACE_SOCK_Connector::complete, ACE_TLI_Connector::connect, ACE_SOCK_Connector::connect, ACE_WIN32_Asynch_Connect::connect_i, ACE_POSIX_Asynch_Connect::connect_i, ACE_TLI::get_local_addr, ACE_SOCK::get_local_addr, ACE_TLI_Stream::get_remote_addr, ACE_SOCK::get_remote_addr, ACE_TLI_Acceptor::open, ACE_SOCK_CODgram::open, open_new_endpoint, ACE_SOCK_Dgram::recv, ACE_WIN32_Asynch_Read_Dgram_Result::saddr, ACE_POSIX_Asynch_Read_Dgram_Result::saddr, ACE_WIN32_Asynch_Write_Dgram::send, ACE_SOCK_Dgram_Bcast::send, ACE_SOCK_Dgram::send, ACE_SOCK_Connector::shared_connect_start, ACE_SOCK_Dgram::shared_open, and ACE_SOCK_Acceptor::shared_open.

00010 {
00011   return 0;
00012 }

ACE_INLINE int ACE_Addr::get_size void    const
 

Return the size of the address.

Definition at line 36 of file Addr.i.

References addr_size_.

Referenced by ACE_SOCK_Acceptor::accept, ACE_LSOCK_Acceptor::accept, ACE_WIN32_Asynch_Read_Dgram_Result::ACE_WIN32_Asynch_Read_Dgram_Result, ACE_XTI_ATM_Mcast::add_leaf, ACE_Sock_Connect::bind_port, ACE_TLI_Connector::complete, ACE_SOCK_Connector::complete, ACE_TLI_Connector::connect, ACE_SOCK_Connector::connect, ACE_WIN32_Asynch_Connect::connect_i, ACE_POSIX_Asynch_Connect::connect_i, ACE_TLI::get_local_addr, ACE_SOCK::get_local_addr, ACE_ATM_Stream::get_peer_name, ACE_TLI_Stream::get_remote_addr, ACE_SOCK::get_remote_addr, ACE_TLI_Acceptor::open, ACE_SOCK_CODgram::open, ACE_Asynch_Acceptor::open, open_new_endpoint, ACE_DEV_Addr::operator=, ACE_INET_Addr::operator==, ACE_SOCK_Dgram::recv, ACE_WIN32_Asynch_Read_Dgram_Result::remote_address, ACE_POSIX_Asynch_Read_Dgram_Result::remote_address, ACE_WIN32_Asynch_Write_Dgram::send, ACE_SOCK_Dgram_Bcast::send, ACE_SOCK_Dgram::send, ACE_UNIX_Addr::set, ACE_SPIPE_Addr::set, ACE_INET_Addr::set, ACE_FILE_Addr::set, ACE_DEV_Addr::set, ACE_ATM_Addr::set, ACE_SOCK_Connector::shared_connect_start, ACE_SOCK_Dgram::shared_open, and ACE_SOCK_Acceptor::shared_open.

00037 {
00038   return this->addr_size_;
00039 }

ACE_INLINE int ACE_Addr::get_type void    const
 

Get the type of the address.

Definition at line 52 of file Addr.i.

References addr_type_.

Referenced by ACE_SOCK_Connector::connect, ACE_WIN32_Asynch_Connect::connect_i, ACE_POSIX_Asynch_Connect::connect_i, ACE_INET_Addr::get_addr_size, ACE_INET_Addr::get_host_addr, ACE_INET_Addr::get_host_name_i, ACE_INET_Addr::get_ip_address, ACE_INET_Addr::get_port_number, ACE_INET_Addr::hash, ACE_INET_Addr::ip_addr_pointer, ACE_INET_Addr::ip_addr_size, ACE_SOCK_Dgram_Mcast::open, ACE_SOCK_Dgram::open, ACE_SOCK_Acceptor::open, ACE_Asynch_Acceptor::open, ACE_SOCK_Dgram_Mcast::open_i, ACE_INET_Addr::operator==, ACE_WIN32_Asynch_Read_Dgram_Result::remote_address, ACE_POSIX_Asynch_Read_Dgram_Result::remote_address, ACE_INET_Addr::reset, ACE_UNIX_Addr::set, ACE_SPIPE_Addr::set, ACE_INET_Addr::set, ACE_FILE_Addr::set, ACE_DEV_Addr::set, ACE_ATM_Addr::set, ACE_INET_Addr::set_address, ACE_SOCK_Dgram_Mcast::set_option, and ACE_INET_Addr::set_port_number.

00053 {
00054   return this->addr_type_;
00055 }

ACE_INLINE unsigned long ACE_Addr::hash void    const [virtual]
 

Returns a hash value. This should be overwritten by a subclass that can produce a better hash value.

Reimplemented in ACE_INET_Addr.

Definition at line 66 of file Addr.i.

00067 {
00068   return 0;
00069 }

ACE_INLINE int ACE_Addr::operator!= const ACE_Addr &    sap const
 

Check for address inequality.

Definition at line 27 of file Addr.i.

References addr_size_, and addr_type_.

00028 {
00029   return (sap.addr_type_ != this->addr_type_ ||
00030           sap.addr_size_ != this->addr_size_   );
00031 }

ACE_INLINE int ACE_Addr::operator== const ACE_Addr &    sap const
 

Check for address equality.

Definition at line 20 of file Addr.i.

References addr_size_, and addr_type_.

00021 {
00022   return (sap.addr_type_ == this->addr_type_ &&
00023           sap.addr_size_ == this->addr_size_   );
00024 }

ACE_INLINE void ACE_Addr::set_addr void *   ,
int    len
[virtual]
 

Set a pointer to the address.

Reimplemented in ACE_ATM_Addr.

Definition at line 15 of file Addr.i.

Referenced by ACE_TLI_Acceptor::accept, ACE_WIN32_Asynch_Read_Dgram_Result::remote_address, and ACE_POSIX_Asynch_Read_Dgram_Result::remote_address.

00016 {
00017 }

ACE_INLINE void ACE_Addr::set_size int    size
 

Sets the size of the address.

Definition at line 44 of file Addr.i.

References addr_size_.

Referenced by ACE_SPIPE_Acceptor::accept, ACE_SOCK_Acceptor::accept, ACE_LSOCK_Acceptor::accept, ACE_WIN32_Asynch_Read_Dgram_Result::complete, ACE_POSIX_Asynch_Read_Dgram_Result::complete, ACE_SOCK::get_local_addr, ACE_SOCK::get_remote_addr, ACE_SOCK_Dgram::recv, and ACE_INET_Addr::set_address.

00045 {
00046   this->addr_size_ = size;
00047 }

ACE_INLINE void ACE_Addr::set_type int    type
 

Set the type of the address.

Definition at line 60 of file Addr.i.

References addr_type_.

Referenced by ACE_SOCK_Acceptor::accept, ACE_SOCK::get_local_addr, ACE_SOCK::get_remote_addr, and ACE_INET_Addr::set.

00061 {
00062   this->addr_type_ = type;
00063 }


Member Data Documentation

ACE_Addr::ACE_ALLOC_HOOK_DECLARE
 

Declare the dynamic allocation hooks.

Reimplemented in ACE_ATM_Addr.

Definition at line 92 of file Addr.h.

int ACE_Addr::addr_size_ [protected]
 

Number of bytes in the address.

Definition at line 99 of file Addr.h.

Referenced by base_set, get_size, operator!=, operator==, and set_size.

int ACE_Addr::addr_type_ [protected]
 

e.g., AF_UNIX, AF_INET, AF_SPIPE, etc.

Definition at line 96 of file Addr.h.

Referenced by base_set, get_type, operator!=, operator==, and set_type.

const ACE_Addr ACE_Addr::sap_any [static]
 

Wild-card address.

Referenced by ACE_TLI_Connector::connect, ACE_FILE_Connector::connect, ACE_WIN32_Asynch_Connect::connect_i, ACE_POSIX_Asynch_Connect::connect_i, ACE_TLI_Acceptor::open, ACE_SOCK_Dgram::open, ACE_SOCK_CODgram::open, ACE_SOCK_Acceptor::open, ACE_Pipe::open, ACE_SOCK_Connector::shared_connect_start, ACE_SOCK_Dgram::shared_open, and ACE_SOCK_Acceptor::shared_open.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:44:43 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002