| 
									
										
										
										
											2009-02-25 09:15:00 +01:00
										 |  |  | /**************************************************************************
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | ** | 
					
						
							|  |  |  | ** This file is part of Qt Creator | 
					
						
							|  |  |  | ** | 
					
						
							| 
									
										
										
										
											2009-02-25 09:15:00 +01:00
										 |  |  | ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2009-06-17 00:01:27 +10:00
										 |  |  | ** Contact: Nokia Corporation (qt-info@nokia.com) | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2009-02-25 09:15:00 +01:00
										 |  |  | ** Commercial Usage | 
					
						
							| 
									
										
										
										
											2008-12-02 14:17:16 +01:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2009-02-25 09:15:00 +01:00
										 |  |  | ** Licensees holding valid Qt Commercial licenses may use this file in | 
					
						
							|  |  |  | ** accordance with the Qt Commercial License Agreement provided with the | 
					
						
							|  |  |  | ** Software or, alternatively, in accordance with the terms contained in | 
					
						
							|  |  |  | ** a written agreement between you and Nokia. | 
					
						
							| 
									
										
										
										
											2008-12-02 14:17:16 +01:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2009-02-25 09:15:00 +01:00
										 |  |  | ** GNU Lesser General Public License Usage | 
					
						
							| 
									
										
										
										
											2008-12-02 14:17:16 +01:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2009-02-25 09:15:00 +01:00
										 |  |  | ** Alternatively, this file may be used under the terms of the GNU Lesser | 
					
						
							|  |  |  | ** General Public License version 2.1 as published by the Free Software | 
					
						
							|  |  |  | ** Foundation and appearing in the file LICENSE.LGPL included in the | 
					
						
							|  |  |  | ** packaging of this file.  Please review the following information to | 
					
						
							|  |  |  | ** ensure the GNU Lesser General Public License version 2.1 requirements | 
					
						
							|  |  |  | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 | 
					
						
							| 
									
										
										
										
											2008-12-02 14:17:16 +01:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2009-02-25 09:15:00 +01:00
										 |  |  | ** If you are unsure which license is appropriate for your use, please | 
					
						
							| 
									
										
										
										
											2009-08-14 09:30:56 +02:00
										 |  |  | ** contact the sales department at http://qt.nokia.com/contact.
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2009-02-25 09:15:00 +01:00
										 |  |  | **************************************************************************/ | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | // Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | // Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
					
						
							|  |  |  | // of this software and associated documentation files (the "Software"), to deal
 | 
					
						
							|  |  |  | // in the Software without restriction, including without limitation the rights
 | 
					
						
							|  |  |  | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
					
						
							|  |  |  | // copies of the Software, and to permit persons to whom the Software is
 | 
					
						
							|  |  |  | // furnished to do so, subject to the following conditions:
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | // The above copyright notice and this permission notice shall be included in
 | 
					
						
							|  |  |  | // all copies or substantial portions of the Software.
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
					
						
							|  |  |  | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
					
						
							|  |  |  | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
					
						
							|  |  |  | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
					
						
							|  |  |  | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
					
						
							|  |  |  | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
					
						
							|  |  |  | // THE SOFTWARE.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef CPLUSPLUS_SYMBOLS_H
 | 
					
						
							|  |  |  | #define CPLUSPLUS_SYMBOLS_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "CPlusPlusForwardDeclarations.h"
 | 
					
						
							|  |  |  | #include "Symbol.h"
 | 
					
						
							|  |  |  | #include "Type.h"
 | 
					
						
							|  |  |  | #include "FullySpecifiedType.h"
 | 
					
						
							|  |  |  | #include "Array.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | CPLUSPLUS_BEGIN_HEADER | 
					
						
							|  |  |  | CPLUSPLUS_BEGIN_NAMESPACE | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-26 11:41:20 +02:00
										 |  |  | class TemplateParameters | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     TemplateParameters(Scope *scope); | 
					
						
							|  |  |  |     TemplateParameters(TemplateParameters *previous, Scope *scope); | 
					
						
							|  |  |  |     ~TemplateParameters(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     TemplateParameters *previous() const; | 
					
						
							|  |  |  |     Scope *scope() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |     TemplateParameters *_previous; | 
					
						
							|  |  |  |     Scope *_scope; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | class CPLUSPLUS_EXPORT UsingNamespaceDirective: public Symbol | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     UsingNamespaceDirective(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~UsingNamespaceDirective(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Symbol's interface
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-09 16:15:02 +01:00
										 |  |  |     virtual const UsingNamespaceDirective *asUsingNamespaceDirective() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual UsingNamespaceDirective *asUsingNamespaceDirective() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CPLUSPLUS_EXPORT UsingDeclaration: public Symbol | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     UsingDeclaration(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~UsingDeclaration(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Symbol's interface
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-09 16:15:02 +01:00
										 |  |  |     virtual const UsingDeclaration *asUsingDeclaration() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual UsingDeclaration *asUsingDeclaration() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CPLUSPLUS_EXPORT Declaration: public Symbol | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     Declaration(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~Declaration(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-26 11:41:20 +02:00
										 |  |  |     TemplateParameters *templateParameters() const; | 
					
						
							|  |  |  |     void setTemplateParameters(TemplateParameters *templateParameters); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     void setType(FullySpecifiedType type); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Symbol's interface
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-09 16:15:02 +01:00
										 |  |  |     virtual const Declaration *asDeclaration() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual Declaration *asDeclaration() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |     FullySpecifiedType _type; | 
					
						
							| 
									
										
										
										
											2009-08-26 11:41:20 +02:00
										 |  |  |     TemplateParameters *_templateParameters; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CPLUSPLUS_EXPORT Argument: public Symbol | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     Argument(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~Argument(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     void setType(FullySpecifiedType type); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     bool hasInitializer() const; | 
					
						
							|  |  |  |     void setInitializer(bool hasInitializer); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Symbol's interface
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-09 16:15:02 +01:00
										 |  |  |     virtual const Argument *asArgument() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual Argument *asArgument() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |     FullySpecifiedType _type; | 
					
						
							|  |  |  |     bool _initializer: 1; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CPLUSPLUS_EXPORT ScopedSymbol: public Symbol | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     ScopedSymbol(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~ScopedSymbol(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     unsigned memberCount() const; | 
					
						
							|  |  |  |     Symbol *memberAt(unsigned index) const; | 
					
						
							|  |  |  |     Scope *members() const; | 
					
						
							|  |  |  |     void addMember(Symbol *member); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-09 16:15:02 +01:00
										 |  |  |     virtual const ScopedSymbol *asScopedSymbol() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual ScopedSymbol *asScopedSymbol() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | private: | 
					
						
							|  |  |  |     Scope *_members; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CPLUSPLUS_EXPORT Block: public ScopedSymbol | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     Block(TranslationUnit *translationUnit, unsigned sourceLocation); | 
					
						
							|  |  |  |     virtual ~Block(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Symbol's interface
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-09 16:15:02 +01:00
										 |  |  |     virtual const Block *asBlock() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual Block *asBlock() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-16 15:43:24 +01:00
										 |  |  | class CPLUSPLUS_EXPORT ForwardClassDeclaration: public Symbol, public Type | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     ForwardClassDeclaration(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~ForwardClassDeclaration(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-26 11:41:20 +02:00
										 |  |  |     TemplateParameters *templateParameters() const; | 
					
						
							|  |  |  |     void setTemplateParameters(TemplateParameters *templateParameters); | 
					
						
							| 
									
										
										
										
											2009-02-16 15:43:24 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual bool isEqualTo(const Type *other) const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual const ForwardClassDeclaration *asForwardClassDeclaration() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual ForwardClassDeclaration *asForwardClassDeclaration() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual const ForwardClassDeclaration *asForwardClassDeclarationType() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual ForwardClassDeclaration *asForwardClassDeclarationType() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							|  |  |  |     virtual void accept0(TypeVisitor *visitor); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							| 
									
										
										
										
											2009-08-26 11:41:20 +02:00
										 |  |  |     TemplateParameters *_templateParameters; | 
					
						
							| 
									
										
										
										
											2009-02-16 15:43:24 +01:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | class CPLUSPLUS_EXPORT Enum: public ScopedSymbol, public Type | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     Enum(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~Enum(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Symbol's interface
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Type's interface
 | 
					
						
							|  |  |  |     virtual bool isEqualTo(const Type *other) const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-09 16:15:02 +01:00
										 |  |  |     virtual const Enum *asEnum() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual Enum *asEnum() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-09 17:44:06 +01:00
										 |  |  |     virtual const Enum *asEnumType() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual Enum *asEnumType() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							|  |  |  |     virtual void accept0(TypeVisitor *visitor); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CPLUSPLUS_EXPORT Function: public ScopedSymbol, public Type | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     enum MethodKey { | 
					
						
							|  |  |  |         NormalMethod, | 
					
						
							|  |  |  |         SlotMethod, | 
					
						
							|  |  |  |         SignalMethod | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     Function(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~Function(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     bool isNormal() const; | 
					
						
							|  |  |  |     bool isSignal() const; | 
					
						
							|  |  |  |     bool isSlot() const; | 
					
						
							|  |  |  |     int methodKey() const; | 
					
						
							|  |  |  |     void setMethodKey(int key); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-26 11:41:20 +02:00
										 |  |  |     unsigned templateParameterCount() const; // ### remove me
 | 
					
						
							|  |  |  |     Symbol *templateParameterAt(unsigned index) const; // ### remove me
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-26 11:41:20 +02:00
										 |  |  |     TemplateParameters *templateParameters() const; | 
					
						
							|  |  |  |     void setTemplateParameters(TemplateParameters *templateParameters); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     FullySpecifiedType returnType() const; | 
					
						
							|  |  |  |     void setReturnType(FullySpecifiedType returnType); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-26 16:43:38 +01:00
										 |  |  |     /** Convenience function that returns whether the function returns something (including void). */ | 
					
						
							|  |  |  |     bool hasReturnType() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     unsigned argumentCount() const; | 
					
						
							|  |  |  |     Symbol *argumentAt(unsigned index) const; | 
					
						
							|  |  |  |     Scope *arguments() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-26 16:43:38 +01:00
										 |  |  |     /** Convenience function that returns whether the function receives any arguments. */ | 
					
						
							|  |  |  |     bool hasArguments() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-25 13:45:13 +02:00
										 |  |  |     bool isVirtual() const; | 
					
						
							|  |  |  |     void setVirtual(bool isVirtual); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     bool isVariadic() const; | 
					
						
							|  |  |  |     void setVariadic(bool isVariadic); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     bool isConst() const; | 
					
						
							|  |  |  |     void setConst(bool isConst); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     bool isVolatile() const; | 
					
						
							|  |  |  |     void setVolatile(bool isVolatile); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     bool isPureVirtual() const; | 
					
						
							|  |  |  |     void setPureVirtual(bool isPureVirtual); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Symbol's interface
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Type's interface
 | 
					
						
							|  |  |  |     virtual bool isEqualTo(const Type *other) const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-09 16:15:02 +01:00
										 |  |  |     virtual const Function *asFunction() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual Function *asFunction() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-09 17:44:06 +01:00
										 |  |  |     virtual const Function *asFunctionType() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual Function *asFunctionType() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-17 14:46:35 +01:00
										 |  |  |     bool isAmbiguous() const; // internal
 | 
					
						
							|  |  |  |     void setAmbiguous(bool isAmbiguous); // internal
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							|  |  |  |     virtual void accept0(TypeVisitor *visitor); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							| 
									
										
										
										
											2009-08-26 11:41:20 +02:00
										 |  |  |     TemplateParameters *_templateParameters; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     FullySpecifiedType _returnType; | 
					
						
							| 
									
										
										
										
											2009-07-27 21:47:03 +02:00
										 |  |  |     struct Flags { | 
					
						
							| 
									
										
										
										
											2009-09-25 13:45:13 +02:00
										 |  |  |         unsigned _isVirtual: 1; | 
					
						
							| 
									
										
										
										
											2009-07-27 21:47:03 +02:00
										 |  |  |         unsigned _isVariadic: 1; | 
					
						
							|  |  |  |         unsigned _isPureVirtual: 1; | 
					
						
							|  |  |  |         unsigned _isConst: 1; | 
					
						
							|  |  |  |         unsigned _isVolatile: 1; | 
					
						
							|  |  |  |         unsigned _isAmbiguous: 1; | 
					
						
							|  |  |  |         unsigned _methodKey: 3; | 
					
						
							|  |  |  |     }; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     union { | 
					
						
							|  |  |  |         unsigned _flags; | 
					
						
							| 
									
										
										
										
											2009-07-27 21:47:03 +02:00
										 |  |  |         Flags f; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     }; | 
					
						
							|  |  |  |     Scope *_arguments; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CPLUSPLUS_EXPORT Namespace: public ScopedSymbol, public Type | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     Namespace(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~Namespace(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Symbol's interface
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Type's interface
 | 
					
						
							|  |  |  |     virtual bool isEqualTo(const Type *other) const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-09 16:15:02 +01:00
										 |  |  |     virtual const Namespace *asNamespace() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual Namespace *asNamespace() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-09 17:44:06 +01:00
										 |  |  |     virtual const Namespace *asNamespaceType() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual Namespace *asNamespaceType() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							|  |  |  |     virtual void accept0(TypeVisitor *visitor); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CPLUSPLUS_EXPORT BaseClass: public Symbol | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     BaseClass(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~BaseClass(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     bool isVirtual() const; | 
					
						
							|  |  |  |     void setVirtual(bool isVirtual); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Symbol's interface
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-09 16:15:02 +01:00
										 |  |  |     virtual const BaseClass *asBaseClass() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual BaseClass *asBaseClass() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |     bool _isVirtual; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CPLUSPLUS_EXPORT Class: public ScopedSymbol, public Type | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     Class(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~Class(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     enum Key { | 
					
						
							|  |  |  |         ClassKey, | 
					
						
							|  |  |  |         StructKey, | 
					
						
							|  |  |  |         UnionKey | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     bool isClass() const; | 
					
						
							|  |  |  |     bool isStruct() const; | 
					
						
							|  |  |  |     bool isUnion() const; | 
					
						
							|  |  |  |     Key classKey() const; | 
					
						
							|  |  |  |     void setClassKey(Key key); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-26 11:41:20 +02:00
										 |  |  |     unsigned templateParameterCount() const; // ### remove me
 | 
					
						
							|  |  |  |     Symbol *templateParameterAt(unsigned index) const; // ### remove me
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-26 11:41:20 +02:00
										 |  |  |     TemplateParameters *templateParameters() const; | 
					
						
							|  |  |  |     void setTemplateParameters(TemplateParameters *templateParameters); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     unsigned baseClassCount() const; | 
					
						
							|  |  |  |     BaseClass *baseClassAt(unsigned index) const; | 
					
						
							|  |  |  |     void addBaseClass(BaseClass *baseClass); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Symbol's interface
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Type's interface
 | 
					
						
							|  |  |  |     virtual bool isEqualTo(const Type *other) const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-09 16:15:02 +01:00
										 |  |  |     virtual const Class *asClass() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual Class *asClass() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-09 17:44:06 +01:00
										 |  |  |     virtual const Class *asClassType() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual Class *asClassType() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							|  |  |  |     virtual void accept0(TypeVisitor *visitor); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |     Key _key; | 
					
						
							| 
									
										
										
										
											2009-08-26 11:41:20 +02:00
										 |  |  |     TemplateParameters *_templateParameters; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     Array<BaseClass *> _baseClasses; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-28 11:46:00 +02:00
										 |  |  | class CPLUSPLUS_EXPORT ObjCForwardProtocolDeclaration: public Symbol, public Type | 
					
						
							| 
									
										
										
										
											2009-07-28 16:34:15 +02:00
										 |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     ObjCForwardProtocolDeclaration(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~ObjCForwardProtocolDeclaration(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-28 11:46:00 +02:00
										 |  |  |     virtual bool isEqualTo(const Type *other) const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-28 16:34:15 +02:00
										 |  |  |     virtual const ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclaration() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclaration() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-28 11:46:00 +02:00
										 |  |  |     virtual const ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclarationType() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclarationType() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-28 16:34:15 +02:00
										 |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							| 
									
										
										
										
											2009-09-28 11:46:00 +02:00
										 |  |  |     virtual void accept0(TypeVisitor *visitor); | 
					
						
							| 
									
										
										
										
											2009-07-28 16:34:15 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CPLUSPLUS_EXPORT ObjCProtocol: public ScopedSymbol, public Type | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     ObjCProtocol(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~ObjCProtocol(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Symbol's interface
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Type's interface
 | 
					
						
							|  |  |  |     virtual bool isEqualTo(const Type *other) const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual const ObjCProtocol *asObjCProtocol() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual ObjCProtocol *asObjCProtocol() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual const ObjCProtocol *asObjCProtocolType() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual ObjCProtocol *asObjCProtocolType() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							|  |  |  |     virtual void accept0(TypeVisitor *visitor); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |     Array<ObjCProtocol *> _protocols; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-28 11:46:00 +02:00
										 |  |  | class CPLUSPLUS_EXPORT ObjCForwardClassDeclaration: public Symbol, public Type | 
					
						
							| 
									
										
										
										
											2009-07-28 16:34:15 +02:00
										 |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     ObjCForwardClassDeclaration(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~ObjCForwardClassDeclaration(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-28 11:46:00 +02:00
										 |  |  |     virtual bool isEqualTo(const Type *other) const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-28 16:34:15 +02:00
										 |  |  |     virtual const ObjCForwardClassDeclaration *asObjCForwardClassDeclaration() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual ObjCForwardClassDeclaration *asObjCForwardClassDeclaration() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-28 11:46:00 +02:00
										 |  |  |     virtual const ObjCForwardClassDeclaration *asObjCForwardClassDeclarationType() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual ObjCForwardClassDeclaration *asObjCForwardClassDeclarationType() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-28 16:34:15 +02:00
										 |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							| 
									
										
										
										
											2009-09-28 11:46:00 +02:00
										 |  |  |     virtual void accept0(TypeVisitor *visitor); | 
					
						
							| 
									
										
										
										
											2009-07-28 16:34:15 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CPLUSPLUS_EXPORT ObjCClass: public ScopedSymbol, public Type | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     ObjCClass(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~ObjCClass(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-05 18:30:18 +02:00
										 |  |  |     bool isInterface() const { return _isInterface; } | 
					
						
							|  |  |  |     void setInterface(bool isInterface) { _isInterface = isInterface; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     bool isCategory() const { return _categoryName != 0; } | 
					
						
							|  |  |  |     Name *categoryName() const { return _categoryName; } | 
					
						
							|  |  |  |     void setCategoryName(Name *categoryName) { _categoryName = categoryName; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-28 11:46:00 +02:00
										 |  |  |     ObjCClass *baseClass() const | 
					
						
							|  |  |  |     { return _baseClass; } | 
					
						
							|  |  |  |     void setBaseClass(ObjCClass *baseClass) | 
					
						
							|  |  |  |     { _baseClass = baseClass; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     unsigned protocolCount() const | 
					
						
							|  |  |  |     { return _protocols.count(); } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     ObjCProtocol *protocolAt(unsigned index) const | 
					
						
							|  |  |  |     { return _protocols.at(index); } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     void addProtocol(ObjCProtocol *protocol) | 
					
						
							|  |  |  |     { _protocols.push_back(protocol); } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-28 16:34:15 +02:00
										 |  |  |     // Symbol's interface
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Type's interface
 | 
					
						
							|  |  |  |     virtual bool isEqualTo(const Type *other) const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual const ObjCClass *asObjCClass() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual ObjCClass *asObjCClass() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual const ObjCClass *asObjCClassType() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual ObjCClass *asObjCClassType() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							|  |  |  |     virtual void accept0(TypeVisitor *visitor); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							| 
									
										
										
										
											2009-08-05 18:30:18 +02:00
										 |  |  |     bool _isInterface; | 
					
						
							|  |  |  |     Name *_categoryName; | 
					
						
							| 
									
										
										
										
											2009-09-28 11:46:00 +02:00
										 |  |  |     ObjCClass * _baseClass; | 
					
						
							| 
									
										
										
										
											2009-07-28 16:34:15 +02:00
										 |  |  |     Array<ObjCProtocol *> _protocols; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-05 18:30:18 +02:00
										 |  |  | class CPLUSPLUS_EXPORT ObjCMethod: public ScopedSymbol, public Type | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     ObjCMethod(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name); | 
					
						
							|  |  |  |     virtual ~ObjCMethod(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     FullySpecifiedType returnType() const; | 
					
						
							|  |  |  |     void setReturnType(FullySpecifiedType returnType); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** Convenience function that returns whether the function returns something (including void). */ | 
					
						
							|  |  |  |     bool hasReturnType() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     unsigned argumentCount() const; | 
					
						
							|  |  |  |     Symbol *argumentAt(unsigned index) const; | 
					
						
							|  |  |  |     Scope *arguments() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** Convenience function that returns whether the function receives any arguments. */ | 
					
						
							|  |  |  |     bool hasArguments() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     bool isVariadic() const; | 
					
						
							|  |  |  |     void setVariadic(bool isVariadic); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Symbol's interface
 | 
					
						
							|  |  |  |     virtual FullySpecifiedType type() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Type's interface
 | 
					
						
							|  |  |  |     virtual bool isEqualTo(const Type *other) const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual const ObjCMethod *asObjCMethod() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual ObjCMethod *asObjCMethod() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual const ObjCMethod *asObjCMethodType() const | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual ObjCMethod *asObjCMethodType() | 
					
						
							|  |  |  |     { return this; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | protected: | 
					
						
							|  |  |  |     virtual void visitSymbol0(SymbolVisitor *visitor); | 
					
						
							|  |  |  |     virtual void accept0(TypeVisitor *visitor); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |     FullySpecifiedType _returnType; | 
					
						
							|  |  |  |     struct Flags { | 
					
						
							|  |  |  |         unsigned _isVariadic: 1; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |     union { | 
					
						
							|  |  |  |         unsigned _flags; | 
					
						
							|  |  |  |         Flags f; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |     Scope *_arguments; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | CPLUSPLUS_END_NAMESPACE | 
					
						
							|  |  |  | CPLUSPLUS_END_HEADER | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif // CPLUSPLUS_SYMBOLS_H
 |