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

StreamDecorator.cc

Go to the documentation of this file.
00001 /*
00002  * StreamDecorator.cc
00003  *
00004  * Smalltalk like class library for C++
00005  * Abstract stream decorator.
00006  *
00007  * Copyright (c) 2006 Milan Cermak
00008  */
00009 /*
00010  * This library is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU Lesser General Public
00012  * License as published by the Free Software Foundation; either
00013  * version 2.1 of the License, or (at your option) any later version.
00014  *
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * Lesser General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU Lesser General Public
00021  * License along with this library; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  */
00024 #include "stlib/StreamDecorator.h"
00025 
00026 namespace Core {
00027 
00028 StreamDecorator::StreamDecorator(Stream *stream)
00029 {
00030     underlying_stream = stream;
00031 }
00032 
00033 /* Accessing protocol */
00034 Stream *StreamDecorator::basicStream(void)
00035 {
00036     return underlying_stream->basicStream();
00037 }
00038 
00039 SequenceableCollection *StreamDecorator::contents(void)
00040 {
00041     return underlying_stream->contents();
00042 }
00043 
00044 void StreamDecorator::flush(void)
00045 {
00046     underlying_stream->flush();
00047 }
00048 
00049 /* Positioning protocol */
00050 long StreamDecorator::position(void)
00051 {
00052     return underlying_stream->position();
00053 }
00054 
00055 void StreamDecorator::position(long pos)
00056 {
00057     underlying_stream->position(pos);
00058 }
00059 
00060 void StreamDecorator::reset(void)
00061 {
00062     underlying_stream->reset();
00063 }
00064 
00065 void StreamDecorator::skip(long length)
00066 {
00067     underlying_stream->skip(length);
00068 }
00069 
00070 /* Status protocol */
00071 void StreamDecorator::close(void)
00072 {
00073     underlying_stream->close();
00074 }
00075 
00076 void StreamDecorator::commit(void)
00077 {
00078     underlying_stream->commit();
00079 }
00080 
00081 /* Testing protocol */
00082 bool StreamDecorator::atEnd(void)
00083 {
00084     return underlying_stream->atEnd();
00085 }
00086 
00087 bool StreamDecorator::basicAtEnd(void)
00088 {
00089     return underlying_stream->basicAtEnd();
00090 }
00091 
00092 bool StreamDecorator::isEmpty(void)
00093 {
00094     return underlying_stream->isEmpty();
00095 }
00096 
00097 bool StreamDecorator::notEmpty(void)
00098 {
00099     return underlying_stream->notEmpty();
00100 }
00101 
00102 bool StreamDecorator::isExternalStream(void)
00103 {
00104     return underlying_stream->isExternalStream();
00105 }
00106 
00107 bool StreamDecorator::isReadable(void)
00108 {
00109     return underlying_stream->isReadable();
00110 }
00111 
00112 bool StreamDecorator::isWritable(void)
00113 {
00114     return underlying_stream->isWritable();
00115 }
00116 
00117 }; /* namespace Core */

Generated on Mon Nov 27 09:47:55 2006 for Smalltalk like C++ Class Library by  doxygen 1.4.2