summaryrefslogtreecommitdiffstats
path: root/src/parsers/qhtmlstream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/parsers/qhtmlstream.h')
-rw-r--r--src/parsers/qhtmlstream.h126
1 files changed, 63 insertions, 63 deletions
diff --git a/src/parsers/qhtmlstream.h b/src/parsers/qhtmlstream.h
index 330f9d5..7d27569 100644
--- a/src/parsers/qhtmlstream.h
+++ b/src/parsers/qhtmlstream.h
@@ -7,33 +7,33 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
-#ifndef QHtmlStream_H
-#define QHtmlStream_H
+#ifndef TQHtmlStream_H
+#define TQHtmlStream_H
-#include <qtextstream.h>
-#include <qstringlist.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
-class QHtmlStream;
-class QHtmlStreamManip;
+class TQHtmlStream;
+class TQHtmlStreamManip;
/**
@author Sylvain Joyeux
*/
-class QHtmlStreamManip
+class TQHtmlStreamManip
{
protected:
- virtual void apply(QHtmlStream& stream) const = 0;
+ virtual void apply(TQHtmlStream& stream) const = 0;
public:
- virtual ~QHtmlStreamManip() {};
- void operator () (QHtmlStream& stream) const
+ virtual ~TQHtmlStreamManip() {};
+ void operator () (TQHtmlStream& stream) const
{ apply(stream); }
};
-class QHtmlStream
+class TQHtmlStream
{
- QTextOStream m_stream;
+ TQTextOStream m_stream;
enum States
{
@@ -45,8 +45,8 @@ class QHtmlStream
int m_state, m_enclosing_state;
bool m_newline;
- QString m_indent;
- QStringList m_blockstack;
+ TQString m_indent;
+ TQStringList m_blockstack;
void finalize_open()
{
@@ -71,7 +71,7 @@ class QHtmlStream
}
template<class T>
- QHtmlStream& output(const T& o)
+ TQHtmlStream& output(const T& o)
{
indent();
@@ -98,11 +98,11 @@ class QHtmlStream
}
public:
- QHtmlStream(QString* buffer)
+ TQHtmlStream(TQString* buffer)
: m_stream(buffer), m_state(NORMAL_FLOW), m_newline(true) {}
- ~QHtmlStream() {}
+ ~TQHtmlStream() {}
- void tag(const QString& name, const QString& cl, const QString& id)
+ void tag(const TQString& name, const TQString& cl, const TQString& id)
{
finalize_open();
indent();
@@ -116,7 +116,7 @@ public:
m_stream << " id=\"" << id << "\"";
}
- void block(const QString& name, const QString& cl, const QString& id)
+ void block(const TQString& name, const TQString& cl, const TQString& id)
{
finalize_open();
indent();
@@ -132,7 +132,7 @@ public:
m_stream << " id=\"" << id << "\"";
}
- void parameter(const QString& param_name)
+ void parameter(const TQString& param_name)
{
if (m_state == NORMAL_FLOW) return;
@@ -165,34 +165,34 @@ public:
finalize_open();
}
- QHtmlStream & operator<< ( QChar c ) { return output(c); }
- QHtmlStream & operator<< ( char c ) { return output(c); }
- QHtmlStream & operator<< ( signed short i ) { return output(i); }
- QHtmlStream & operator<< ( unsigned short i ) { return output(i); }
- QHtmlStream & operator<< ( signed int i ) { return output(i); }
- QHtmlStream & operator<< ( unsigned int i ) { return output(i); }
- QHtmlStream & operator<< ( signed long i ) { return output(i); }
- QHtmlStream & operator<< ( unsigned long i ) { return output(i); }
- QHtmlStream & operator<< ( float f ) { return output(f); }
- QHtmlStream & operator<< ( double f ) { return output(f); }
- QHtmlStream & operator<< ( const char * s ) { return output(s); }
- QHtmlStream & operator<< ( const QString & s ) { return output(s); }
- QHtmlStream & operator<< ( const QCString & s ) { return output(s); }
-
- QHtmlStream & operator<< ( const QHtmlStreamManip& op )
+ TQHtmlStream & operator<< ( TQChar c ) { return output(c); }
+ TQHtmlStream & operator<< ( char c ) { return output(c); }
+ TQHtmlStream & operator<< ( signed short i ) { return output(i); }
+ TQHtmlStream & operator<< ( unsigned short i ) { return output(i); }
+ TQHtmlStream & operator<< ( signed int i ) { return output(i); }
+ TQHtmlStream & operator<< ( unsigned int i ) { return output(i); }
+ TQHtmlStream & operator<< ( signed long i ) { return output(i); }
+ TQHtmlStream & operator<< ( unsigned long i ) { return output(i); }
+ TQHtmlStream & operator<< ( float f ) { return output(f); }
+ TQHtmlStream & operator<< ( double f ) { return output(f); }
+ TQHtmlStream & operator<< ( const char * s ) { return output(s); }
+ TQHtmlStream & operator<< ( const TQString & s ) { return output(s); }
+ TQHtmlStream & operator<< ( const TQCString & s ) { return output(s); }
+
+ TQHtmlStream & operator<< ( const TQHtmlStreamManip& op )
{
op(*this);
return *this;
}
- QHtmlStream & operator<< (QTSManip m)
+ TQHtmlStream & operator<< (TQTSManip m)
{
finalize_open();
m_stream << m;
return (*this);
}
- QHtmlStream & operator<< (QTSFUNC f)
+ TQHtmlStream & operator<< (TQTSFUNC f)
{
finalize_open();
int old_flags = m_stream.flags();
@@ -207,79 +207,79 @@ public:
* Stream manipulators
*/
-class QHtmlStreamManip0 : public QHtmlStreamManip
+class TQHtmlStreamManip0 : public TQHtmlStreamManip
{
public:
- typedef void (QHtmlStream::*Method)();
+ typedef void (TQHtmlStream::*Method)();
private:
Method m_method;
- void apply (QHtmlStream& stream) const
+ void apply (TQHtmlStream& stream) const
{ (stream.*m_method)(); }
public:
- QHtmlStreamManip0(Method m)
+ TQHtmlStreamManip0(Method m)
: m_method(m) {}
};
-class QHtmlStreamManip1 : public QHtmlStreamManip
+class TQHtmlStreamManip1 : public TQHtmlStreamManip
{
public:
- typedef void (QHtmlStream::*Method)(const QString& param);
+ typedef void (TQHtmlStream::*Method)(const TQString& param);
private:
Method m_method;
- QString m_param;
+ TQString m_param;
- void apply(QHtmlStream& stream) const
+ void apply(TQHtmlStream& stream) const
{ (stream.*m_method)(m_param); }
public:
- QHtmlStreamManip1(Method m, const QString& param)
+ TQHtmlStreamManip1(Method m, const TQString& param)
: m_method(m), m_param(param) {}
};
-class QHtmlStreamManip3 : public QHtmlStreamManip
+class TQHtmlStreamManip3 : public TQHtmlStreamManip
{
public:
- typedef void (QHtmlStream::*Method)(const QString& param0, const QString& param1, const QString& param2);
+ typedef void (TQHtmlStream::*Method)(const TQString& param0, const TQString& param1, const TQString& param2);
private:
Method m_method;
- QString m_param0, m_param1, m_param2;
+ TQString m_param0, m_param1, m_param2;
- void apply(QHtmlStream& stream) const
+ void apply(TQHtmlStream& stream) const
{ (stream.*m_method)(m_param0, m_param1, m_param2); }
public:
- QHtmlStreamManip3(Method m, const QString& param0, const QString& param1, const QString& param2)
+ TQHtmlStreamManip3(Method m, const TQString& param0, const TQString& param1, const TQString& param2)
: m_method(m),
m_param0(param0), m_param1(param1), m_param2(param2) {}
};
-class CloseAll : public QHtmlStreamManip
+class CloseAll : public TQHtmlStreamManip
{
private:
bool m_indent;
- void apply(QHtmlStream& stream) const
+ void apply(TQHtmlStream& stream) const
{ stream.close_all(m_indent); }
public:
CloseAll(bool indent) : m_indent(indent) {}
};
-inline QHtmlStreamManip3 tag(const QString& name, const QString& cl = QString::null, const QString& id = QString::null)
-{ return QHtmlStreamManip3(&QHtmlStream::tag, name, cl, id); }
-inline QHtmlStreamManip3 block(const QString& name, const QString& cl = QString::null, const QString& id = QString::null)
-{ return QHtmlStreamManip3(&QHtmlStream::block, name, cl, id); }
+inline TQHtmlStreamManip3 tag(const TQString& name, const TQString& cl = TQString(), const TQString& id = TQString())
+{ return TQHtmlStreamManip3(&TQHtmlStream::tag, name, cl, id); }
+inline TQHtmlStreamManip3 block(const TQString& name, const TQString& cl = TQString(), const TQString& id = TQString())
+{ return TQHtmlStreamManip3(&TQHtmlStream::block, name, cl, id); }
-inline QHtmlStreamManip1 param(const QString& name)
-{ return QHtmlStreamManip1(&QHtmlStream::parameter, name); }
+inline TQHtmlStreamManip1 param(const TQString& name)
+{ return TQHtmlStreamManip1(&TQHtmlStream::parameter, name); }
-inline QHtmlStreamManip0 close()
-{ return QHtmlStreamManip0(&QHtmlStream::close); }
-inline QHtmlStreamManip0 data()
-{ return QHtmlStreamManip0(&QHtmlStream::data); }
+inline TQHtmlStreamManip0 close()
+{ return TQHtmlStreamManip0(&TQHtmlStream::close); }
+inline TQHtmlStreamManip0 data()
+{ return TQHtmlStreamManip0(&TQHtmlStream::data); }
inline CloseAll close_all(bool indent = true)
{ return CloseAll(indent); }