diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-03-14 14:47:59 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2021-03-18 20:57:40 (GMT) |
commit | fa1897b1889f7bf74de68f1ac99cf3be343a7551 (patch) | |
tree | ea14c45937cb6fef237c0fcafbd5b0923abd8f0a /src/ftextstream.h | |
parent | 0d05e79d67b5b808918541f429b06805207e8bdb (diff) | |
download | Doxygen-fa1897b1889f7bf74de68f1ac99cf3be343a7551.zip Doxygen-fa1897b1889f7bf74de68f1ac99cf3be343a7551.tar.gz Doxygen-fa1897b1889f7bf74de68f1ac99cf3be343a7551.tar.bz2 |
Refactoring: replace QFile/FTextStream with fstream/stringstream
Diffstat (limited to 'src/ftextstream.h')
-rw-r--r-- | src/ftextstream.h | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/src/ftextstream.h b/src/ftextstream.h deleted file mode 100644 index 8e56174..0000000 --- a/src/ftextstream.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef FTEXTSTREAM_H -#define FTEXTSTREAM_H - -#include <stdio.h> - -#include <qiodevice.h> -#include <qgstring.h> - -/** @brief Simplified and optimized version of QTextStream */ -class FTextStream -{ - public: - FTextStream(); - FTextStream( QIODevice * ); - FTextStream( QGString * ); - FTextStream( FILE * ); - virtual ~FTextStream(); - - QIODevice *device() const; - void setDevice( QIODevice * ); - void unsetDevice(); - - FTextStream &operator<<( char ); - FTextStream &operator<<( const char *); - FTextStream &operator<<( const QCString & ); - FTextStream &operator<<( signed short ); - FTextStream &operator<<( unsigned short ); - FTextStream &operator<<( signed int ); - FTextStream &operator<<( unsigned int ); - FTextStream &operator<<( signed long ); - FTextStream &operator<<( unsigned long ); - FTextStream &operator<<( float ); - FTextStream &operator<<( double ); - - private: - QIODevice *m_dev; - bool m_owndev; - FTextStream &output_int( ulong n, bool neg ); - - private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) - FTextStream( const FTextStream & ); - FTextStream &operator=( const FTextStream & ); -#endif -}; - -inline FTextStream &FTextStream::operator<<( char c) -{ - if (m_dev) m_dev->putch(c); - return *this; -} - -inline FTextStream &FTextStream::operator<<( const char* s) -{ - uint len = qstrlen( s ); - if (m_dev) m_dev->writeBlock( s, len ); - return *this; -} - -inline FTextStream &FTextStream::operator<<( const QCString &s) -{ - if (m_dev) m_dev->writeBlock( s, s.length() ); - return *this; -} - -typedef FTextStream & (*FTSFUNC)(FTextStream &);// manipulator function - -inline FTextStream &operator<<( FTextStream &s, FTSFUNC f ) -{ return (*f)( s ); } - -inline FTextStream &endl( FTextStream & s) -{ - return s << '\n'; -} - -#endif // FTEXTSTREAM_H |