University of Sheffield   

    The Simons
    Component Library

Introduction   Class Hierarchy   Class Listing   Index of Classes   Index of Methods   Header Files  

FormatStream.h

00001 
00002 //
00003 //  SCL : Simons Component Library
00004 //
00006 //
00007 //  Filename:   FormatStream.h
00008 //  Contents:   FormatStream class
00009 //  Author:     Anthony J H Simons
00010 //  Revised:    5 December 2005
00011 
00012 // This software is distributed free in the hope that others will
00013 // find it useful.  However, it comes WITHOUT ANY WARRANTY.  No
00014 // liability can be accepted for software failure, merchantability
00015 // or fitness for a particular purpose.  You can redistribute this
00016 // software in its original form, or in a modified form, provided
00017 // that this disclaimer is retained in the file banner.
00018 
00019 #ifndef SCL_FORMAT_STREAM
00020 #define SCL_FORMAT_STREAM
00021 
00022 #include "Stream.h"             // Include the superclass type
00023 #include "FormatStreamID.h"     // Include the pointer type
00024 
00025 #include "StringID.h"           // Depend on the pointer types
00026 #include "FileStreamID.h"
00027 
00043 
00044 class FormatStream : public Stream {
00045 protected:
00046         FormatStream(const FormatStream&);
00047         virtual FileStreamID fileStream() const;
00048 public:
00049         FormatStream();
00050         virtual ~FormatStream();
00051         virtual Void openOn(StringID);
00052         virtual Void open();
00053         virtual Void close();
00054         virtual StringID name() const;
00055         virtual Boolean exists() const;
00056         virtual Boolean empty() const;
00057         virtual Boolean ready() const;
00058         virtual Boolean failed() const;
00059         virtual Boolean source() const;
00060         virtual Boolean sink() const;
00061 };
00062 
00064 
00066 
00069 inline FormatStreamID::FormatStreamID() {}
00070 
00072 inline FormatStreamID::~FormatStreamID() {}
00073 
00077 inline FormatStreamID::FormatStreamID(const Null* null) :
00078         StreamID(null) {}
00079         
00083 inline FormatStreamID::FormatStreamID(const FormatStream* stream) :
00084         StreamID(stream) {}
00085         
00089 inline FormatStreamID::FormatStreamID(const FormatStreamID& pointer) :
00090         StreamID(pointer) {}
00091         
00095 inline FormatStreamID& FormatStreamID::operator=(const FormatStream* stream) {
00096         assign(stream);
00097         return *this;
00098 }
00099 
00104 inline FormatStreamID& FormatStreamID::operator=(const FormatStreamID& pointer) {
00105         assign(pointer);
00106         return *this;
00107 }
00108 
00109 
00110 #endif
00111 

Generated on Fri May 5 17:17:15 2006 for The Simons Component Library by doxygen1.3