From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lib/cppparser/driver.h | 114 ++++++++++++++++++++++++------------------------- 1 file changed, 57 insertions(+), 57 deletions(-) (limited to 'lib/cppparser/driver.h') 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 -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -49,7 +49,7 @@ enum Dep_Local }; -typedef QPair Dependence; +typedef QPair 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 ) - 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& directIncludeFiles() const; + const TQValueList& 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::const_iterator it = m_directIncludeFiles.begin(); it != m_directIncludeFiles.end(); ++it ) { + for( TQValueList::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 m_directIncludeFiles; + TQValueList 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 dependences( const QString& fileName ) const; + TQMap 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 problems( const QString& fileName ) const; + TQValueList 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 &parsedUnits() const { + const TQMap &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& findOrInsertDependenceList( const QString& fileName ); - QValueList& findOrInsertProblemList( const QString& fileName ); + TQMap& findOrInsertDependenceList( const TQString& fileName ); + TQValueList& findOrInsertProblemList( const TQString& fileName ); private: - QString m_currentFileName; - QString m_currentMasterFileName; - typedef QMap DependenceMap; - typedef QMap< QString, DependenceMap> DependencesMap; + TQString m_currentFileName; + TQString m_currentMasterFileName; + typedef TQMap DependenceMap; + typedef TQMap< TQString, DependenceMap> DependencesMap; DependencesMap m_dependences; MacroMap m_macros; - QMap< QString, QValueList > m_problems; - QMap m_parsedUnits; - QStringList m_includePaths; + TQMap< TQString, TQValueList > m_problems; + TQMap m_parsedUnits; + TQStringList m_includePaths; uint depresolv : 1; Lexer *lexer; -- cgit v1.2.1