GNet::AcceptPair Class Reference

A class which behaves like std::pair<std::auto_ptr<StreamSocket>,Address>. More...

#include <gsocket.h>

List of all members.

Public Types

typedef std::auto_ptr
< StreamSocket
first_type
typedef Address second_type

Public Member Functions

 AcceptPair (StreamSocket *new_p, Address a)
 Constructor.
 AcceptPair (const AcceptPair &other)
 Copy constructor.
AcceptPairoperator= (const AcceptPair &rhs)
 Assignment operator.

Public Attributes

first_type first
second_type second


Detailed Description

A class which behaves like std::pair<std::auto_ptr<StreamSocket>,Address>.

(The standard pair<> template cannot be used because gcc's auto_ptr<> has a non-const copy constructor and assignment operator -- the pair<> op=() fails to compile because the rhs of the 'first' assignment is const, not matching any op=() in auto_ptr<>. Note the use of const_cast<>() in the implementation.)

Definition at line 249 of file gsocket.h.


Member Typedef Documentation

Definition at line 252 of file gsocket.h.

Definition at line 253 of file gsocket.h.


Constructor & Destructor Documentation

GNet::AcceptPair::AcceptPair ( StreamSocket new_p,
Address  a 
) [inline]

Constructor.

Definition at line 362 of file gsocket.h.

GNet::AcceptPair::AcceptPair ( const AcceptPair other  )  [inline]

Copy constructor.

Definition at line 369 of file gsocket.h.


Member Function Documentation

GNet::AcceptPair & GNet::AcceptPair::operator= ( const AcceptPair rhs  )  [inline]

Assignment operator.

< (safe for self-assignment)

Definition at line 376 of file gsocket.h.

References first, and second.


Member Data Documentation

Definition at line 255 of file gsocket.h.

Referenced by GNet::StreamSocket::accept(), and operator=().

Definition at line 256 of file gsocket.h.

Referenced by GNet::StreamSocket::accept(), and operator=().


The documentation for this class was generated from the following file:

Generated on Fri Apr 18 15:56:13 2008 for E-MailRelay by  doxygen 1.5.5