summaryrefslogtreecommitdiffstats
path: root/lib/cppparser/driver.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /lib/cppparser/driver.h
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/cppparser/driver.h')
-rw-r--r--lib/cppparser/driver.h114
1 files changed, 57 insertions, 57 deletions
diff --git a/lib/cppparser/driver.h b/lib/cppparser/driver.h
index 826375e3..3c12d34c 100644
--- a/lib/cppparser/driver.h
+++ b/lib/cppparser/driver.h
@@ -23,14 +23,14 @@
#include "ast.h"
#include "macro.h"
-#include <qpair.h>
-#include <qvaluestack.h>
-#include <qstringlist.h>
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qmap.h>
-#include <qdatetime.h>
-#include <qvaluelist.h>
+#include <tqpair.h>
+#include <tqvaluestack.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqmap.h>
+#include <tqdatetime.h>
+#include <tqvaluelist.h>
#include <map>
#include <set>
#include <hashedstring.h>
@@ -49,7 +49,7 @@ enum
Dep_Local
};
-typedef QPair<QString, int> Dependence;
+typedef QPair<TQString, int> Dependence;
class ParsedFile;
typedef KSharedPtr< ParsedFile > ParsedFilePointer;
@@ -58,19 +58,19 @@ class ParsedFile : public AbstractParseResult {
public:
struct IncludeDesc {
bool local; //Whether it is a local include(#include "local.h", not #include <global.h>)
- QString includePath;
+ TQString includePath;
ParsedFilePointer parsed; //May be zero!
};
// ParsedFile() {
// }
- ParsedFile( QDataStream& s ) {
+ ParsedFile( TQDataStream& s ) {
read( s );
}
- ParsedFile( const QString& fileName, const QDateTime& timeStamp );
+ ParsedFile( const TQString& fileName, const TQDateTime& timeStamp );
///Deserializes the ParsedFile from a previous call to serialize(). AST will always be zero after a call to this.
- ParsedFile( const QByteArray& array );
+ ParsedFile( const TQByteArray& array );
/**
* @return All Macros that were used while processing this translation-unit. May be modified.
@@ -93,16 +93,16 @@ class ParsedFile : public AbstractParseResult {
void addIncludeFiles( const HashedStringSet& includeFiles );
- void addIncludeFile( const QString& includePath, const ParsedFilePointer& parsed, bool localInclude );
+ void addIncludeFile( const TQString& includePath, const ParsedFilePointer& parsed, bool localInclude );
///If this file was parsed while resolving the dependencies of another file, this returns the file this one was included from. Else returns an empty string.
- QString includedFrom() const;
+ TQString includedFrom() const;
- void setIncludedFrom( const QString& str );
+ void setIncludedFrom( const TQString& str );
/**
* @return Reference to the internal list of all directly included files(without those included indirectly)
*/
- const QValueList<IncludeDesc>& directIncludeFiles() const;
+ const TQValueList<IncludeDesc>& directIncludeFiles() const;
operator TranslationUnitAST* () const; //May be zero!
@@ -113,17 +113,17 @@ class ParsedFile : public AbstractParseResult {
void setTranslationUnit( const TranslationUnitAST::Node& trans );
- QString fileName() const;
+ TQString fileName() const;
- QDateTime timeStamp() const;
+ TQDateTime timeStamp() const;
///Serializes the content of this class into a byte-array. Note that this does not serialize the AST.
- QByteArray serialize() const;
+ TQByteArray serialize() const;
- /*void read( QDataStream& stream );
- void write( QDataStream& stream ) const;*/
+ /*void read( TQDataStream& stream );
+ void write( TQDataStream& stream ) const;*/
- virtual void read( QDataStream& stream ) {
+ virtual void read( TQDataStream& stream ) {
int directIncludeFilesCount;
stream >> directIncludeFilesCount;
m_directIncludeFiles.clear();
@@ -145,10 +145,10 @@ class ParsedFile : public AbstractParseResult {
m_includeFiles.read( stream );
}
- virtual void write( QDataStream& stream ) const {
+ virtual void write( TQDataStream& stream ) const {
int i = m_directIncludeFiles.size();
stream << i;
- for( QValueList<IncludeDesc>::const_iterator it = m_directIncludeFiles.begin(); it != m_directIncludeFiles.end(); ++it ) {
+ for( TQValueList<IncludeDesc>::const_iterator it = m_directIncludeFiles.begin(); it != m_directIncludeFiles.end(); ++it ) {
Q_INT8 i = (*it).local;
stream << i;
stream << (*it).includePath;
@@ -166,14 +166,14 @@ class ParsedFile : public AbstractParseResult {
}
private:
- QValueList<IncludeDesc> m_directIncludeFiles;
+ TQValueList<IncludeDesc> m_directIncludeFiles;
MacroSet m_usedMacros;
TranslationUnitAST::Node m_translationUnit;
HashedStringSet m_includeFiles;
int m_skippedLines;
- QString m_fileName;
- QDateTime m_timeStamp;
- QString m_includedFrom;
+ TQString m_fileName;
+ TQDateTime m_timeStamp;
+ TQString m_includedFrom;
};
/**
@@ -188,9 +188,9 @@ class SourceProvider {
* Get the contents of a file
* \param fileName The name of the file to get the contents for. An absolute
* path should be used.
- * \return A QString that contains the contents of the file
+ * \return A TQString that contains the contents of the file
*/
- virtual QString contents( const QString& fileName ) = 0;
+ virtual TQString contents( const TQString& fileName ) = 0;
/**
* Check to see if a file has been modified
@@ -199,7 +199,7 @@ class SourceProvider {
* \return true if the file has been modified
* \return false if the file has not been modified
*/
- virtual bool isModified( const QString& fileName ) = 0;
+ virtual bool isModified( const TQString& fileName ) = 0;
private:
SourceProvider( const SourceProvider& source );
@@ -239,7 +239,7 @@ class Driver {
* @param force Force the parsing of the file. Defaults to false
* @param macrosGlobal Should the macros be global? (Global macros are not deleted once a new translation-unit is parsed)
*/
- virtual void parseFile( const QString& fileName, bool onlyPreProcesss = false, bool force = false, bool macrosGlobal = false );
+ virtual void parseFile( const TQString& fileName, bool onlyPreProcesss = false, bool force = false, bool macrosGlobal = false );
/**
* Indicates that the file has been parsed
@@ -252,14 +252,14 @@ class Driver {
* @param fileName The name of the file to remove
*/
virtual void remove
- ( const QString& fileName );
+ ( const TQString& fileName );
/**
* Add a dependency on another header file for @p fileName
* @param fileName The file name to add the dependency for
* @param dep The dependency to add
*/
- virtual void addDependence( const QString& fileName, const Dependence& dep );
+ virtual void addDependence( const TQString& fileName, const Dependence& dep );
/**
* Add a macro to the driver
@@ -272,15 +272,15 @@ class Driver {
* @param fileName The file name to add the problem for
* @param problem The problem to add
*/
- virtual void addProblem( const QString& fileName, const Problem& problem );
+ virtual void addProblem( const TQString& fileName, const Problem& problem );
/**
* The current file name the driver is working with
*/
- QString currentFileName() const {
+ TQString currentFileName() const {
return m_currentFileName;
}
- ParsedFilePointer takeTranslationUnit( const QString& fileName );
+ ParsedFilePointer takeTranslationUnit( const TQString& fileName );
void takeTranslationUnit( const ParsedFile& file );
/**
@@ -289,13 +289,13 @@ class Driver {
* @return The TranslationUnitAST pointer that represents the translation unit
* @return 0 if no translation unit exists for the file
*/
- ParsedFilePointer translationUnit( const QString& fileName ) const;
+ ParsedFilePointer translationUnit( const TQString& fileName ) const;
/**
* Get the dependencies for a file
* @param fileName The file name to get dependencies for
* @return The dependencies for the file
*/
- QMap<QString, Dependence> dependences( const QString& fileName ) const;
+ TQMap<TQString, Dependence> dependences( const TQString& fileName ) const;
/**
* Get all the macros the driver contains
* @return The macros
@@ -310,7 +310,7 @@ class Driver {
* @param fileName The filename to get problems for
* @return The list of problems for @p fileName
*/
- QValueList<Problem> problems( const QString& fileName ) const;
+ TQValueList<Problem> problems( const TQString& fileName ) const;
void usingString( const HashedString& str );
/**
@@ -346,21 +346,21 @@ class Driver {
* Remove all macros from the driver for a certain file
* @param fileName The file name
*/
- virtual void removeAllMacrosInFile( const QString& fileName ); ///Check when this is called. It may be wrong.
+ virtual void removeAllMacrosInFile( const TQString& fileName ); ///Check when this is called. It may be wrong.
- QStringList includePaths() const {
+ TQStringList includePaths() const {
return m_includePaths;
}
- virtual QStringList getCustomIncludePath( const QString& );
+ virtual TQStringList getCustomIncludePath( const TQString& );
- virtual void addIncludePath( const QString &path );
+ virtual void addIncludePath( const TQString &path );
virtual void clearIncludePaths();
/// @todo remove
- const QMap<QString, ParsedFilePointer> &parsedUnits() const {
+ const TQMap<TQString, ParsedFilePointer> &parsedUnits() const {
return m_parsedUnits;
}
@@ -391,11 +391,11 @@ class Driver {
LexerCache* lexerCache();
///This uses getCustomIncludePath(..) to resolve the include-path internally
- QString findIncludeFile( const Dependence& dep, const QString& fromFile );
+ TQString findIncludeFile( const Dependence& dep, const TQString& fromFile );
protected:
///This uses the state of the parser to find the include-file
- QString findIncludeFile( const Dependence& dep ) const;
+ TQString findIncludeFile( const Dependence& dep ) const;
/**
* Set up the lexer.
@@ -423,20 +423,20 @@ class Driver {
void clearParsedMacros();
private:
- QMap<QString, Dependence>& findOrInsertDependenceList( const QString& fileName );
- QValueList<Problem>& findOrInsertProblemList( const QString& fileName );
+ TQMap<TQString, Dependence>& findOrInsertDependenceList( const TQString& fileName );
+ TQValueList<Problem>& findOrInsertProblemList( const TQString& fileName );
private:
- QString m_currentFileName;
- QString m_currentMasterFileName;
- typedef QMap<QString, Dependence> DependenceMap;
- typedef QMap< QString, DependenceMap> DependencesMap;
+ TQString m_currentFileName;
+ TQString m_currentMasterFileName;
+ typedef TQMap<TQString, Dependence> DependenceMap;
+ typedef TQMap< TQString, DependenceMap> DependencesMap;
DependencesMap m_dependences;
MacroMap m_macros;
- QMap< QString, QValueList<Problem> > m_problems;
- QMap<QString, ParsedFilePointer> m_parsedUnits;
- QStringList m_includePaths;
+ TQMap< TQString, TQValueList<Problem> > m_problems;
+ TQMap<TQString, ParsedFilePointer> m_parsedUnits;
+ TQStringList m_includePaths;
uint depresolv :
1;
Lexer *lexer;