OW_NAMESPACE::PosixUnnamedPipe Class Reference

#include <OW_PosixUnnamedPipe.hpp>

Inheritance diagram for OW_NAMESPACE::PosixUnnamedPipe:

Inheritance graph
[legend]
Collaboration diagram for OW_NAMESPACE::PosixUnnamedPipe:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PosixUnnamedPipe (EOpen doOpen=E_OPEN)
virtual ~PosixUnnamedPipe ()
virtual int write (const void *data, int dataLen, bool errorAsException=false)
 Write a specified number of bytes to the device that is exposing the IOIFC interface.
virtual int read (void *buffer, int bufferLen, bool errorAsException=false)
 Read a specified number of bytes from the device that is exposing the IOIFC interface.
int getInputHandle ()
int getOutputHandle ()
virtual void open ()
 Open the pipe.
virtual int close ()
 Close the pipe.
virtual bool isOpen () const
 Is the pipe open or closed?
int closeInputHandle ()
int closeOutputHandle ()
virtual void setOutputBlocking (bool outputIsBlocking=true)
virtual void setBlocking (EBlockingMode outputIsBlocking=E_BLOCKING)
virtual Select_t getSelectObj () const
virtual Select_t getWriteSelectObj () const
 Get a write select object.

Private Attributes

int m_fds [2]
EBlockingMode m_blocking

Detailed Description

Definition at line 47 of file OW_PosixUnnamedPipe.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::PosixUnnamedPipe::PosixUnnamedPipe EOpen  doOpen = E_OPEN  ) 
 

Definition at line 211 of file OW_PosixUnnamedPipe.cpp.

OW_NAMESPACE::PosixUnnamedPipe::~PosixUnnamedPipe  )  [virtual]
 

Definition at line 229 of file OW_PosixUnnamedPipe.cpp.

References close().


Member Function Documentation

int OW_NAMESPACE::PosixUnnamedPipe::close  )  [virtual]
 

Close the pipe.

Returns:
-1 on error, 0 on success.

Implements OW_NAMESPACE::UnnamedPipe.

Definition at line 389 of file OW_PosixUnnamedPipe.cpp.

References _CLOSE, and m_fds.

Referenced by open(), and ~PosixUnnamedPipe().

int OW_NAMESPACE::PosixUnnamedPipe::closeInputHandle  ) 
 

Definition at line 427 of file OW_PosixUnnamedPipe.cpp.

References _CLOSE, and m_fds.

int OW_NAMESPACE::PosixUnnamedPipe::closeOutputHandle  ) 
 

Definition at line 446 of file OW_PosixUnnamedPipe.cpp.

References _CLOSE, and m_fds.

int OW_NAMESPACE::PosixUnnamedPipe::getInputHandle  )  [inline]
 

Definition at line 54 of file OW_PosixUnnamedPipe.hpp.

int OW_NAMESPACE::PosixUnnamedPipe::getOutputHandle  )  [inline]
 

Definition at line 55 of file OW_PosixUnnamedPipe.hpp.

Select_t OW_NAMESPACE::PosixUnnamedPipe::getSelectObj  )  const [virtual]
 

Implements OW_NAMESPACE::SelectableIFC.

Definition at line 575 of file OW_PosixUnnamedPipe.cpp.

References m_fds.

Select_t OW_NAMESPACE::PosixUnnamedPipe::getWriteSelectObj  )  const [virtual]
 

Get a write select object.

Implements OW_NAMESPACE::UnnamedPipe.

Definition at line 592 of file OW_PosixUnnamedPipe.cpp.

References m_fds.

bool OW_NAMESPACE::PosixUnnamedPipe::isOpen  )  const [virtual]
 

Is the pipe open or closed?

Implements OW_NAMESPACE::UnnamedPipe.

Definition at line 420 of file OW_PosixUnnamedPipe.cpp.

References m_fds.

void OW_NAMESPACE::PosixUnnamedPipe::open  )  [virtual]
 

Open the pipe.

Implements OW_NAMESPACE::UnnamedPipe.

Definition at line 321 of file OW_PosixUnnamedPipe.cpp.

References close(), m_fds, and OW_THROW.

int OW_NAMESPACE::PosixUnnamedPipe::read void *  buffer,
int  bufferLen,
bool  errorAsException = false
[virtual]
 

Read a specified number of bytes from the device that is exposing the IOIFC interface.

Parameters:
dataIn A pointer to a location in memory to put the bytes that have been read.
dataInLen The number of bytes being requested from the device.
errorAsException If true and an error occurs durring the read operation, then throw an exception.
Exceptions:
An exception will be thrown upon an error condition if errorAsException is true.
Returns:
The number of bytes actually read from the device, or -1 on error.

Implements OW_NAMESPACE::IOIFC.

Definition at line 520 of file OW_PosixUnnamedPipe.cpp.

References _READ, OW_NAMESPACE::SocketFlags::E_WAIT_FOR_INPUT, m_blocking, m_fds, OW_NAMESPACE::UnnamedPipe::m_readTimeout, OW_THROW_ERRNO_MSG, and OW_NAMESPACE::SocketUtils::waitForIO().

void OW_NAMESPACE::PosixUnnamedPipe::setBlocking EBlockingMode  outputIsBlocking = E_BLOCKING  )  [virtual]
 

Definition at line 235 of file OW_PosixUnnamedPipe.cpp.

References i, m_blocking, m_fds, OW_ASSERT, and OW_THROW_ERRNO_MSG.

void OW_NAMESPACE::PosixUnnamedPipe::setOutputBlocking bool  outputIsBlocking = true  )  [virtual]
 

Implements OW_NAMESPACE::UnnamedPipe.

Definition at line 281 of file OW_PosixUnnamedPipe.cpp.

References OW_NAMESPACE::UnnamedPipe::E_NONBLOCKING, m_blocking, m_fds, OW_ASSERT, and OW_THROW_ERRNO_MSG.

int OW_NAMESPACE::PosixUnnamedPipe::write const void *  data,
int  dataLen,
bool  errorAsException = false
[virtual]
 

Write a specified number of bytes to the device that is exposing the IOIFC interface.

Parameters:
dataOut A pointer to a location in memory that contains the bytes that will be written to the device.
dataOutLen The length of the data pointed to by the dataOut param.
errorAsException If true and an error occurs durring the write operation, then throw an exception.
Exceptions:
An exception will be thrown upon an error condition if errorAsException is true.
Returns:
The number of bytes actually written to the device. or -1 on error

Implements OW_NAMESPACE::IOIFC.

Definition at line 465 of file OW_PosixUnnamedPipe.cpp.

References _WRITE, OW_NAMESPACE::SocketFlags::E_WAIT_FOR_OUTPUT, m_blocking, m_fds, OW_NAMESPACE::UnnamedPipe::m_writeTimeout, OW_THROW_ERRNO_MSG, and OW_NAMESPACE::SocketUtils::waitForIO().


Member Data Documentation

EBlockingMode OW_NAMESPACE::PosixUnnamedPipe::m_blocking [private]
 

Definition at line 71 of file OW_PosixUnnamedPipe.hpp.

Referenced by read(), setBlocking(), setOutputBlocking(), and write().

int OW_NAMESPACE::PosixUnnamedPipe::m_fds[2] [private]
 

Definition at line 66 of file OW_PosixUnnamedPipe.hpp.

Referenced by close(), closeInputHandle(), closeOutputHandle(), getSelectObj(), getWriteSelectObj(), isOpen(), open(), read(), setBlocking(), setOutputBlocking(), and write().


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:14:10 2006 for openwbem by  doxygen 1.4.6