1
/*******************************************************************************
2
* Copyright (c) 2004, 2009 IBM Corporation and others.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* Doug Schaefer (IBM) - Initial API and implementation
10
*******************************************************************************/
11
package org.eclipse.cdt.core.dom.ast;
14
* A composite type specifier represents a ocmposite structure (contains
17
* @noextend This interface is not intended to be extended by clients.
18
* @noimplement This interface is not intended to be implemented by clients.
20
public interface IASTCompositeTypeSpecifier extends IASTDeclSpecifier , IASTNameOwner, IASTDeclarationListOwner {
23
* <code>TYPE_NAME</code> represents the relationship between an
24
* <code>IASTCompositeTypeSpecifier</code> and its <code>IASTName</code>.
26
public static final ASTNodeProperty TYPE_NAME = new ASTNodeProperty(
27
"IASTCompositeTypeSpecifier.TYPE_NAME - IASTName for IASTCompositeTypeSpecifier"); //$NON-NLS-1$
30
* <code>MEMBER_DECLARATION</code> represents the relationship between an
31
* <code>IASTCompositeTypeSpecifier</code> and its nested<code>IASTDeclaration</code>s.
33
public static final ASTNodeProperty MEMBER_DECLARATION = new ASTNodeProperty(
34
"IASTCompositeTypeSpecifier.MEMBER_DECLARATION - Nested IASTDeclaration for IASTCompositeTypeSpecifier"); //$NON-NLS-1$
37
* Get the type (key) of this composite specifier.
39
* @return key for this type
44
* <code>k_struct</code> represents 'struct' in C & C++
46
public static final int k_struct = 1;
49
* <code>k_union</code> represents 'union' in C & C++
51
public static final int k_union = 2;
54
* <code>k_last</code> allows for subinterfaces to continue enumerating
57
public static final int k_last = k_union;
60
* Set the type (key) of this composite specifier.
64
public void setKey(int key);
67
* Return the name for this composite type. If this is an anonymous type,
68
* this will return an empty name.
70
* @return the name of the type
72
public IASTName getName();
75
* Set the name for this composite type.
79
public void setName(IASTName name);
82
* Returns a list of member declarations.
84
* @return List of IASTDeclaration
86
public IASTDeclaration[] getMembers();
89
* Add a member declaration.
93
public void addMemberDeclaration(IASTDeclaration declaration);
96
* Get the scope that this interface eludes to in the logical tree.
99
public IScope getScope();
104
public IASTCompositeTypeSpecifier copy();