diff options
author | Markus Schorn | 2010-02-08 14:16:28 +0000 |
---|---|---|
committer | Markus Schorn | 2010-02-08 14:16:28 +0000 |
commit | 648f5c93311e6041e3556b315f6ccbbdf0827e0c (patch) | |
tree | 50e1d87b2b755bbc684f0a1c1afe647e3a98dd49 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast | |
parent | c6176c6b67bf54e0d7932f4d9a1647ab1e21ef47 (diff) | |
download | org.eclipse.cdt-648f5c93311e6041e3556b315f6ccbbdf0827e0c.tar.gz org.eclipse.cdt-648f5c93311e6041e3556b315f6ccbbdf0827e0c.tar.xz org.eclipse.cdt-648f5c93311e6041e3556b315f6ccbbdf0827e0c.zip |
Bug 294730: Extern templates.
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast')
3 files changed, 45 insertions, 24 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExplicitTemplateInstantiation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExplicitTemplateInstantiation.java index 39baa199a8f..530b999c1b6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExplicitTemplateInstantiation.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExplicitTemplateInstantiation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: * John Camelon (IBM) - Initial API and implementation + * Markus Schorn (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.core.dom.ast.cpp; @@ -14,7 +15,7 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.IASTDeclaration; /** - * This interface represents an explict template instantiation. + * This interface represents an explicit template instantiation. * * @noextend This interface is not intended to be extended by clients. * @noimplement This interface is not intended to be implemented by clients. @@ -22,6 +23,22 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration; public interface ICPPASTExplicitTemplateInstantiation extends IASTDeclaration { /** + * Gnu extension. + * @since 5.2 + */ + public static final int STATIC = 1; + /** + * Gnu extension. + * @since 5.2 + */ + public static final int INLINE = 2; + /** + * C++0x. + * @since 5.2 + */ + public static final int EXTERN = 3; + + /** * <code>OWNED_DECLARATION</code> represents the role of the inner * declaration that this template refers to. */ @@ -47,4 +64,16 @@ public interface ICPPASTExplicitTemplateInstantiation extends IASTDeclaration { * @since 5.1 */ public ICPPASTExplicitTemplateInstantiation copy(); + + /** + * Returns {@link #STATIC}, {@link #INLINE}, {@link #EXTERN}, or <code>0</code>. + * @since 5.2 + */ + public int getModifier(); + + /** + * Set the modifier value, not allowed on frozen ast. + * @since 5.2 + */ + public void setModifier(int value); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNodeFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNodeFactory.java index bec59a78f4c..e8408356aba 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNodeFactory.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNodeFactory.java @@ -23,7 +23,6 @@ import org.eclipse.cdt.core.dom.ast.IASTStatement; import org.eclipse.cdt.core.dom.ast.IASTTypeId; import org.eclipse.cdt.core.dom.ast.INodeFactory; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier; -import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTExplicitTemplateInstantiation; import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTPointer; import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTPointerToMember; import org.eclipse.cdt.core.parser.IScanner; @@ -144,8 +143,6 @@ public interface ICPPNodeFactory extends INodeFactory { public ICPPASTExplicitTemplateInstantiation newExplicitTemplateInstantiation(IASTDeclaration declaration); - public IGPPASTExplicitTemplateInstantiation newExplicitTemplateInstantiationGPP(IASTDeclaration declaration); - public ICPPASTTemplateSpecialization newTemplateSpecialization(IASTDeclaration declaration); public ICPPASTTryBlockStatement newTryBlockStatement(IASTStatement body); @@ -227,4 +224,12 @@ public interface ICPPNodeFactory extends INodeFactory { */ @Deprecated public org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTSimpleDeclSpecifier newSimpleDeclSpecifierGPP(); + + /** + * @deprecated Replaced by {@link #newExplicitTemplateInstantiation(IASTDeclaration)}. + */ + @Deprecated + public org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTExplicitTemplateInstantiation newExplicitTemplateInstantiationGPP(IASTDeclaration declaration); + + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/cpp/IGPPASTExplicitTemplateInstantiation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/cpp/IGPPASTExplicitTemplateInstantiation.java index d51ad40aa91..fbaedb9da24 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/cpp/IGPPASTExplicitTemplateInstantiation.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/cpp/IGPPASTExplicitTemplateInstantiation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -14,42 +14,29 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExplicitTemplateInstantiation; /** * G++ allows for instantiations to be qualified w/modifiers for scoping. + * @deprecated Replaced by {@link ICPPASTExplicitTemplateInstantiation} * * @noextend This interface is not intended to be extended by clients. * @noimplement This interface is not intended to be implemented by clients. */ +@Deprecated public interface IGPPASTExplicitTemplateInstantiation extends ICPPASTExplicitTemplateInstantiation { /** * <code>ti_static</code> implies 'static' keyword is used. */ - public static final int ti_static = 1; + public static final int ti_static = ICPPASTExplicitTemplateInstantiation.STATIC; /** * <code>ti_inline</code> implies 'inline' keyword is used. */ - public static final int ti_inline = 2; + public static final int ti_inline = ICPPASTExplicitTemplateInstantiation.INLINE; /** * <code>ti_extern</code> implies 'extern' keyword is used. */ - public static final int ti_extern = 3; - - /** - * Get the modifier. - * - * @return int - */ - public int getModifier(); - - /** - * Set the modifier value. - * - * @param value - * (int) - */ - public void setModifier(int value); + public static final int ti_extern = ICPPASTExplicitTemplateInstantiation.EXTERN; /** * @since 5.1 |