rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWSockAddrFactoryBase Class Reference
[Essential Networking Module]

Abstract class that builds socket addresses. More...

#include <rw/network/RWSockAddrFactoryBase.h>

Inheritance diagram for RWSockAddrFactoryBase:
RWInet6AddrFactory RWInetAddrFactory RWSockAddrFactory

List of all members.

Public Member Functions

virtual ~RWSockAddrFactoryBase ()
virtual RWSockAddrBaseoperator() (struct sockaddr *addr, RWSockLenType addrLen) const =0
virtual RWSockAddrBaseoperator() (struct sockaddr *addr, RWSockLenType addrLen, int type) const =0
virtual RWSockAddrBaseoperator() (const RWCString &str) const =0

Detailed Description

RWSockAddrFactoryBase is an abstract class that builds socket addresses. It represents the concept of an object that can build socket addresses from either an input string or from the C API representation.


Constructor & Destructor Documentation

virtual RWSockAddrFactoryBase::~RWSockAddrFactoryBase (  )  [virtual]

Destroys self.


Member Function Documentation

virtual RWSockAddrBase* RWSockAddrFactoryBase::operator() ( const RWCString str  )  const [pure virtual]

Returns a pointer to an RWSockAddrBase derived object constructed from from the provided RWCString.

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

Implemented in RWInet6AddrFactory, RWInetAddrFactory, and RWSockAddrFactory.

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

Returns a pointer to an RWSockAddrBase derived object constructed from the provided sockaddr.

The addr parameter is expected to point to a concrete socket address type appropriate for this factory. For instance, a factory for creating RWInetAddr instances would expect addr to be a pointer to sockaddr_in.

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 to be created. This would normally be one of SOCK_STREAM or SOCK_DGRAM.

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

Implemented in RWInet6AddrFactory, RWInetAddrFactory, and RWSockAddrFactory.

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

Returns a pointer to an RWSockAddrBase derived object constructed from the provided sockaddr.

The addr parameter is expected to point to a concrete socket address type appropriate for this factory. For instance, a factory for creating RWInetAddr instances would expect addr to be a pointer to sockaddr_in.

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

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

Implemented in RWInet6AddrFactory, RWInetAddrFactory, and RWSockAddrFactory.

 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.