Dashel::StdinStream Class Reference

Standard input stream. More...

Inheritance diagram for Dashel::StdinStream:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void flush ()
 Cannot flush stdin.
virtual void notifyEvent (Hub *srv, EvType &t)
 Callback when an event is notified, allowing the stream to rearm it.
virtual void read (void *data, size_t size)
 Reads data from the stream.
 StdinStream (const std::string &params)
 Create the stream and associates a file descriptor.
virtual void write (const void *data, const size_t size)
 Cannot write to stdin.
 ~StdinStream ()
 Destructor.

Protected Attributes

HANDLE hev
 The real data event handle.
HANDLE hf
 The file handle.

Detailed Description

Standard input stream.

Due to the really weird way Windows manages its consoles, normal overlapped file I/O is utterly useless here.

Definition at line 414 of file dashel-win32.cpp.


Constructor & Destructor Documentation

Dashel::StdinStream::StdinStream ( const std::string &  params  )  [inline]

Create the stream and associates a file descriptor.

Definition at line 426 of file dashel-win32.cpp.

Dashel::StdinStream::~StdinStream (  )  [inline]

Destructor.

Definition at line 445 of file dashel-win32.cpp.


Member Function Documentation

virtual void Dashel::StdinStream::flush (  )  [inline, virtual]

Cannot flush stdin.

Implements Dashel::Stream.

Definition at line 479 of file dashel-win32.cpp.

virtual void Dashel::StdinStream::notifyEvent ( Hub srv,
EvType t 
) [inline, virtual]

Callback when an event is notified, allowing the stream to rearm it.

Parameters:
t Type of event.

Reimplemented from Dashel::WaitableStream.

Definition at line 453 of file dashel-win32.cpp.

virtual void Dashel::StdinStream::read ( void *  data,
size_t  size 
) [inline, virtual]

Reads data from the stream.

Reads all requested data from the stream, blocking until all the data has been read, or some error occurs. Errors are signaled by throwing a DashelException exception, which may be caused either by device errors or reaching the end of file.

Parameters:
data Pointer to the memory where the read data should be stored.
size Amount of data to read in bytes.

Implements Dashel::Stream.

Definition at line 484 of file dashel-win32.cpp.

virtual void Dashel::StdinStream::write ( const void *  data,
const size_t  size 
) [inline, virtual]

Cannot write to stdin.

Implements Dashel::Stream.

Definition at line 473 of file dashel-win32.cpp.


Member Data Documentation

HANDLE Dashel::StdinStream::hev [protected]

The real data event handle.

Definition at line 421 of file dashel-win32.cpp.

HANDLE Dashel::StdinStream::hf [protected]

The file handle.

Definition at line 418 of file dashel-win32.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


asebaros
Author(s): $author
autogenerated on Mon Sep 5 08:42:16 2011