[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdevplatform/language/duchain/builders
From: Hamish Rodda <rodda () kde ! org>
Date: 2009-11-29 8:14:19
Message-ID: 1259482459.393039.17679.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1055941 by rodda:
Convenience types to set last type and instance
Rearrange usingDeclaration to put parameters which are often left default \
at the end
M +21 -1 abstractexpressionvisitor.h
--- trunk/KDE/kdevplatform/language/duchain/builders/abstractexpressionvisitor.h \
#1055940:1055941 @@ -75,6 +75,17 @@
m_lastType = type;
}
+ void setInstantiatedType(bool instantiated = true)
+ {
+ m_lastInstance = Instance(instantiated);
+ }
+
+ void setInstantiatedType(KDevelop::AbstractType::Ptr type, bool \
instantiated = true) + {
+ m_lastType = type;
+ m_lastInstance = Instance(instantiated);
+ }
+
template<class Type>
void setLastType(TypePtr<Type> type)
{
@@ -86,6 +97,15 @@
return m_lastInstance;
}
+ void setLastInstance(Declaration* decl)
+ {
+ m_lastInstance = Instance(decl);
+ if (decl)
+ m_lastType = decl->abstractType();
+ else
+ m_lastType = 0;
+ }
+
protected:
KDevelop::AbstractType::Ptr lastType()
{
@@ -123,7 +143,7 @@
}
/** The duchain is not locked when this is called */
- virtual void usingDeclaration( T* node, TokenType start_token, \
TokenType end_token, const KDevelop::DeclarationPointer& decl ) { + \
virtual void usingDeclaration( T* node, const KDevelop::DeclarationPointer& \
decl, TokenType start_token = TokenType(), TokenType end_token = \
TokenType() ) {
Q_UNUSED(node) Q_UNUSED(start_token) Q_UNUSED(end_token) \
Q_UNUSED(decl) }
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic