Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MNSocketBaseT< T > Struct Template Reference

#include <MNSocketBase.h>

Inheritance diagram for MNSocketBaseT< T >:

Inheritance graph
[legend]
Collaboration diagram for MNSocketBaseT< T >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef void(T::* callback_function )(MNSelector *select, int fd)
typedef void(T::* write_function )()

Public Member Functions

 MNSocketBaseT (T *client, callback_function fun)
 MNSocketBaseT (T *client, write_function fun2)
void callback (MNSelector *select, int fd)
void write_enabled ()
virtual int get_sockdesc () const

Public Attributes

T * _client
 report expirations to this object
callback_function _fun
 bind and call this function to report
write_function _fun2

Detailed Description

template<class T>
struct MNSocketBaseT< T >

A template for subclasses to MNSocketBase that is meant for simple redirections of the default callback function to any function with the appropriate parameter set that a class user would like, in conjunction with the unmodified MNSelector. If the user would like the MNSelector to call a member function tcp_callback of the class Test rather than the function callback, he adds a member variable, e.g. "MNSocketBaseT<Test> callmeplease;" to class Test. This variable is initialized in the constructor of the class Test, using ": callmeplease(this,&tcp_callback)". For on object test of class Test, the variable test.callmeplease is registered at the MNSelector instead of the objec test itself.


Member Typedef Documentation

template<class T>
typedef void(T::* MNSocketBaseT< T >::callback_function)(MNSelector *select, int fd)
 

template<class T>
typedef void(T::* MNSocketBaseT< T >::write_function)()
 


Constructor & Destructor Documentation

template<class T>
MNSocketBaseT< T >::MNSocketBaseT T *  client,
callback_function  fun
[inline]
 

template<class T>
MNSocketBaseT< T >::MNSocketBaseT T *  client,
write_function  fun2
[inline]
 


Member Function Documentation

template<class T>
void MNSocketBaseT< T >::callback MNSelector select,
int  fd
[inline, virtual]
 

Reimplemented from MNSocketBase.

template<class T>
virtual int MNSocketBaseT< T >::get_sockdesc  )  const [inline, virtual]
 

Implements MNSocketBase.

template<class T>
void MNSocketBaseT< T >::write_enabled  )  [inline, virtual]
 

Reimplemented from MNSocketBase.


Member Data Documentation

template<class T>
T* MNSocketBaseT< T >::_client
 

report expirations to this object

template<class T>
callback_function MNSocketBaseT< T >::_fun
 

bind and call this function to report

template<class T>
write_function MNSocketBaseT< T >::_fun2
 


The documentation for this struct was generated from the following file:
Generated on Sun Mar 6 13:36:02 2005 for Komssys by doxygen 1.3.8