libdodo: dodo::io::pipe Class Reference

dodo::io::pipe Class Reference

provides interface for PIPE I/O operations More...

#include <ioPipe.h>

Inheritance diagram for dodo::io::pipe:
Collaboration diagram for dodo::io::pipe:

List of all members.

Public Types

enum  operationEnum { OPERATION_OPEN = 128, OPERATION_CLOSE }
 

defines type of operation for xexec

More...

Public Member Functions

 pipe (const pipe &)
 copy constructor
 pipe (bool open=false, short protection=channel::PROTECTION_PROCESS)
 constructor
virtual ~pipe ()
 destructor
void clone (const pipe &pipe)
 clone pipe object
network::exchange::__peer__ peer ()
virtual void open ()
 open pipe
virtual void close ()
 close pipe
virtual void flush () const
 flush output
virtual bool isBlocked ()
virtual void block (bool flag)
 blocks/unblocks stream

Protected Member Functions

virtual int inDescriptor () const
virtual int outDescriptor () const
virtual unsigned long _read (char *const data) const
virtual unsigned long _readString (char *const data) const
 read null- or newline- terminated string
virtual unsigned long _write (const char *const data) const
virtual unsigned long _writeString (const char *const data) const
 write null- terminated string

Protected Attributes

__file__ * in
 input stream descriptor
__file__ * out
 output stream descriptor

Detailed Description

provides interface for PIPE I/O operations

Note:
writeString* put extra newline to the end of the string, so no need to add it manually

Definition at line 48 of file ioPipe.h.


Member Enumeration Documentation

defines type of operation for xexec

Enumerator:
OPERATION_OPEN 
OPERATION_CLOSE 

Reimplemented from dodo::io::channel.

Definition at line 54 of file ioPipe.h.

00054                                {
00055                 OPERATION_OPEN = 128,
00056                 OPERATION_CLOSE
00057             };


Constructor & Destructor Documentation

dodo::io::pipe::pipe ( const pipe  ) 

copy constructor

Note:
xexec object is not copied
dodo::io::pipe::pipe ( bool  open = false,
short  protection = channel::PROTECTION_PROCESS 
)

constructor

Parameters:
open defines whether pipe should be opened in constructor
protection defines type of IO protection,
See also:
io::channel::protectionEnum
virtual dodo::io::pipe::~pipe (  )  [virtual]

destructor


Member Function Documentation

virtual unsigned long dodo::io::pipe::_read ( char *const   data  )  const [protected, virtual]
Returns:
amount in bytes of successfully read data
Parameters:
data defines buffer that will be filled
Note:
not more then bs(including null)

Implements dodo::io::channel.

virtual unsigned long dodo::io::pipe::_readString ( char *const   data  )  const [protected, virtual]

read null- or newline- terminated string

Returns:
amount in bytes of successfully read data
Parameters:
data defines buffer that will be filled
Note:
not more then bs(including null)

Implements dodo::io::channel.

virtual unsigned long dodo::io::pipe::_write ( const char *const   data  )  const [protected, virtual]
Returns:
amount in bytes of successfully written data
Parameters:
data defines data that will be written

Implements dodo::io::channel.

virtual unsigned long dodo::io::pipe::_writeString ( const char *const   data  )  const [protected, virtual]

write null- terminated string

Returns:
amount in bytes of successfully written data
Parameters:
data defines data that will be written
Note:
puts extra newline to the end of the string

Implements dodo::io::channel.

Reimplemented in dodo::io::stdio.

virtual void dodo::io::pipe::block ( bool  flag  )  [virtual]

blocks/unblocks stream

Parameters:
flag indicates whether to block or unblock stream
void dodo::io::pipe::clone ( const pipe pipe  ) 

clone pipe object

Parameters:
pipe defines object to clone
Note:
xexec object is not copied
virtual void dodo::io::pipe::close (  )  [virtual]

close pipe

virtual void dodo::io::pipe::flush (  )  const [virtual]

flush output

Implements dodo::io::channel.

virtual int dodo::io::pipe::inDescriptor (  )  const [protected, virtual]
Returns:
descriptor of the input stream

Implements dodo::io::event::descriptor.

virtual bool dodo::io::pipe::isBlocked (  )  [virtual]
Returns:
true if stream is blocked
virtual void dodo::io::pipe::open (  )  [virtual]

open pipe

virtual int dodo::io::pipe::outDescriptor (  )  const [protected, virtual]
Returns:
descriptor of the output stream

Implements dodo::io::event::descriptor.

network::exchange::__peer__ dodo::io::pipe::peer (  ) 
Returns:
info about source of inputting
Note:
it can be used to get info about peer if you ar using inetd

Member Data Documentation

__file__* dodo::io::pipe::in [protected]

input stream descriptor

Definition at line 158 of file ioPipe.h.

__file__* dodo::io::pipe::out [protected]

output stream descriptor

Definition at line 159 of file ioPipe.h.


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

Generated on Sun Nov 8 03:44:51 2009 for libdodo by  doxygen 1.6.1