diff options
Diffstat (limited to 'src/xml_to_data/device_xml_to_data.h')
-rw-r--r-- | src/xml_to_data/device_xml_to_data.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/xml_to_data/device_xml_to_data.h b/src/xml_to_data/device_xml_to_data.h index a1d0529..f9874e4 100644 --- a/src/xml_to_data/device_xml_to_data.h +++ b/src/xml_to_data/device_xml_to_data.h @@ -9,9 +9,9 @@ #ifndef DEVICE_XML_TO_DATA_H #define DEVICE_XML_TO_DATA_H -#include <qmap.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqmap.h> +#include <tqfile.h> +#include <tqtextstream.h> #include "common/common/misc.h" #include "common/common/streamer.h" @@ -27,22 +27,22 @@ public: protected: mutable Data *_data; - QMap<QString, Data *> _map; // device -> data + TQMap<TQString, Data *> _map; // device -> data virtual void parse(); - virtual QString currentDevice() const { return (_data ? _data->name() : QString::null); } - virtual QString namespaceName() const = 0; + virtual TQString currentDevice() const { return (_data ? _data->name() : TQString()); } + virtual TQString namespaceName() const = 0; virtual Data *createData() const = 0; - virtual void processDevice(QDomElement device); - virtual void checkPins(const QMap<QString, uint> &pinLabels) const = 0; + virtual void processDevice(TQDomElement device); + virtual void checkPins(const TQMap<TQString, uint> &pinLabels) const = 0; private: - QMap<QString, QString> _documents; // document -> device - QMap<QString, QStringList> _alternatives; // device -> alternatives + TQMap<TQString, TQString> _documents; // document -> device + TQMap<TQString, TQStringList> _alternatives; // device -> alternatives - bool getFrequencyRange(OperatingCondition oc, Special special, QDomElement element); - bool getMemoryTechnology(QDomElement element); - Device::Package processPackage(QDomElement element); + bool getFrequencyRange(OperatingCondition oc, Special special, TQDomElement element); + bool getMemoryTechnology(TQDomElement element); + Device::Package processPackage(TQDomElement element); }; template <class DataType> @@ -53,12 +53,12 @@ public: DataType *data() { return static_cast<DataType *>(_data); } const DataType *data() const { return static_cast<DataType *>(_data); } virtual void output() { - QFile dfile("deps.mak"); + TQFile dfile("deps.mak"); if ( !dfile.open(IO_WriteOnly) ) return; - QTextStream dts(&dfile); + TQTextStream dts(&dfile); dts << "noinst_DATA = "; uint i = 0; - QMap<QString, Data *>::const_iterator it; + TQMap<TQString, Data *>::const_iterator it; for (it=_map.begin(); it!=_map.end(); ++it) { if ( (i%10)==0 ) dts << "\\" << endl << " "; dts << " " << it.key() << ".xml"; @@ -67,13 +67,13 @@ public: dts << endl; dfile.close(); - QFile file(namespaceName().lower() + "_data.cpp"); + TQFile file(namespaceName().lower() + "_data.cpp"); if ( !file.open(IO_WriteOnly) ) return; - QTextStream ts(&file); + TQTextStream ts(&file); ts << "#include \"devices/" << namespaceName().lower() << "/" << namespaceName().lower() << "/" << namespaceName().lower() << "_group.h\"" << endl << endl; ts << "const char *" << namespaceName() << "::DATA_STREAM =" << endl; - QValueList<DataType *> list; + TQValueList<DataType *> list; for (it=_map.begin(); it!=_map.end(); ++it) list.append(static_cast<const DataType *>(it.data())); uint size = toCppString(list, ts); |