Public Member Functions | List of all members
QTextIStream Class Reference

A convenience class for input streams. More...

#include <qtextstream.h>

Inheritance diagram for QTextIStream:
QTextStream

Public Member Functions

 QTextIStream (QString *s)
 
 QTextIStream (QByteArray ba)
 
 QTextIStream (FILE *f)
 
- Public Member Functions inherited from QTextStream
void setEncoding (Encoding)
 
void setCodec (QTextCodec *)
 
 QTextStream ()
 
 QTextStream (QIODevice *)
 
 QTextStream (QString *, int mode)
 
 QTextStream (QString &, int mode)
 
 QTextStream (QByteArray, int mode)
 
 QTextStream (FILE *, int mode)
 
virtual ~QTextStream ()
 
QIODevicedevice () const
 
void setDevice (QIODevice *)
 
void unsetDevice ()
 
bool atEnd () const
 
bool eof () const
 
QTextStreamoperator>> (QChar &)
 
QTextStreamoperator>> (char &)
 
QTextStreamoperator>> (signed short &)
 
QTextStreamoperator>> (unsigned short &)
 
QTextStreamoperator>> (signed int &)
 
QTextStreamoperator>> (unsigned int &)
 
QTextStreamoperator>> (signed long &)
 
QTextStreamoperator>> (unsigned long &)
 
QTextStreamoperator>> (float &)
 
QTextStreamoperator>> (double &)
 
QTextStreamoperator>> (char *)
 
QTextStreamoperator>> (QString &)
 
QTextStreamoperator>> (QCString &)
 
QTextStreamoperator<< (QChar)
 
QTextStreamoperator<< (char)
 
QTextStreamoperator<< (signed short)
 
QTextStreamoperator<< (unsigned short)
 
QTextStreamoperator<< (signed int)
 
QTextStreamoperator<< (unsigned int)
 
QTextStreamoperator<< (signed long)
 
QTextStreamoperator<< (unsigned long)
 
QTextStreamoperator<< (float)
 
QTextStreamoperator<< (double)
 
QTextStreamoperator<< (const char *)
 
QTextStreamoperator<< (const QString &)
 
QTextStreamoperator<< (const QCString &)
 
QTextStreamoperator<< (void *)
 
QTextStreamreadRawBytes (char *, uint len)
 
QTextStreamwriteRawBytes (const char *, uint len)
 
QString readLine ()
 
QString read ()
 
void skipWhiteSpace ()
 
int flags () const
 
int flags (int f)
 
int setf (int bits)
 
int setf (int bits, int mask)
 
int unsetf (int bits)
 
void reset ()
 
int width () const
 
int width (int)
 
int fill () const
 
int fill (int)
 
int precision () const
 
int precision (int)
 

Additional Inherited Members

- Public Types inherited from QTextStream
enum  Encoding {
  Locale, Latin1, Unicode, UnicodeNetworkOrder,
  UnicodeReverse, RawUnicode, UnicodeUTF8
}
 
enum  {
  skipws = 0x0001, left = 0x0002, right = 0x0004, internal = 0x0008,
  bin = 0x0010, oct = 0x0020, dec = 0x0040, hex = 0x0080,
  showbase = 0x0100, showpoint = 0x0200, uppercase = 0x0400, showpos = 0x0800,
  scientific = 0x1000, fixed = 0x2000
}
 
- Static Public Attributes inherited from QTextStream
static const int basefield = I_BASE_MASK
 
static const int adjustfield
 
static const int floatfield
 

Detailed Description

A convenience class for input streams.

For simple tasks, code should be simple. Hence this class is a shorthand to avoid passing the mode argument to the normal QTextStream constructors.

This makes it easy for example, to write things like this:

QString data = "123 456";
int a, b;
QTextIStream(&data) >> a >> b;
See also
QTextOStream

Definition at line 199 of file qtextstream.h.

Constructor & Destructor Documentation

QTextIStream::QTextIStream ( QString s)
inline

Constructs a stream to read from string s.

Definition at line 201 of file qtextstream.h.

201  :
202  QTextStream(s,IO_ReadOnly) { }
#define IO_ReadOnly
Definition: qiodevice.h:61
QTextIStream::QTextIStream ( QByteArray  ba)
inline

Constructs a stream to read from the array ba.

Definition at line 203 of file qtextstream.h.

203  :
204  QTextStream(ba,IO_ReadOnly) { }
#define IO_ReadOnly
Definition: qiodevice.h:61
QTextIStream::QTextIStream ( FILE *  f)
inline

Constructs a stream to read from the file f.

Definition at line 205 of file qtextstream.h.

205  :
#define IO_ReadOnly
Definition: qiodevice.h:61

The documentation for this class was generated from the following files: