/**************************************************************************** ** $Id: qbuffer.h,v 2.6.2.3 1998/08/25 09:20:54 hanord Exp $ ** ** Definition of QBuffer class ** ** Created : 930812 ** ** Copyright (C) 1992-1998 Troll Tech AS. All rights reserved. ** ** This file is part of Troll Tech's internal development tree for Qt. ** ** This header text will be replaced by an appropriate text by the ** mkdist script which generates external distributions. ** ** If you are using the Qt Professional Edition or the Qt Free Edition, ** please notify Troll Tech at <info@troll.no> if you see this text. ** ** To Troll Tech developers: This header was generated by the script ** fixcopyright-int. It has the same number of text lines as the free ** and professional editions to avoid line number inconsistency. ** *****************************************************************************/ #ifndef QBUFFER_H #define QBUFFER_H #ifndef QT_H #include "qiodevice.h" #include "qstring.h" #endif // QT_H class Q_EXPORT QBuffer : public QIODevice { public: QBuffer(); QBuffer( QByteArray ); ~QBuffer(); QByteArray buffer() const; bool setBuffer( QByteArray ); bool open( int ); void close(); void flush(); uint size() const; int at() const; bool at( int ); int readBlock( char *p, uint ); int writeBlock( const char *p, uint ); int readLine( char *p, uint ); int getch(); int putch( int ); int ungetch( int ); protected: QByteArray a; private: uint a_len; uint a_inc; private: // Disabled copy constructor and operator= #if defined(Q_DISABLE_COPY) QBuffer( const QBuffer & ); QBuffer &operator=( const QBuffer & ); #endif }; inline QByteArray QBuffer::buffer() const { return a; } inline uint QBuffer::size() const { return a.size(); } inline int QBuffer::at() const { return index; } #endif // QBUFFER_H
Copyright © 1998 Troll Tech | Trademarks | Qt version 1.41
|