ISLEman
Public Member Functions | Protected Attributes | List of all members
QGStringBuffer Class Reference
Inheritance diagram for QGStringBuffer:
QIODevice

Public Member Functions

 QGStringBuffer (QGString *str)
 
bool open (int m)
 
void close ()
 
void flush ()
 
uint size () const
 
int at () const
 
bool at (int pos)
 
int readBlock (char *, uint)
 
int writeBlock (const char *p, uint len)
 
int getch ()
 
int putch (int ch)
 
int ungetch (int)
 
- Public Member Functions inherited from QIODevice
 QIODevice ()
 
virtual ~QIODevice ()
 
int flags () const
 
int mode () const
 
int state () const
 
bool isDirectAccess () const
 
bool isSequentialAccess () const
 
bool isCombinedAccess () const
 
bool isBuffered () const
 
bool isRaw () const
 
bool isSynchronous () const
 
bool isAsynchronous () const
 
bool isTranslated () const
 
bool isReadable () const
 
bool isWritable () const
 
bool isReadWrite () const
 
bool isInactive () const
 
bool isOpen () const
 
int status () const
 
void resetStatus ()
 
virtual bool atEnd () const
 
bool reset ()
 
virtual int readLine (char *data, uint maxlen)
 
int writeBlock (const QByteArray &data)
 
QByteArray readAll ()
 

Protected Attributes

QGStringm_str
 
- Protected Attributes inherited from QIODevice
int ioIndex
 

Additional Inherited Members

- Protected Member Functions inherited from QIODevice
void setFlags (int f)
 
void setType (int)
 
void setMode (int)
 
void setState (int)
 
void setStatus (int)
 

Member Function Documentation

§ at() [1/2]

int QGStringBuffer::at ( ) const
virtual

Virtual function that returns the current I/O device index.

This index is the data read/write head of the I/O device.

See also
size()

Reimplemented from QIODevice.

§ at() [2/2]

bool QGStringBuffer::at ( int  pos)
virtual

Virtual function that sets the I/O device index to pos.

See also
size()

Reimplemented from QIODevice.

§ close()

void QGStringBuffer::close ( )
virtual

Closes the I/O device.

This virtual function must be reimplemented by all subclasses.

See also
open()

Implements QIODevice.

§ flush()

void QGStringBuffer::flush ( )
virtual

Flushes an open I/O device.

This virtual function must be reimplemented by all subclasses.

Implements QIODevice.

§ getch()

int QGStringBuffer::getch ( )
inlinevirtual

Reads a single byte/character from the I/O device.

Returns the byte/character read, or -1 if the end of the I/O device has been reached.

This virtual function must be reimplemented by all subclasses.

See also
putch(), ungetch()

Implements QIODevice.

§ open()

bool QGStringBuffer::open ( int  mode)
virtual

Opens the I/O device using the specified mode. Returns TRUE if successful, or FALSE if the device could not be opened.

The mode parameter m must be a combination of the following flags.

  • IO_Raw specified raw (unbuffered) file access.
  • IO_ReadOnly opens a file in read-only mode.
  • IO_WriteOnly opens a file in write-only mode.
  • IO_ReadWrite opens a file in read/write mode.
  • IO_Append sets the file index to the end of the file.
  • IO_Truncate truncates the file.
  • IO_Translate enables carriage returns and linefeed translation for text files under MS-DOS, Window, OS/2 and Macintosh. On Unix systems this flag has no effect. Use with caution as it will also transform every linefeed written to the file into a CRLF pair. This is likely to corrupt your file when writing binary data to it. Cannot be combined with IO_Raw.

This virtual function must be reimplemented by all subclasses.

See also
close()

Implements QIODevice.

§ putch()

int QGStringBuffer::putch ( int  ch)
virtual

Writes the character ch to the I/O device.

Returns ch, or -1 if some error occurred.

This virtual function must be reimplemented by all subclasses.

See also
getch(), ungetch()

Implements QIODevice.

§ readBlock()

int QGStringBuffer::readBlock ( char *  data,
uint  maxlen 
)
inlinevirtual

Reads at most maxlen bytes from the I/O device into data and returns the number of bytes actually read.

This virtual function must be reimplemented by all subclasses.

See also
writeBlock()

Implements QIODevice.

§ size()

uint QGStringBuffer::size ( ) const
virtual

Virtual function that returns the size of the I/O device.

See also
at()

Implements QIODevice.

§ ungetch()

int QGStringBuffer::ungetch ( int  ch)
inlinevirtual

Puts the character ch back into the I/O device and decrements the index if it is not zero.

This function is normally called to "undo" a getch() operation.

Returns ch, or -1 if some error occurred.

This virtual function must be reimplemented by all subclasses.

See also
getch(), putch()

Implements QIODevice.

§ writeBlock()

int QGStringBuffer::writeBlock ( const char *  data,
uint  len 
)
virtual

Writes len bytes from p to the I/O device and returns the number of bytes actually written.

This virtual function must be reimplemented by all subclasses.

See also
readBlock()

Implements QIODevice.


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