diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IDeclaration.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IDeclaration.java
index 94d98d61603..a360897f28e 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IDeclaration.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IDeclaration.java
@@ -1,35 +1,41 @@
+/**********************************************************************
+Copyright (c) 2002, 2004 IBM Rational Software and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+
+Contributors:
+ IBM Rational Software - Initial API and implementation
+**********************************************************************/
package org.eclipse.cdt.core.model;
-/**********************************************************************
- * Copyright (c) 2002,2003 Rational Software Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * Rational Software - Initial API and implementation
-***********************************************************************/
-
+/**
+ * IDeclaration is a base interface for any C Model element that could be
+ * considered a declaration.
+ */
public interface IDeclaration extends ICElement, ISourceManipulation, ISourceReference {
/**
- *
- * @return
+ * Checks if the declaration is static
+ * Returns true if the declaration is static, false otherwise.
+ * @return boolean
* @throws CModelException
*/
boolean isStatic() throws CModelException;
/**
- *
- * @return
+ * Checks if the declaration is constant.
+ * Returns true if the decalration is constant, false otherwise.
+ * @return boolean
* @throws CModelException
*/
boolean isConst() throws CModelException;
/**
- *
- * @return
+ * Checks if the declaration is volatile.
+ * Returns true if the declaration is volatile, false otherwise.
+ * @return boolean
* @throws CModelException
*/
boolean isVolatile() throws CModelException;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IEnumerator.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IEnumerator.java
index a9a08a5ac54..14d47df6799 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IEnumerator.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IEnumerator.java
@@ -1,7 +1,5 @@
-package org.eclipse.cdt.core.model;
-
/**********************************************************************
- * Copyright (c) 2002,2003 Rational Software Corporation and others.
+ * Copyright (c) 2002,2004 Rational Software Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
@@ -10,10 +8,12 @@ package org.eclipse.cdt.core.model;
* Contributors:
* Rational Software - Initial API and implementation
***********************************************************************/
+package org.eclipse.cdt.core.model;
+
public interface IEnumerator extends ICElement, ISourceManipulation{
/**
- * Returns the enumerator constant expression if any.
+ * Returns the enumerator's constant expression if any.
* Returns null otherwise.
* @return String
*/
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IFunction.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IFunction.java
index bd1717f0c0a..9bb6ecc1b4f 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IFunction.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IFunction.java
@@ -6,7 +6,7 @@ package org.eclipse.cdt.core.model;
*/
/**
- * Represents a function.
+ * Represents a function definition.
*/
public interface IFunction extends IFunctionDeclaration {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacro.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacro.java
index 6c6445347ee..9d6ba0c6440 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacro.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacro.java
@@ -1,14 +1,27 @@
+/**********************************************************************
+Copyright (c) 2002, 2004 IBM Rational Software and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+
+Contributors:
+ IBM Rational Software - Initial API and implementation
+**********************************************************************/
package org.eclipse.cdt.core.model;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
/**
* Represents a field declared in a type.
*/
public interface IMacro extends ICElement, ISourceManipulation, ISourceReference {
+ /**
+ * Returns the Identifier List.
+ * @return String
+ */
String getIdentifierList();
+ /**
+ * Returns the Token Sequence.
+ * @return String
+ */
String getTokenSequence();
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMember.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMember.java
index fd33790de38..c0373b7e4fa 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMember.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMember.java
@@ -1,12 +1,17 @@
+/**********************************************************************
+Copyright (c) 2002, 2004 IBM Rational Software and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+
+Contributors:
+ IBM Rational Software - Initial API and implementation
+**********************************************************************/
package org.eclipse.cdt.core.model;
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
/**
* Common protocol for C elements that can be members of types.
* This set consists of IType
, IMethod
,
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMethod.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMethod.java
index 61d18a9a2d1..c282f16be47 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMethod.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMethod.java
@@ -1,10 +1,15 @@
+/**********************************************************************
+Copyright (c) 2002, 2004 IBM Rational Software and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+
+Contributors:
+ IBM Rational Software - Initial API and implementation
+**********************************************************************/
package org.eclipse.cdt.core.model;
-/*
- * (c) Copyright QNX Software Systems Ltd. 2002.
- * All Rights Reserved.
- */
-
/**
* Represents the definition method of a class.
*/
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/INamespace.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/INamespace.java
index 2bb81c39ee7..91f4240f3d2 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/INamespace.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/INamespace.java
@@ -1,13 +1,22 @@
+/**********************************************************************
+Copyright (c) 2002, 2004 IBM Rational Software and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+
+Contributors:
+ IBM Rational Software - Initial API and implementation
+**********************************************************************/
package org.eclipse.cdt.core.model;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
/**
* Represents a package declaration in a C translation unit.
*/
public interface INamespace extends ICElement, IParent, ISourceManipulation, ISourceReference {
-
+ /**
+ * Returns the typename of a namespace.
+ * @return String
+ */
String getTypeName();
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IStructure.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IStructure.java
index c839e0caad6..af967c70e0d 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IStructure.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IStructure.java
@@ -1,11 +1,16 @@
+/**********************************************************************
+Copyright (c) 2002, 2004 IBM Rational Software and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+
+Contributors:
+ IBM Rational Software - Initial API and implementation
+**********************************************************************/
+
package org.eclipse.cdt.core.model;
-
-/*
- * (c) Copyright QNX Software Systems Ltd. 2002.
- * All Rights Reserved.
- */
-
/**
* Represent struct(ure), class or union.
*/
@@ -13,45 +18,51 @@ public interface IStructure extends IInheritance, IParent, IVariableDeclaration
public IField getField(String name);
/**
- *
- * @return
+ * Returns the fields of a structure.
+ * @return an array of IField elements
* @throws CModelException
*/
public IField[] getFields() throws CModelException;
+ /**
+ * Returns the specific method with the given name within the structure.
+ * Returns the first occurance more than one method has the same name.
+ * @param name
+ * @return IMethodDeclaration
+ */
public IMethodDeclaration getMethod(String name);
/**
- *
- * @return
+ * Returns all methods within the structure.
+ * @return array of IMethodDeclaration.
* @throws CModelException
*/
public IMethodDeclaration [] getMethods() throws CModelException;
/**
- *
- * @return
+ * Checks if the structure is a Union
+ * @return boolean
* @throws CModelException
*/
public boolean isUnion() throws CModelException;
/**
- *
- * @return
+ * Checks if the structure is a class
+ * @return boolean
* @throws CModelException
*/
public boolean isClass() throws CModelException;
/**
- *
- * @return
+ * Checks if the structure is a struct
+ * @return boolean
* @throws CModelException
*/
public boolean isStruct() throws CModelException;
/**
- *
- * @return
+ * Checks if the structure is abstract
+ * @return boolean
* @throws CModelException
*/
public boolean isAbstract() throws CModelException;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ITemplate.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ITemplate.java
index b38b8668d54..6023e0c694a 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ITemplate.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ITemplate.java
@@ -22,9 +22,15 @@ public interface ITemplate extends IDeclaration {
void setTemplateParameterTypes(String[] templateParameterTypes);
/**
* Returns the template signature
+ * The signature depends on the type of template.
+ * If it is a template of a structure or a variable, it will include the structure name
+ * and the list of parameters. If it is a template of a method or a function, it might
+ * include the class name with its template parameters (if any), as well as the function/method
+ * name, its template parameters, followed by its normal parameters.
* @return String
* @throws CModelException
*/
+
String getTemplateSignature() throws CModelException;
/**
* Returns the number of template parameters
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IVariable.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IVariable.java
index 3c8452dd010..f00260e333a 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IVariable.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IVariable.java
@@ -1,13 +1,22 @@
+/**********************************************************************
+Copyright (c) 2002, 2004 IBM Rational Software and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+
+Contributors:
+ IBM Rational Software - Initial API and implementation
+**********************************************************************/
package org.eclipse.cdt.core.model;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
/**
* Represents a global variable.
*/
public interface IVariable extends IVariableDeclaration {
+ /**
+ * Returns the initializer of a variable.
+ * @return String
+ */
public String getInitializer();
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IVariableDeclaration.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IVariableDeclaration.java
index 66527043741..b96ced20d7d 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IVariableDeclaration.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IVariableDeclaration.java
@@ -1,23 +1,28 @@
+/**********************************************************************
+Copyright (c) 2002, 2004 IBM Rational Software and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+
+Contributors:
+ IBM Rational Software - Initial API and implementation
+**********************************************************************/
package org.eclipse.cdt.core.model;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
/**
* Represents the declaration of a variable.
*/
public interface IVariableDeclaration extends IDeclaration {
/**
- *
- * @return
+ * Returns the variable declaration type name.
+ * @return String
* @throws CModelException
*/
public String getTypeName() throws CModelException;
/**
- *
+ * Sets the variable declaration type name.
* @param type
* @throws CModelException
*/