mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-26 02:15:31 +02:00
Cosmetics.
This commit is contained in:
parent
d5f6bfc0bd
commit
cf9f88cb44
1 changed files with 37 additions and 26 deletions
|
@ -8,7 +8,7 @@
|
|||
* Contributors:
|
||||
* IBM - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* /
|
||||
*
|
||||
*******************************************************************************/
|
||||
/*
|
||||
* Created on Apr 29, 2005
|
||||
|
@ -30,15 +30,15 @@ import org.eclipse.core.runtime.PlatformObject;
|
|||
|
||||
/**
|
||||
* @author aniefer
|
||||
*
|
||||
*/
|
||||
public abstract class CPPSpecialization extends PlatformObject implements ICPPSpecialization, ICPPInternalBinding {
|
||||
public abstract class CPPSpecialization extends PlatformObject
|
||||
implements ICPPSpecialization, ICPPInternalBinding {
|
||||
private IBinding specialized;
|
||||
private ICPPScope scope;
|
||||
protected ObjectMap argumentMap;
|
||||
|
||||
private IASTNode definition = null;
|
||||
private IASTNode [] declarations = null;
|
||||
private IASTNode definition;
|
||||
private IASTNode[] declarations;
|
||||
|
||||
public CPPSpecialization(IBinding specialized, ICPPScope scope, ObjectMap argumentMap) {
|
||||
this.specialized = specialized;
|
||||
|
@ -59,9 +59,11 @@ public abstract class CPPSpecialization extends PlatformObject implements ICPPSp
|
|||
public IBinding getSpecializedBinding() {
|
||||
return specialized;
|
||||
}
|
||||
|
||||
public IASTNode[] getDeclarations() {
|
||||
return declarations;
|
||||
}
|
||||
|
||||
public IASTNode getDefinition() {
|
||||
return definition;
|
||||
}
|
||||
|
@ -69,12 +71,14 @@ public abstract class CPPSpecialization extends PlatformObject implements ICPPSp
|
|||
public void addDefinition(IASTNode node) {
|
||||
definition = node;
|
||||
}
|
||||
|
||||
public void addDeclaration(IASTNode node) {
|
||||
if( declarations == null )
|
||||
if (declarations == null) {
|
||||
declarations = new IASTNode[] { node };
|
||||
else {
|
||||
} else {
|
||||
// keep the lowest offset declaration in [0]
|
||||
if( declarations.length > 0 && ((ASTNode)node).getOffset() < ((ASTNode)declarations[0]).getOffset() ){
|
||||
if (declarations.length > 0 &&
|
||||
((ASTNode) node).getOffset() < ((ASTNode) declarations[0]).getOffset()) {
|
||||
declarations = (IASTNode[]) ArrayUtil.prepend(IASTNode.class, declarations, node);
|
||||
} else {
|
||||
declarations = (IASTNode[]) ArrayUtil.append(IASTNode.class, declarations, node);
|
||||
|
@ -93,24 +97,31 @@ public abstract class CPPSpecialization extends PlatformObject implements ICPPSp
|
|||
public String getName() {
|
||||
return specialized.getName();
|
||||
}
|
||||
|
||||
public char[] getNameCharArray() {
|
||||
return specialized.getNameCharArray();
|
||||
}
|
||||
|
||||
public IScope getScope() {
|
||||
return scope;
|
||||
}
|
||||
|
||||
public String[] getQualifiedName() {
|
||||
return CPPVisitor.getQualifiedName(this);
|
||||
}
|
||||
|
||||
public char[][] getQualifiedNameCharArray() {
|
||||
return CPPVisitor.getQualifiedNameCharArray(this);
|
||||
}
|
||||
|
||||
public boolean isGloballyQualified() throws DOMException {
|
||||
return ((ICPPInternalBinding) specialized).isGloballyQualified();
|
||||
}
|
||||
|
||||
public ILinkage getLinkage() {
|
||||
return Linkage.CPP_LINKAGE;
|
||||
}
|
||||
|
||||
public ObjectMap getArgumentMap() {
|
||||
return argumentMap;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue