Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
9608af7a
Commit
9608af7a
authored
Mar 28, 2011
by
Roberto Raggi
Browse files
Added support to C++ symbols rewriting.
This should simplify full C++ template instantiations. Reviewed-by: Christian Kamm
parent
670d2412
Changes
13
Hide whitespace changes
Inline
Side-by-side
src/libs/3rdparty/cplusplus/CPlusPlus.h
View file @
9608af7a
...
...
@@ -51,5 +51,6 @@
#include "Type.h"
#include "TypeMatcher.h"
#include "TypeVisitor.h"
#include "Templates.h"
#endif // CPLUSPLUS_CPLUSPLUS_H
src/libs/3rdparty/cplusplus/CPlusPlusForwardDeclarations.h
View file @
9608af7a
...
...
@@ -79,6 +79,9 @@ class ArrayType;
class
NamedType
;
// symbols
class
Clone
;
class
Subst
;
class
SymbolVisitor
;
class
Symbol
;
class
Scope
;
...
...
src/libs/3rdparty/cplusplus/Control.cpp
View file @
9608af7a
...
...
@@ -799,3 +799,8 @@ void Control::setTopLevelDeclarationProcessor(CPlusPlus::TopLevelDeclarationProc
{
d
->
processor
=
processor
;
}
void
Control
::
addSymbol
(
Symbol
*
symbol
)
{
d
->
symbols
.
push_back
(
symbol
);
}
src/libs/3rdparty/cplusplus/Control.h
View file @
9608af7a
...
...
@@ -208,6 +208,7 @@ public:
Symbol
**
lastSymbol
()
const
;
bool
hasSymbol
(
Symbol
*
symbol
)
const
;
void
addSymbol
(
Symbol
*
symbol
);
void
squeeze
();
...
...
src/libs/3rdparty/cplusplus/Scope.cpp
View file @
9608af7a
...
...
@@ -22,6 +22,7 @@
#include "Symbols.h"
#include "Names.h"
#include "Literals.h"
#include "Templates.h"
#include <cassert>
#include <cstring>
...
...
@@ -228,6 +229,16 @@ Scope::Scope(TranslationUnit *translationUnit, unsigned sourceLocation, const Na
_endOffset
(
0
)
{
}
Scope
::
Scope
(
Clone
*
clone
,
Subst
*
subst
,
Scope
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
,
_members
(
0
)
,
_startOffset
(
original
->
_startOffset
)
,
_endOffset
(
original
->
_endOffset
)
{
for
(
iterator
it
=
original
->
firstMember
(),
end
=
original
->
lastMember
();
it
!=
end
;
++
it
)
addMember
(
clone
->
symbol
(
*
it
,
subst
));
}
Scope
::~
Scope
()
{
delete
_members
;
}
...
...
src/libs/3rdparty/cplusplus/Scope.h
View file @
9608af7a
...
...
@@ -31,6 +31,7 @@ class CPLUSPLUS_EXPORT Scope: public Symbol
{
public:
Scope
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
Scope
(
Clone
*
clone
,
Subst
*
subst
,
Scope
*
original
);
virtual
~
Scope
();
/// Adds a Symbol to this Scope.
...
...
src/libs/3rdparty/cplusplus/Symbol.cpp
View file @
9608af7a
...
...
@@ -28,6 +28,7 @@
#include "SymbolVisitor.h"
#include "NameVisitor.h"
#include "Scope.h"
#include "Templates.h"
#include <cassert>
using
namespace
CPlusPlus
;
...
...
@@ -102,6 +103,24 @@ Symbol::Symbol(TranslationUnit *translationUnit, unsigned sourceLocation, const
setName
(
name
);
}
Symbol
::
Symbol
(
Clone
*
clone
,
Subst
*
subst
,
Symbol
*
original
)
:
_name
(
clone
->
name
(
original
->
_name
,
subst
)),
_scope
(
0
),
_next
(
0
),
_fileId
(
clone
->
control
()
->
stringLiteral
(
original
->
fileName
(),
original
->
fileNameLength
())),
_sourceLocation
(
original
->
_sourceLocation
),
_hashCode
(
original
->
_hashCode
),
_storage
(
original
->
_storage
),
_visibility
(
original
->
_visibility
),
_index
(
0
),
_line
(
original
->
_line
),
_column
(
original
->
_column
),
_isGenerated
(
original
->
_isGenerated
),
_isDeprecated
(
original
->
_isDeprecated
),
_isUnavailable
(
original
->
_isUnavailable
)
{
}
Symbol
::~
Symbol
()
{
}
...
...
src/libs/3rdparty/cplusplus/Symbol.h
View file @
9608af7a
...
...
@@ -55,6 +55,7 @@ public:
public:
/// Constructs a Symbol with the given source location, name and translation unit.
Symbol
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
Symbol
(
Clone
*
clone
,
Subst
*
subst
,
Symbol
*
original
);
/// Destroy this Symbol.
virtual
~
Symbol
();
...
...
src/libs/3rdparty/cplusplus/Symbols.cpp
View file @
9608af7a
...
...
@@ -24,6 +24,7 @@
#include "SymbolVisitor.h"
#include "TypeMatcher.h"
#include "Scope.h"
#include "Templates.h"
using
namespace
CPlusPlus
;
...
...
@@ -32,6 +33,10 @@ UsingNamespaceDirective::UsingNamespaceDirective(TranslationUnit *translationUni
:
Symbol
(
translationUnit
,
sourceLocation
,
name
)
{
}
UsingNamespaceDirective
::
UsingNamespaceDirective
(
Clone
*
clone
,
Subst
*
subst
,
UsingNamespaceDirective
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
{
}
UsingNamespaceDirective
::~
UsingNamespaceDirective
()
{
}
...
...
@@ -46,6 +51,11 @@ NamespaceAlias::NamespaceAlias(TranslationUnit *translationUnit,
:
Symbol
(
translationUnit
,
sourceLocation
,
name
),
_namespaceName
(
0
)
{
}
NamespaceAlias
::
NamespaceAlias
(
Clone
*
clone
,
Subst
*
subst
,
NamespaceAlias
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
,
_namespaceName
(
clone
->
name
(
original
->
_namespaceName
,
subst
))
{
}
NamespaceAlias
::~
NamespaceAlias
()
{
}
...
...
@@ -67,6 +77,10 @@ UsingDeclaration::UsingDeclaration(TranslationUnit *translationUnit,
:
Symbol
(
translationUnit
,
sourceLocation
,
name
)
{
}
UsingDeclaration
::
UsingDeclaration
(
Clone
*
clone
,
Subst
*
subst
,
UsingDeclaration
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
{
}
UsingDeclaration
::~
UsingDeclaration
()
{
}
...
...
@@ -80,6 +94,11 @@ Declaration::Declaration(TranslationUnit *translationUnit, unsigned sourceLocati
:
Symbol
(
translationUnit
,
sourceLocation
,
name
)
{
}
Declaration
::
Declaration
(
Clone
*
clone
,
Subst
*
subst
,
Declaration
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
,
_type
(
clone
->
type
(
original
->
_type
,
subst
))
{
}
Declaration
::~
Declaration
()
{
}
...
...
@@ -111,6 +130,12 @@ Argument::Argument(TranslationUnit *translationUnit, unsigned sourceLocation, co
_initializer
(
0
)
{
}
Argument
::
Argument
(
Clone
*
clone
,
Subst
*
subst
,
Argument
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
,
_initializer
(
clone
->
stringLiteral
(
original
->
_initializer
))
,
_type
(
clone
->
type
(
original
->
_type
,
subst
))
{
}
Argument
::~
Argument
()
{
}
...
...
@@ -136,6 +161,11 @@ TypenameArgument::TypenameArgument(TranslationUnit *translationUnit, unsigned so
:
Symbol
(
translationUnit
,
sourceLocation
,
name
)
{
}
TypenameArgument
::
TypenameArgument
(
Clone
*
clone
,
Subst
*
subst
,
TypenameArgument
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
,
_type
(
clone
->
type
(
original
->
_type
,
subst
))
{
}
TypenameArgument
::~
TypenameArgument
()
{
}
...
...
@@ -153,6 +183,12 @@ Function::Function(TranslationUnit *translationUnit, unsigned sourceLocation, co
_flags
(
0
)
{
}
Function
::
Function
(
Clone
*
clone
,
Subst
*
subst
,
Function
*
original
)
:
Scope
(
clone
,
subst
,
original
)
,
_returnType
(
clone
->
type
(
original
->
_returnType
,
subst
))
,
_flags
(
original
->
_flags
)
{
}
Function
::~
Function
()
{
}
...
...
@@ -376,6 +412,10 @@ Block::Block(TranslationUnit *translationUnit, unsigned sourceLocation)
:
Scope
(
translationUnit
,
sourceLocation
,
/*name = */
0
)
{
}
Block
::
Block
(
Clone
*
clone
,
Subst
*
subst
,
Block
*
original
)
:
Scope
(
clone
,
subst
,
original
)
{
}
Block
::~
Block
()
{
}
...
...
@@ -395,6 +435,10 @@ Enum::Enum(TranslationUnit *translationUnit, unsigned sourceLocation, const Name
:
Scope
(
translationUnit
,
sourceLocation
,
name
)
{
}
Enum
::
Enum
(
Clone
*
clone
,
Subst
*
subst
,
Enum
*
original
)
:
Scope
(
clone
,
subst
,
original
)
{
}
Enum
::~
Enum
()
{
}
...
...
@@ -439,6 +483,10 @@ Template::Template(TranslationUnit *translationUnit, unsigned sourceLocation, co
:
Scope
(
translationUnit
,
sourceLocation
,
name
)
{
}
Template
::
Template
(
Clone
*
clone
,
Subst
*
subst
,
Template
*
original
)
:
Scope
(
clone
,
subst
,
original
)
{
}
Template
::~
Template
()
{
}
...
...
@@ -496,6 +544,10 @@ Namespace::Namespace(TranslationUnit *translationUnit, unsigned sourceLocation,
:
Scope
(
translationUnit
,
sourceLocation
,
name
)
{
}
Namespace
::
Namespace
(
Clone
*
clone
,
Subst
*
subst
,
Namespace
*
original
)
:
Scope
(
clone
,
subst
,
original
)
{
}
Namespace
::~
Namespace
()
{
}
...
...
@@ -539,6 +591,12 @@ BaseClass::BaseClass(TranslationUnit *translationUnit, unsigned sourceLocation,
_isVirtual
(
false
)
{
}
BaseClass
::
BaseClass
(
Clone
*
clone
,
Subst
*
subst
,
BaseClass
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
,
_isVirtual
(
original
->
_isVirtual
)
,
_type
(
clone
->
type
(
original
->
_type
,
subst
))
{
}
BaseClass
::~
BaseClass
()
{
}
...
...
@@ -562,6 +620,10 @@ ForwardClassDeclaration::ForwardClassDeclaration(TranslationUnit *translationUni
:
Symbol
(
translationUnit
,
sourceLocation
,
name
)
{
}
ForwardClassDeclaration
::
ForwardClassDeclaration
(
Clone
*
clone
,
Subst
*
subst
,
ForwardClassDeclaration
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
{
}
ForwardClassDeclaration
::~
ForwardClassDeclaration
()
{
}
...
...
@@ -600,6 +662,14 @@ Class::Class(TranslationUnit *translationUnit, unsigned sourceLocation, const Na
_key
(
ClassKey
)
{
}
Class
::
Class
(
Clone
*
clone
,
Subst
*
subst
,
Class
*
original
)
:
Scope
(
clone
,
subst
,
original
)
,
_key
(
original
->
_key
)
{
for
(
size_t
i
=
0
;
i
<
original
->
_baseClasses
.
size
();
++
i
)
addBaseClass
(
clone
->
symbol
(
original
->
_baseClasses
.
at
(
i
),
subst
)
->
asBaseClass
());
}
Class
::~
Class
()
{
}
...
...
@@ -672,6 +742,12 @@ QtPropertyDeclaration::QtPropertyDeclaration(TranslationUnit *translationUnit, u
,
_flags
(
NoFlags
)
{
}
QtPropertyDeclaration
::
QtPropertyDeclaration
(
Clone
*
clone
,
Subst
*
subst
,
QtPropertyDeclaration
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
,
_type
(
clone
->
type
(
original
->
_type
,
subst
))
,
_flags
(
original
->
_flags
)
{
}
QtPropertyDeclaration
::~
QtPropertyDeclaration
()
{
}
...
...
@@ -695,6 +771,10 @@ QtEnum::QtEnum(TranslationUnit *translationUnit, unsigned sourceLocation, const
:
Symbol
(
translationUnit
,
sourceLocation
,
name
)
{
}
QtEnum
::
QtEnum
(
Clone
*
clone
,
Subst
*
subst
,
QtEnum
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
{
}
QtEnum
::~
QtEnum
()
{
}
...
...
@@ -709,6 +789,10 @@ ObjCBaseClass::ObjCBaseClass(TranslationUnit *translationUnit, unsigned sourceLo
:
Symbol
(
translationUnit
,
sourceLocation
,
name
)
{
}
ObjCBaseClass
::
ObjCBaseClass
(
Clone
*
clone
,
Subst
*
subst
,
ObjCBaseClass
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
{
}
ObjCBaseClass
::~
ObjCBaseClass
()
{
}
...
...
@@ -722,6 +806,10 @@ ObjCBaseProtocol::ObjCBaseProtocol(TranslationUnit *translationUnit, unsigned so
:
Symbol
(
translationUnit
,
sourceLocation
,
name
)
{
}
ObjCBaseProtocol
::
ObjCBaseProtocol
(
Clone
*
clone
,
Subst
*
subst
,
ObjCBaseProtocol
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
{
}
ObjCBaseProtocol
::~
ObjCBaseProtocol
()
{
}
...
...
@@ -736,7 +824,18 @@ ObjCClass::ObjCClass(TranslationUnit *translationUnit, unsigned sourceLocation,
_categoryName
(
0
),
_baseClass
(
0
),
_isInterface
(
false
)
{
}
ObjCClass
::
ObjCClass
(
Clone
*
clone
,
Subst
*
subst
,
ObjCClass
*
original
)
:
Scope
(
clone
,
subst
,
original
)
,
_categoryName
(
clone
->
name
(
original
->
_categoryName
,
subst
))
,
_baseClass
(
0
)
,
_isInterface
(
original
->
_isInterface
)
{
if
(
original
->
_baseClass
)
_baseClass
=
clone
->
symbol
(
original
->
_baseClass
,
subst
)
->
asObjCBaseClass
();
for
(
size_t
i
=
0
;
i
<
original
->
_protocols
.
size
();
++
i
)
addProtocol
(
clone
->
symbol
(
original
->
_protocols
.
at
(
i
),
subst
)
->
asObjCBaseProtocol
());
}
ObjCClass
::~
ObjCClass
()
...
...
@@ -819,6 +918,13 @@ ObjCProtocol::ObjCProtocol(TranslationUnit *translationUnit, unsigned sourceLoca
{
}
ObjCProtocol
::
ObjCProtocol
(
Clone
*
clone
,
Subst
*
subst
,
ObjCProtocol
*
original
)
:
Scope
(
clone
,
subst
,
original
)
{
for
(
size_t
i
=
0
;
i
<
original
->
_protocols
.
size
();
++
i
)
addProtocol
(
clone
->
symbol
(
original
->
_protocols
.
at
(
i
),
subst
)
->
asObjCBaseProtocol
());
}
ObjCProtocol
::~
ObjCProtocol
()
{}
...
...
@@ -873,6 +979,10 @@ ObjCForwardClassDeclaration::ObjCForwardClassDeclaration(TranslationUnit *transl
{
}
ObjCForwardClassDeclaration
::
ObjCForwardClassDeclaration
(
Clone
*
clone
,
Subst
*
subst
,
ObjCForwardClassDeclaration
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
{
}
ObjCForwardClassDeclaration
::~
ObjCForwardClassDeclaration
()
{}
...
...
@@ -913,6 +1023,10 @@ ObjCForwardProtocolDeclaration::ObjCForwardProtocolDeclaration(TranslationUnit *
{
}
ObjCForwardProtocolDeclaration
::
ObjCForwardProtocolDeclaration
(
Clone
*
clone
,
Subst
*
subst
,
ObjCForwardProtocolDeclaration
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
{
}
ObjCForwardProtocolDeclaration
::~
ObjCForwardProtocolDeclaration
()
{}
...
...
@@ -952,6 +1066,12 @@ ObjCMethod::ObjCMethod(TranslationUnit *translationUnit, unsigned sourceLocation
_flags
(
0
)
{
}
ObjCMethod
::
ObjCMethod
(
Clone
*
clone
,
Subst
*
subst
,
ObjCMethod
*
original
)
:
Scope
(
clone
,
subst
,
original
)
,
_returnType
(
clone
->
type
(
original
->
_returnType
,
subst
))
,
_flags
(
original
->
_flags
)
{
}
ObjCMethod
::~
ObjCMethod
()
{
}
...
...
@@ -1048,6 +1168,14 @@ ObjCPropertyDeclaration::ObjCPropertyDeclaration(TranslationUnit *translationUni
_propertyAttributes
(
None
)
{}
ObjCPropertyDeclaration
::
ObjCPropertyDeclaration
(
Clone
*
clone
,
Subst
*
subst
,
ObjCPropertyDeclaration
*
original
)
:
Symbol
(
clone
,
subst
,
original
)
,
_getterName
(
clone
->
name
(
original
->
_getterName
,
subst
))
,
_setterName
(
clone
->
name
(
original
->
_setterName
,
subst
))
,
_type
(
clone
->
type
(
original
->
_type
,
subst
))
,
_propertyAttributes
(
original
->
_propertyAttributes
)
{
}
ObjCPropertyDeclaration
::~
ObjCPropertyDeclaration
()
{}
...
...
src/libs/3rdparty/cplusplus/Symbols.h
View file @
9608af7a
...
...
@@ -34,6 +34,7 @@ class CPLUSPLUS_EXPORT UsingNamespaceDirective: public Symbol
{
public:
UsingNamespaceDirective
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
UsingNamespaceDirective
(
Clone
*
clone
,
Subst
*
subst
,
UsingNamespaceDirective
*
original
);
virtual
~
UsingNamespaceDirective
();
// Symbol's interface
...
...
@@ -53,6 +54,7 @@ class CPLUSPLUS_EXPORT UsingDeclaration: public Symbol
{
public:
UsingDeclaration
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
UsingDeclaration
(
Clone
*
clone
,
Subst
*
subst
,
UsingDeclaration
*
original
);
virtual
~
UsingDeclaration
();
// Symbol's interface
...
...
@@ -72,6 +74,7 @@ class CPLUSPLUS_EXPORT NamespaceAlias: public Symbol
{
public:
NamespaceAlias
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
NamespaceAlias
(
Clone
*
clone
,
Subst
*
subst
,
NamespaceAlias
*
original
);
virtual
~
NamespaceAlias
();
const
Name
*
namespaceName
()
const
;
...
...
@@ -97,6 +100,7 @@ class CPLUSPLUS_EXPORT Declaration: public Symbol
{
public:
Declaration
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
Declaration
(
Clone
*
clone
,
Subst
*
subst
,
Declaration
*
original
);
virtual
~
Declaration
();
void
setType
(
const
FullySpecifiedType
&
type
);
...
...
@@ -146,6 +150,7 @@ class CPLUSPLUS_EXPORT Argument: public Symbol
{
public:
Argument
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
Argument
(
Clone
*
clone
,
Subst
*
subst
,
Argument
*
original
);
virtual
~
Argument
();
void
setType
(
const
FullySpecifiedType
&
type
);
...
...
@@ -176,6 +181,7 @@ class CPLUSPLUS_EXPORT TypenameArgument: public Symbol
{
public:
TypenameArgument
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
TypenameArgument
(
Clone
*
clone
,
Subst
*
subst
,
TypenameArgument
*
original
);
virtual
~
TypenameArgument
();
void
setType
(
const
FullySpecifiedType
&
type
);
...
...
@@ -200,6 +206,7 @@ class CPLUSPLUS_EXPORT Block: public Scope
{
public:
Block
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
);
Block
(
Clone
*
clone
,
Subst
*
subst
,
Block
*
original
);
virtual
~
Block
();
// Symbol's interface
...
...
@@ -219,6 +226,7 @@ class CPLUSPLUS_EXPORT ForwardClassDeclaration: public Symbol, public Type
{
public:
ForwardClassDeclaration
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
ForwardClassDeclaration
(
Clone
*
clone
,
Subst
*
subst
,
ForwardClassDeclaration
*
original
);
virtual
~
ForwardClassDeclaration
();
virtual
FullySpecifiedType
type
()
const
;
...
...
@@ -247,6 +255,7 @@ class CPLUSPLUS_EXPORT Enum: public Scope, public Type
{
public:
Enum
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
Enum
(
Clone
*
clone
,
Subst
*
subst
,
Enum
*
original
);
virtual
~
Enum
();
// Symbol's interface
...
...
@@ -285,6 +294,7 @@ public:
public:
Function
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
Function
(
Clone
*
clone
,
Subst
*
subst
,
Function
*
original
);
virtual
~
Function
();
bool
isNormal
()
const
;
...
...
@@ -375,6 +385,7 @@ class CPLUSPLUS_EXPORT Template: public Scope, public Type
{
public:
Template
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
Template
(
Clone
*
clone
,
Subst
*
subst
,
Template
*
original
);
virtual
~
Template
();
unsigned
templateParameterCount
()
const
;
...
...
@@ -410,6 +421,7 @@ class CPLUSPLUS_EXPORT Namespace: public Scope, public Type
{
public:
Namespace
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
Namespace
(
Clone
*
clone
,
Subst
*
subst
,
Namespace
*
original
);
virtual
~
Namespace
();
// Symbol's interface
...
...
@@ -440,6 +452,7 @@ class CPLUSPLUS_EXPORT BaseClass: public Symbol
{
public:
BaseClass
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
BaseClass
(
Clone
*
clone
,
Subst
*
subst
,
BaseClass
*
original
);
virtual
~
BaseClass
();
bool
isVirtual
()
const
;
...
...
@@ -467,6 +480,7 @@ class CPLUSPLUS_EXPORT Class: public Scope, public Type
{
public:
Class
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
Class
(
Clone
*
clone
,
Subst
*
subst
,
Class
*
original
);
virtual
~
Class
();
enum
Key
{
...
...
@@ -531,11 +545,12 @@ public:
UserFlag
=
1
<<
10
,
UserFunction
=
1
<<
11
,
ConstantFlag
=
1
<<
12
,
FinalFlag
=
1
<<
13
,
FinalFlag
=
1
<<
13
};
public:
QtPropertyDeclaration
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
QtPropertyDeclaration
(
Clone
*
clone
,
Subst
*
subst
,
QtPropertyDeclaration
*
original
);
virtual
~
QtPropertyDeclaration
();
void
setType
(
const
FullySpecifiedType
&
type
);
...
...
@@ -564,6 +579,7 @@ class CPLUSPLUS_EXPORT QtEnum: public Symbol
{
public:
QtEnum
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
QtEnum
(
Clone
*
clone
,
Subst
*
subst
,
QtEnum
*
original
);
virtual
~
QtEnum
();
// Symbol's interface
...
...
@@ -583,6 +599,7 @@ class CPLUSPLUS_EXPORT ObjCBaseClass: public Symbol
{
public:
ObjCBaseClass
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
ObjCBaseClass
(
Clone
*
clone
,
Subst
*
subst
,
ObjCBaseClass
*
original
);
virtual
~
ObjCBaseClass
();
// Symbol's interface
...
...
@@ -602,6 +619,7 @@ class CPLUSPLUS_EXPORT ObjCBaseProtocol: public Symbol
{
public:
ObjCBaseProtocol
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
ObjCBaseProtocol
(
Clone
*
clone
,
Subst
*
subst
,
ObjCBaseProtocol
*
original
);
virtual
~
ObjCBaseProtocol
();
// Symbol's interface
...
...
@@ -621,6 +639,7 @@ class CPLUSPLUS_EXPORT ObjCForwardProtocolDeclaration: public Symbol, public Typ
{
public:
ObjCForwardProtocolDeclaration
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
ObjCForwardProtocolDeclaration
(
Clone
*
clone
,
Subst
*
subst
,
ObjCForwardProtocolDeclaration
*
original
);
virtual
~
ObjCForwardProtocolDeclaration
();
virtual
FullySpecifiedType
type
()
const
;
...
...
@@ -649,6 +668,7 @@ class CPLUSPLUS_EXPORT ObjCProtocol: public Scope, public Type
{
public:
ObjCProtocol
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
ObjCProtocol
(
Clone
*
clone
,
Subst
*
subst
,
ObjCProtocol
*
original
);
virtual
~
ObjCProtocol
();
unsigned
protocolCount
()
const
;
...
...
@@ -686,6 +706,7 @@ class CPLUSPLUS_EXPORT ObjCForwardClassDeclaration: public Symbol, public Type
{
public:
ObjCForwardClassDeclaration
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
ObjCForwardClassDeclaration
(
Clone
*
clone
,
Subst
*
subst
,
ObjCForwardClassDeclaration
*
original
);
virtual
~
ObjCForwardClassDeclaration
();
virtual
FullySpecifiedType
type
()
const
;
...
...
@@ -714,6 +735,7 @@ class CPLUSPLUS_EXPORT ObjCClass: public Scope, public Type
{
public:
ObjCClass
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
ObjCClass
(
Clone
*
clone
,
Subst
*
subst
,
ObjCClass
*
original
);
virtual
~
ObjCClass
();
bool
isInterface
()
const
;
...
...
@@ -764,6 +786,7 @@ class CPLUSPLUS_EXPORT ObjCMethod: public Scope, public Type
{
public:
ObjCMethod
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
ObjCMethod
(
Clone
*
clone
,
Subst
*
subst
,
ObjCMethod
*
original
);
virtual
~
ObjCMethod
();
FullySpecifiedType
returnType
()
const
;
...
...
@@ -837,6 +860,7 @@ public:
ObjCPropertyDeclaration
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
);
ObjCPropertyDeclaration
(
Clone
*
clone
,
Subst
*
subst
,
ObjCPropertyDeclaration
*
original
);
virtual
~
ObjCPropertyDeclaration
();
bool
hasAttribute
(
int
attribute
)
const
;
...
...
src/libs/3rdparty/cplusplus/Templates.cpp
0 → 100644
View file @
9608af7a
// 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.
#include "Templates.h"