Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2008-10-06 09:22:25 +0000
committerMarkus Schorn2008-10-06 09:22:25 +0000
commit5a9b69c9ee76c51b737bb967f8d89cd4e7ae7493 (patch)
tree0a7ea04590ee1b99b43685cd98c44ffd00e5fd9a /core/org.eclipse.cdt.core/parser/org
parent6b82deb626f3d946ed4777e670185ba603d5ba4d (diff)
downloadorg.eclipse.cdt-5a9b69c9ee76c51b737bb967f8d89cd4e7ae7493.tar.gz
org.eclipse.cdt-5a9b69c9ee76c51b737bb967f8d89cd4e7ae7493.tar.xz
org.eclipse.cdt-5a9b69c9ee76c51b737bb967f8d89cd4e7ae7493.zip
Adds ICPPMethod.isPureVirtual(), bug 248865.
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPMethod.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitMethod.java5
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethod.java26
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodInstance.java7
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodSpecialization.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplate.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplateSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethod.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodInstance.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodSpecialization.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodTemplate.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodTemplateSpecialization.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java1
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPAnnotation.java7
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethod.java5
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodInstance.java9
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplate.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplateSpecialization.java4
19 files changed, 120 insertions, 18 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPMethod.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPMethod.java
index 563ae6f1300..4d55684d500 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPMethod.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPMethod.java
@@ -6,14 +6,16 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM - Initial API and implementation
+ * IBM - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.DOMException;
/**
- * @author Doug Schaefer
+ * Base interface for methods, also used for constructors.
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPMethod extends ICPPFunction, ICPPMember {
public static final ICPPMethod [] EMPTY_CPPMETHOD_ARRAY = new ICPPMethod[0];
@@ -36,4 +38,10 @@ public interface ICPPMethod extends ICPPFunction, ICPPMember {
* @since 4.0
*/
public boolean isImplicit();
+
+ /**
+ * Returns whether this is a pure abstract method
+ * @since 5.1
+ */
+ public boolean isPureVirtual() throws DOMException;
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitMethod.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitMethod.java
index 82e47c76b3d..c95f307a462 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitMethod.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitMethod.java
@@ -171,8 +171,13 @@ public class CPPImplicitMethod extends CPPImplicitFunction implements ICPPMethod
return true;
}
+ public boolean isPureVirtual() {
+ return false;
+ }
+
@Override
public IBinding getOwner() {
return getClassOwner();
}
+
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethod.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethod.java
index a6ca9dc6367..69e66f67a75 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethod.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethod.java
@@ -60,6 +60,9 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
public boolean isVirtual() throws DOMException {
throw new DOMException( this );
}
+ public boolean isPureVirtual() throws DOMException {
+ throw new DOMException( this );
+ }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod#isDestructor()
@@ -239,4 +242,27 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
public boolean isImplicit() {
return false;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod#isPureVirtual()
+ */
+ public boolean isPureVirtual() throws DOMException {
+ if (declarations != null) {
+ for (IASTDeclarator dtor : declarations) {
+ if (dtor == null)
+ break;
+
+ dtor = CPPVisitor.findOutermostDeclarator(dtor);
+ IASTDeclaration decl = (IASTDeclaration) dtor.getParent();
+ if (decl.getParent() instanceof ICPPASTCompositeTypeSpecifier) {
+ dtor= CPPVisitor.findTypeRelevantDeclarator(dtor);
+ if (dtor instanceof ICPPASTFunctionDeclarator) {
+ return ((ICPPASTFunctionDeclarator) dtor).isPureVirtual();
+ }
+ }
+ }
+ }
+ return false;
+ }
+
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodInstance.java
index da5bdce68fe..1f761e9961e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodInstance.java
@@ -45,6 +45,13 @@ public class CPPMethodInstance extends CPPFunctionInstance implements ICPPMethod
}
/* (non-Javadoc)
+ * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod#isPureVirtual()
+ */
+ public boolean isPureVirtual() throws DOMException {
+ return ((ICPPMethod)getTemplateDefinition()).isPureVirtual();
+ }
+
+ /* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod#isDestructor()
*/
public boolean isDestructor() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodSpecialization.java
index 1bbb1f05fcb..9373ceeebb8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodSpecialization.java
@@ -79,4 +79,12 @@ public class CPPMethodSpecialization extends CPPFunctionSpecialization
return false;
}
+ public boolean isPureVirtual() throws DOMException {
+ ICPPMethod f = (ICPPMethod) getSpecializedBinding();
+ if (f != null)
+ return f.isPureVirtual();
+
+ return false;
+ }
+
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplate.java
index 41cd57db3c6..75e3daf9016 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplate.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplate.java
@@ -156,4 +156,8 @@ public class CPPMethodTemplate extends CPPFunctionTemplate implements
return false;
}
+ public boolean isPureVirtual() throws DOMException {
+ return false;
+ }
+
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplateSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplateSpecialization.java
index ded911a6576..c1b51af9e6f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplateSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplateSpecialization.java
@@ -57,4 +57,8 @@ public class CPPMethodTemplateSpecialization extends
return false;
}
+ public boolean isPureVirtual() throws DOMException {
+ return false;
+ }
+
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethod.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethod.java
index a8bf72c2ab8..46500fc298a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethod.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethod.java
@@ -43,4 +43,8 @@ class CompositeCPPMethod extends CompositeCPPFunction implements ICPPMethod {
public int getVisibility() throws DOMException {
return ((ICPPMethod)rbinding).getVisibility();
}
+
+ public boolean isPureVirtual() throws DOMException {
+ return ((ICPPMethod)rbinding).isPureVirtual();
+ }
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodInstance.java
index ea1205beb08..11dfd2c74a6 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodInstance.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2007 Symbian Software Systems and others.
+ * Copyright (c) 2007, 2008 Symbian Software Systems 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Andrew Ferguson (Symbian) - Initial implementation
+ * Andrew Ferguson (Symbian) - Initial implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.index.composite.cpp;
@@ -42,4 +42,8 @@ public class CompositeCPPMethodInstance extends CompositeCPPFunctionInstance imp
public int getVisibility() throws DOMException {
return ((ICPPMethod)rbinding).getVisibility();
}
+
+ public boolean isPureVirtual() throws DOMException {
+ return ((ICPPMethod)rbinding).isPureVirtual();
+ }
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodSpecialization.java
index a9784b7a4bd..af7d00987cf 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodSpecialization.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2007 Symbian Software Systems and others.
+ * Copyright (c) 2007, 2008 Symbian Software Systems 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Andrew Ferguson (Symbian) - Initial implementation
+ * Andrew Ferguson (Symbian) - Initial implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.index.composite.cpp;
@@ -43,4 +43,8 @@ implements ICPPMethod {
public int getVisibility() throws DOMException {
return ((ICPPMethod)rbinding).getVisibility();
}
+
+ public boolean isPureVirtual() throws DOMException {
+ return ((ICPPMethod)rbinding).isPureVirtual();
+ }
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodTemplate.java
index 4deba0ba000..17cd4b8fea2 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodTemplate.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodTemplate.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2007 Symbian Software Systems and others.
+ * Copyright (c) 2007, 2008 Symbian Software Systems 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Andrew Ferguson (Symbian) - Initial implementation
+ * Andrew Ferguson (Symbian) - Initial implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.index.composite.cpp;
@@ -44,4 +44,8 @@ public class CompositeCPPMethodTemplate extends CompositeCPPFunctionTemplate imp
return ((ICPPMethod)rbinding).getVisibility();
}
+ public boolean isPureVirtual() throws DOMException {
+ return ((ICPPMethod)rbinding).isPureVirtual();
+ }
+
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodTemplateSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodTemplateSpecialization.java
index 22b6e3cc530..34d37b3441a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodTemplateSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodTemplateSpecialization.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2007 Symbian Software Systems and others.
+ * Copyright (c) 2007, 2008 Symbian Software Systems 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Andrew Ferguson (Symbian) - Initial implementation
+ * Andrew Ferguson (Symbian) - Initial implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.index.composite.cpp;
@@ -46,4 +46,8 @@ public class CompositeCPPMethodTemplateSpecialization
public int getVisibility() throws DOMException {
return ((ICPPMethod)rbinding).getVisibility();
}
+
+ public boolean isPureVirtual() throws DOMException {
+ return ((ICPPMethod)rbinding).isPureVirtual();
+ }
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java
index c3e9511d08a..780aa4bc77e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java
@@ -179,6 +179,7 @@ public class PDOM extends PlatformObject implements IPDOM {
* 70.0 - cleaned up templates, fixes bug 236197
* 71.0 - proper support for anonymous unions, bug 206450
* 72.0 - store project-relative paths for resources that belong to the project, bug 239472
+ * 72.1 - store flag for pure virtual methods.
*/
public static final int LINKAGES = Database.DATA_AREA;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPAnnotation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPAnnotation.java
index 08c5a3beb08..64668dc6e71 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPAnnotation.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPAnnotation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation.
+ * Copyright (c) 2006, 2008 IBM Corporation.
* 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
@@ -9,7 +9,6 @@
* IBM Corporation - initial API and implementation
* Markus Schorn (Wind River Systems)
*******************************************************************************/
-
package org.eclipse.cdt.internal.core.pdom.dom.cpp;
import org.eclipse.cdt.core.dom.ast.DOMException;
@@ -39,7 +38,8 @@ class PDOMCPPAnnotation {
public static final int DESTRUCTOR_OFFSET = 1;
public static final int IMPLICIT_METHOD_OFFSET = 2;
public static final int EXPLICIT_CONSTRUCTOR_OFFSET = 3;
- public static final int MAX_EXTRA_OFFSET= EXPLICIT_CONSTRUCTOR_OFFSET;
+ public static final int PURE_VIRTUAL_OFFSET = 4;
+ public static final int MAX_EXTRA_OFFSET= PURE_VIRTUAL_OFFSET;
/**
* Encodes storage class specifiers and other annotation, including
@@ -92,6 +92,7 @@ class PDOMCPPAnnotation {
modifiers |= (method.isVirtual() ? 1 : 0) << VIRTUAL_OFFSET;
modifiers |= (method.isDestructor() ? 1 : 0) << DESTRUCTOR_OFFSET;
modifiers |= (method.isImplicit() ? 1 : 0) << IMPLICIT_METHOD_OFFSET;
+ modifiers |= (method.isPureVirtual() ? 1 : 0) << PURE_VIRTUAL_OFFSET;
}
if (binding instanceof ICPPConstructor) {
ICPPConstructor constructor= (ICPPConstructor) binding;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethod.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethod.java
index a3931078015..c8dd55afb83 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethod.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethod.java
@@ -11,7 +11,6 @@
* Andrew Ferguson (Symbian)
* Markus Schorn (Wind River Systems)
*******************************************************************************/
-
package org.eclipse.cdt.internal.core.pdom.dom.cpp;
import org.eclipse.cdt.core.dom.ast.DOMException;
@@ -104,6 +103,10 @@ class PDOMCPPMethod extends PDOMCPPFunction implements ICPPMethod {
return getBit(getByte(record + ANNOTATION1), PDOMCPPAnnotation.VIRTUAL_OFFSET);
}
+ public boolean isPureVirtual() throws DOMException {
+ return getBit(getByte(record + ANNOTATION1), PDOMCPPAnnotation.PURE_VIRTUAL_OFFSET);
+ }
+
public boolean isDestructor() throws DOMException {
return getBit(getByte(record + ANNOTATION1), PDOMCPPAnnotation.DESTRUCTOR_OFFSET);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodInstance.java
index 88907c1234d..eaf6af5b1dd 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodInstance.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 QNX Software Systems and others.
+ * Copyright (c) 2007, 2008 QNX Software Systems 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
@@ -24,8 +24,7 @@ import org.eclipse.core.runtime.CoreException;
* @author Bryan Wilkinson
*
*/
-class PDOMCPPMethodInstance extends PDOMCPPFunctionInstance implements
- ICPPMethod {
+class PDOMCPPMethodInstance extends PDOMCPPFunctionInstance implements ICPPMethod {
/**
* The size in bytes of a PDOMCPPMethodInstance record in the database.
@@ -69,6 +68,10 @@ class PDOMCPPMethodInstance extends PDOMCPPFunctionInstance implements
return ((ICPPMethod)getTemplateDefinition()).isVirtual();
}
+ public boolean isPureVirtual() throws DOMException {
+ return ((ICPPMethod)getTemplateDefinition()).isPureVirtual();
+ }
+
public ICPPClassType getClassOwner() throws DOMException {
return (ICPPClassType) getOwner();
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodSpecialization.java
index 49fcf6ffb3a..8062aef4852 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodSpecialization.java
@@ -89,6 +89,10 @@ class PDOMCPPMethodSpecialization extends PDOMCPPFunctionSpecialization
return getBit(getByte(record + ANNOTATION1), PDOMCPPAnnotation.VIRTUAL_OFFSET);
}
+ public boolean isPureVirtual() throws DOMException {
+ return getBit(getByte(record + ANNOTATION1), PDOMCPPAnnotation.PURE_VIRTUAL_OFFSET);
+ }
+
@Override
public boolean isExtern() throws DOMException {
// ISO/IEC 14882:2003 9.2.6
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplate.java
index 7d54c15137c..823dbe5d29c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplate.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 QNX Software Systems and others.
+ * Copyright (c) 2007, 2008 QNX Software Systems 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
@@ -128,4 +128,8 @@ class PDOMCPPMethodTemplate extends PDOMCPPFunctionTemplate implements ICPPMetho
// ISO/IEC 14882:2003 9.2.6
return false;
}
+
+ public boolean isPureVirtual() throws DOMException {
+ return false;
+ }
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplateSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplateSpecialization.java
index 78f9dd11b34..8e6fbb8bf2c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplateSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplateSpecialization.java
@@ -83,4 +83,8 @@ class PDOMCPPMethodTemplateSpecialization extends
public boolean isExternC() {
return false;
}
+
+ public boolean isPureVirtual() throws DOMException {
+ return false;
+ }
}

Back to the top