blob: 9404cc150530eb976319e4156ffa480510a6d71b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
/*******************************************************************************
* Copyright (c) 2006, 2008 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.lrparser.c99.bindings;
import org.eclipse.cdt.core.dom.ast.DOMException;
import org.eclipse.cdt.core.dom.ast.ICompositeType;
import org.eclipse.cdt.core.dom.ast.IField;
import org.eclipse.cdt.core.dom.ast.IScope;
public class C99Field extends C99Variable implements IC99Binding, IField, ITypeable {
private ICompositeType compositeTypeOwner;
public C99Field() {
}
public C99Field(String name) {
super(name);
}
public ICompositeType getCompositeTypeOwner() {
return compositeTypeOwner;
}
public void setCompositeTypeOwner(ICompositeType compositeTypeOwner) {
this.compositeTypeOwner = compositeTypeOwner;
}
public IScope getScope() {
try {
return compositeTypeOwner.getCompositeScope();
} catch (DOMException e) {
return null; // should never happen
}
}
}
|