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

Sink.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002 
00003    Copyright (c) 2000 Tyrell Corporation. All rights reserved.
00004 
00005    Tyrell DarkIce
00006 
00007    File     : Sink.h
00008    Version  : $Revision: 1.4 $
00009    Author   : $Author: darkeye $
00010    Location : $Source: /cvsroot/darkice/darkice/src/Sink.h,v $
00011    
00012    Copyright notice:
00013 
00014     This program is free software; you can redistribute it and/or
00015     modify it under the terms of the GNU General Public License  
00016     as published by the Free Software Foundation; either version 2
00017     of the License, or (at your option) any later version.
00018    
00019     This program is distributed in the hope that it will be useful,
00020     but WITHOUT ANY WARRANTY; without even the implied warranty of 
00021     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
00022     GNU General Public License for more details.
00023    
00024     You should have received a copy of the GNU General Public License
00025     along with this program; if not, write to the Free Software
00026     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00027 
00028 ------------------------------------------------------------------------------*/
00029 #ifndef SINK_H
00030 #define SINK_H
00031 
00032 #ifndef __cplusplus
00033 #error This is a C++ include file
00034 #endif
00035 
00036 
00037 /* ============================================================ include files */
00038 
00039 #include "Referable.h"
00040 #include "Exception.h"
00041 
00042 
00043 /* ================================================================ constants */
00044 
00045 
00046 /* =================================================================== macros */
00047 
00048 
00049 /* =============================================================== data types */
00050 
00057 class Sink : public virtual Referable
00058 {
00059     private:
00060 
00061 
00062     protected:
00063 
00067         inline
00068         Sink ( void )                                   throw ()
00069         {
00070         }
00071 
00077         inline
00078         Sink (      const Sink &    sink )              throw ()
00079         {
00080         }
00081 
00089         inline virtual Sink &
00090         operator= ( const Sink &    sink )              throw ( Exception )
00091         {
00092             return *this;
00093         }
00094 
00095 
00096     public:
00097 
00103         inline virtual
00104         ~Sink ( void )                                  throw ( Exception )
00105         {
00106         }
00107 
00114         virtual bool
00115         open ( void )                               throw ( Exception )    = 0;
00116 
00122         virtual bool
00123         isOpen ( void ) const                       throw ()    = 0;
00124 
00134         virtual bool
00135         canWrite (              unsigned int    sec,
00136                                 unsigned int    usec )  throw ( Exception ) = 0;
00137 
00146         virtual unsigned int
00147         write (                 const void    * buf,
00148                                 unsigned int    len )   throw ( Exception ) = 0;
00149 
00156         virtual void
00157         flush ( void )                                  throw ( Exception ) = 0;
00158 
00164         virtual void
00165         close ( void )                                  throw ( Exception ) = 0;
00166 };
00167 
00168 
00169 /* ================================================= external data structures */
00170 
00171 
00172 /* ====================================================== function prototypes */
00173 
00174 
00175 
00176 #endif  /* SINK_H */
00177 
00178 
00179 /*------------------------------------------------------------------------------
00180  
00181   $Source: /cvsroot/darkice/darkice/src/Sink.h,v $
00182 
00183   $Log: Sink.h,v $
00184   Revision 1.4  2000/11/12 14:54:25  darkeye
00185   added Exception to throws clause for the destructor and assignment operator
00186 
00187   Revision 1.3  2000/11/12 13:31:16  darkeye
00188   minor change in documentation
00189 
00190   Revision 1.2  2000/11/11 12:33:13  darkeye
00191   added kdoc-style documentation
00192 
00193   Revision 1.1.1.1  2000/11/05 10:05:54  darkeye
00194   initial version
00195 
00196   
00197 ------------------------------------------------------------------------------*/
00198 

Generated on Fri May 19 15:36:48 2006 for DarkIce by  doxygen 1.4.4