1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug Fixing

This commit is contained in:
Hoda Amer 2004-06-22 15:33:53 +00:00
parent 3fd15075c3
commit 7b219f7c9b
11 changed files with 142 additions and 73 deletions

View file

@ -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;

View file

@ -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
*/

View file

@ -6,7 +6,7 @@ package org.eclipse.cdt.core.model;
*/
/**
* Represents a function.
* Represents a function definition.
*/
public interface IFunction extends IFunctionDeclaration {

View file

@ -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();
}

View file

@ -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 <code>IType</code>, <code>IMethod</code>,

View file

@ -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.
*/

View file

@ -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();
}

View file

@ -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;

View file

@ -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

View file

@ -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();
}

View file

@ -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
*/