blob: 42c4aee37264249cfa38e38f91009d6740592753 (
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
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/*******************************************************************************
* Copyright (c) 2004, 2010 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 - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast;
/**
* Interface for all composite types: classes, structs or unions.
*
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICompositeType extends IBinding, IType {
public static final int k_struct = IASTCompositeTypeSpecifier.k_struct;
public static final int k_union = IASTCompositeTypeSpecifier.k_union;
/**
* Returns the type of the composite, {@link #k_struct}, {@link #k_union},
* or {@link org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#k_class}.
*/
public int getKey();
/**
* Returns whether the type is anonymous or not. A type for which objects or
* pointers are declared is not considered an anonymous type.
* <pre>
* struct Outer {
* struct {int a;}; // anonymous
* struct {int b;} c; // not anonymous
* }
* </pre>
* @since 5.1
*/
boolean isAnonymous();
/**
* Returns the fields for this type.
*
* @return List of IField
*/
public IField[] getFields();
/**
* Returns the field that matches name, or <code>null</code> if there is no such field.
*
* @param name
*/
public IField findField(String name);
/**
* Returns the IScope object that is associated with this composite type.
*/
public IScope getCompositeScope();
}
|