Archon::Utilities::Stream Namespace Reference

Definition of abstract stream end-points that are usefull for inter-thread communication. More...


Classes

struct  BasicPipe
 The BasicPipe provide functionality much like the UNIX pipe. More...
struct  StringReader
struct  FileReader
struct  FileWriter
struct  Utf8StreamReader
struct  Utf8FileReader
struct  ReadException
struct  WriteException
struct  FileOpenException
struct  ReaderBase
 Virtual base class for all readers. More...
struct  WriterBase
 Virtual base class for all writers. More...
struct  BasicRewindReader
 Create a stream reader with the ability to rewind to the beginning. More...
struct  Connector
 Stream all avalable data from the reader endpoint into the writer endpoint. More...

Typedefs

typedef BasicPipe< char > Pipe
typedef ReaderBase< char > Reader
typedef WriterBase< char > Writer
typedef ReaderBase< ucharUReader
typedef WriterBase< ucharUWriter
typedef BasicRewindReader<
char > 
RewindReader

Functions

Ref< ReadermakeStringReader (string s)
Ref< ReadermakeFileReader (string fileName) throw (FileOpenException)
 Create a reader endpoint that uses a file in the file system as the character source.
Ref< ReadermakeFileReader (int fildes)
 Create a reader endpoint that uses a previously opened file as the character source.
Ref< WritermakeFileWriter (string fileName) throw (FileOpenException)
 Create a writer endpoint that uses a file in the file system as the character target.
Ref< WritermakeFileWriter (int fildes)
 Create a writer endpoint that uses a previously opened file as the character target.
Ref< UReadermakeUtf8StreamReader (Ref< Reader > r)
Ref< UReadermakeUtf8FileReader (string fileName) throw (FileOpenException)
 Create a reader endpoint that uses a file in the file system as the character source.
Ref< UReadermakeUtf8FileReader (int fildes)
 Create a reader endpoint that uses a previously opened file as the character source.
string readIntoString (Ref< Reader >) throw (ReadException, UnexpectedException)
 Grab every available character from the passed stream and return them as a string.

Variables

Ref< ReadermakeStringReader (string)
 Create a reader endpoint that uses a string as the character source.
Ref< UReadermakeUtf8StreamReader (Ref< Reader >)
 Create a reader endpoint that decodes a stream of UTF-8 characters.


Detailed Description

Definition of abstract stream end-points that are usefull for inter-thread communication.

BasicPipe provides the well-known pipe paradigm base on the abstract end-points.


Function Documentation

Ref< Reader > Archon::Utilities::Stream::makeFileReader int  fildes  ) 
 

Create a reader endpoint that uses a previously opened file as the character source.

The passed file descriptor is closed when the last reference to the returned reader is dropped.

Definition at line 172 of file stream.C.

Ref< Reader > Archon::Utilities::Stream::makeFileReader string  fileName  )  throw (FileOpenException)
 

Create a reader endpoint that uses a file in the file system as the character source.

The file is closed when the last reference to the returned reader is dropped.

Definition at line 162 of file stream.C.

Referenced by Archon::Utilities::Image::Image(), Archon::Utilities::Image::load(), and Archon::Utilities::Options::processConfigFile().

Ref< Writer > Archon::Utilities::Stream::makeFileWriter int  fildes  ) 
 

Create a writer endpoint that uses a previously opened file as the character target.

The passed file descriptor is closed when the last reference to the returned writer is dropped.

Definition at line 190 of file stream.C.

Ref< Writer > Archon::Utilities::Stream::makeFileWriter string  fileName  )  throw (FileOpenException)
 

Create a writer endpoint that uses a file in the file system as the character target.

The file is closed when the last reference to the returned writer is dropped.

Definition at line 178 of file stream.C.

Referenced by Archon::Utilities::Image::save(), and Archon::Utilities::Options::saveConfigFile().

Ref< UReader > Archon::Utilities::Stream::makeUtf8FileReader int  fildes  ) 
 

Create a reader endpoint that uses a previously opened file as the character source.

This reader assumes that the source file contains UTF-8 encoded characters. It returns the decoded characters.

The passed file descriptor is closed when the last reference to the returned reader is dropped.

Definition at line 212 of file stream.C.

Ref< UReader > Archon::Utilities::Stream::makeUtf8FileReader string  fileName  )  throw (FileOpenException)
 

Create a reader endpoint that uses a file in the file system as the character source.

This reader assumes that the source file contains UTF-8 encoded characters. It returns the decoded characters.

The file is closed when the last reference to the returned reader is dropped.

Definition at line 201 of file stream.C.


Generated on Sun Jul 30 22:58:11 2006 for Archon by  doxygen 1.4.4