rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWInetAddrFactory Class Reference
[Essential Networking Module]

Used by RWSockAddrFactory to create instances of RWInetAddr. More...

#include <rw/network/RWInetAddrFactory.h>

Inheritance diagram for RWInetAddrFactory:
RWSockAddrFactoryBase

List of all members.

Public Member Functions

 RWInetAddrFactory ()
virtual ~RWInetAddrFactory ()
virtual RWSockAddrBaseoperator() (struct sockaddr *addr, RWSockLenType addrLen) const
virtual RWSockAddrBaseoperator() (struct sockaddr *addr, RWSockLenType addrLen, int type) const
virtual RWSockAddrBaseoperator() (const RWCString &) const

Detailed Description

RWInetAddrFactory is used by RWSockAddrFactory to create instances of RWInetAddr. It is not used directly by clients of the Networking classes. Only a single instance of RWInetAddrFactory exists, and it is created at the time the RWSockAddrFactory is constructed.


Constructor & Destructor Documentation

RWInetAddrFactory::RWInetAddrFactory (  ) 

If an instance has not yet been created, constructs an instance of this class and registers it with RWSockAddrFactory.

virtual RWInetAddrFactory::~RWInetAddrFactory (  )  [virtual]

Virtual destructor.


Member Function Documentation

virtual RWSockAddrBase* RWInetAddrFactory::operator() ( const RWCString  )  const [virtual]

Returns a pointer to an RWInetAddr instance constructed from from the provided RWCString.

The str parameter should be in the format described by the RWInetAddr::id() method and should contain only 7-bit US-ASCII data.

The newly created RWInetAddr is allocated on the heap. The caller is responsible for deleting it. Often, this is managed by wrapping the object using an RWSockAddr.

Implements RWSockAddrFactoryBase.

virtual RWSockAddrBase* RWInetAddrFactory::operator() ( struct sockaddr *  addr,
RWSockLenType  addrLen,
int  type 
) const [virtual]

Returns a pointer to an RWInetAddr instance constructed from the provided sockaddr structure and the given socket type.

The addr parameter is expected to point to an object that is compatible with sockaddr_in. The socket address family of addr is expected to be AF_INET.

The addrLen parameter is expected to describe the size, in bytes, of the object pointed to by addr.

The type parameter describes the type of socket address. This would normally be one of SOCK_STREAM or SOCK_DGRAM.

The newly created RWInetAddr is allocated on the heap. The caller is responsible for deleting it. Often, this is managed by wrapping the object using an RWSockAddr.

Implements RWSockAddrFactoryBase.

virtual RWSockAddrBase* RWInetAddrFactory::operator() ( struct sockaddr *  addr,
RWSockLenType  addrLen 
) const [virtual]

Returns a pointer to an RWInetAddr instance constructed from the provided sockaddr structure and the given socket type.

The addr parameter is expected to point to an object that is compatible with sockaddr_in. The socket address family of addr is expected to be AF_INET.

The addrLen parameter is expected to describe the size, in bytes, of the object pointed to by addr.

The newly created RWInetAddr is allocated on the heap. The caller is responsible for deleting it. Often, this is managed by wrapping the object using an RWSockAddr.

Implements RWSockAddrFactoryBase.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.