Main Page | Modules | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

FileCommPortal Class Reference
[Communications Facilities]

#include <FileCommPortal.hh>

Inherits CommPortal.

Inherited by NetCommPortal, and SerialCommPortal.

List of all members.


Detailed Description

Helper class for messagers which use file descriptors.

This helper superclass provides common code for messagers with file descriptors.


Public Member Functions

 FileCommPortal ()
virtual ~FileCommPortal ()
bool init (CommManager *mgr, int fd)
int getDescriptor () const


Constructor & Destructor Documentation

FileCommPortal::FileCommPortal  )  [inline]
 

Constructor

virtual FileCommPortal::~FileCommPortal  )  [virtual]
 

Clean it up. Removes the file descriptor from the monitor. Note, this does not close the file descriptor, that should be handled by the super class.


Member Function Documentation

int FileCommPortal::getDescriptor  )  const [inline]
 

Return the messager file descriptor

Returns:
-1 if no file descriptor, otherwise the integer file descriptor

bool FileCommPortal::init CommManager mgr,
int  fd
 

Initialize the file messager. Connect it to a CommManager with a file descriptor. Gets the file monitor instance and registers the file descriptor with it.

Parameters:
[in] mgr The controller communications manager.
[in] fd The file descriptor to setup
Returns:
true for success, false for fatal failure

Reimplemented in NetCommPortal.


RHexLib Reference Documentation