Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

FileCast Class Reference

#include <FileCast.h>

Inheritance diagram for FileCast:

Inheritance graph
[legend]
Collaboration diagram for FileCast:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class representing output to a local file.

Author:
Author
darkeye
Version:
Revision
1.1

Definition at line 60 of file FileCast.h.

Public Member Functions

 FileCast (FileSink *targetFile) throw ( Exception )
 Constructor.
 FileCast (const FileCast &cs) throw ( Exception )
 Copy constructor.
virtual ~FileCast (void) throw ( Exception )
 Destructor.
virtual FileCastoperator= (const FileCast &cs) throw ( Exception )
 Assignment operator.
virtual bool open (void) throw ( Exception )
 Open the FileCast.
virtual bool isOpen (void) const throw ()
 Check if the FileCast is open.
virtual bool canWrite (unsigned int sec, unsigned int usec) throw ( Exception )
 Check if the FileCast is ready to accept data.
virtual unsigned int write (const void *buf, unsigned int len) throw ( Exception )
 Write data to the FileCast.
virtual void flush (void) throw ( Exception )
 Flush all data that was written to the FileCast to the server.
virtual void close (void) throw ( Exception )
 Close the FileCast.

Protected Member Functions

 FileCast (void) throw ( Exception )
 Default constructor.
virtual bool sendLogin (void) throw ( Exception )
 Log in to the server using the socket avialable.


Constructor & Destructor Documentation

FileCast::FileCast void   )  throw ( Exception ) [inline, protected]
 

Default constructor.

Always throws an Exception.

Exceptions:
Exception 

Definition at line 104 of file FileCast.h.

FileCast::FileCast FileSink targetFile  )  throw ( Exception ) [inline]
 

Constructor.

Parameters:
targetFile the file to send all the data to.
Exceptions:
Exception 

Definition at line 132 of file FileCast.h.

FileCast::FileCast const FileCast cs  )  throw ( Exception ) [inline]
 

Copy constructor.

Parameters:
cs the FileCast to copy.

Definition at line 145 of file FileCast.h.

virtual FileCast::~FileCast void   )  throw ( Exception ) [inline, virtual]
 

Destructor.

Exceptions:
Exception 

Definition at line 156 of file FileCast.h.


Member Function Documentation

virtual bool FileCast::canWrite unsigned int  sec,
unsigned int  usec
throw ( Exception ) [inline, virtual]
 

Check if the FileCast is ready to accept data.

Blocks until the specified time for data to be available.

Parameters:
sec the maximum seconds to block.
usec micro seconds to block after the full seconds.
Returns:
true if the FileCast is ready to accept data, false otherwise.
Exceptions:
Exception 

Reimplemented from CastSink.

Definition at line 209 of file FileCast.h.

References FileSink::canWrite().

virtual void FileCast::close void   )  throw ( Exception ) [inline, virtual]
 

Close the FileCast.

Exceptions:
Exception 

Reimplemented from CastSink.

Definition at line 247 of file FileCast.h.

References FileSink::close().

virtual void FileCast::flush void   )  throw ( Exception ) [inline, virtual]
 

Flush all data that was written to the FileCast to the server.

Exceptions:
Exception 

Reimplemented from CastSink.

Definition at line 236 of file FileCast.h.

References FileSink::flush().

virtual bool FileCast::isOpen void   )  const throw () [inline, virtual]
 

Check if the FileCast is open.

Returns:
true if the FileCast is open, false otherwise.

Reimplemented from CastSink.

Definition at line 193 of file FileCast.h.

References FileSink::isOpen().

Referenced by open().

bool FileCast::open void   )  throw ( Exception ) [virtual]
 

Open the FileCast.

Returns:
true if opening was successfull, false otherwise.
Exceptions:
Exception 

Reimplemented from CastSink.

Definition at line 76 of file FileCast.cpp.

References isOpen().

virtual FileCast& FileCast::operator= const FileCast cs  )  throw ( Exception ) [inline, virtual]
 

Assignment operator.

Parameters:
cs the FileCast to assign this to.
Returns:
a reference to this FileCast.
Exceptions:
Exception 

Definition at line 169 of file FileCast.h.

virtual bool FileCast::sendLogin void   )  throw ( Exception ) [inline, protected, virtual]
 

Log in to the server using the socket avialable.

No need to log in to a file.

Returns:
true if login was successful, false otherwise.
Exceptions:
Exception 

Implements CastSink.

Definition at line 117 of file FileCast.h.

virtual unsigned int FileCast::write const void *  buf,
unsigned int  len
throw ( Exception ) [inline, virtual]
 

Write data to the FileCast.

Parameters:
buf the data to write.
len number of bytes to write from buf.
Returns:
the number of bytes written (may be less than len).
Exceptions:
Exception 

Reimplemented from CastSink.

Definition at line 224 of file FileCast.h.

References FileSink::write().


The documentation for this class was generated from the following files:
Generated on Fri May 19 15:36:49 2006 for DarkIce by  doxygen 1.4.4