blob: 422a5249e11e8908daabdf1dfba965eb9e942188 (
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
/*******************************************************************************
* Copyright (c) 2004, 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 Rational Software - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast;
/**
* This interface represents enumerations in C and C++.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwner {
/**
* This interface represents an enumerator member of an enum specifier.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTEnumerator extends IASTNode, IASTNameOwner {
/**
* Empty array (constant).
*/
public static final IASTEnumerator[] EMPTY_ENUMERATOR_ARRAY = new IASTEnumerator[0];
/**
* <code>ENUMERATOR_NAME</code> describes the relationship between
* <code>IASTEnumerator</code> and <code>IASTName</code>.
*/
public static final ASTNodeProperty ENUMERATOR_NAME = new ASTNodeProperty(
"IASTEnumerator.ENUMERATOR_NAME - IASTName for IASTEnumerator"); //$NON-NLS-1$
/**
* Set the enumerator's name.
*
* @param name
*/
public void setName(IASTName name);
/**
* Get the enumerator's name.
*
* @return <code>IASTName</code>
*/
public IASTName getName();
/**
* <code>ENUMERATOR_VALUE</code> describes the relationship between
* <code>IASTEnumerator</code> and <code>IASTExpression</code>.
*/
public static final ASTNodeProperty ENUMERATOR_VALUE = new ASTNodeProperty(
"IASTEnumerator.ENUMERATOR_VALUE - IASTExpression (value) for IASTEnumerator"); //$NON-NLS-1$
/**
* Set enumerator value.
*
* @param expression
*/
public void setValue(IASTExpression expression);
/**
* Get enumerator value.
*
* @return <code>IASTExpression</code> value
*/
public IASTExpression getValue();
/**
* @since 5.1
*/
public IASTEnumerator copy();
}
/**
* <code>ENUMERATOR</code> describes the relationship between
* <code>IASTEnumerationSpecifier</code> and the nested
* <code>IASTEnumerator</code>s.
*/
public static final ASTNodeProperty ENUMERATOR = new ASTNodeProperty(
"IASTEnumerationSpecifier.ENUMERATOR - nested IASTEnumerator for IASTEnumerationSpecifier"); //$NON-NLS-1$
/**
* Add an enumerator.
*
* @param enumerator
* <code>IASTEnumerator</code>
*/
public void addEnumerator(IASTEnumerator enumerator);
/**
* Get enumerators.
*
* @return <code>IASTEnumerator []</code> array
*/
public IASTEnumerator[] getEnumerators();
/**
* <code>ENUMERATION_NAME</code> describes the relationship between
* <code>IASTEnumerationSpecifier</code> and its <code>IASTName</code>.
*/
public static final ASTNodeProperty ENUMERATION_NAME = new ASTNodeProperty(
"IASTEnumerationSpecifier.ENUMERATION_NAME - IASTName for IASTEnumerationSpecifier"); //$NON-NLS-1$
/**
* Set the enum's name.
*
* @param name
*/
public void setName(IASTName name);
/**
* Get the enum's name.
*/
public IASTName getName();
/**
* @since 5.1
*/
public IASTEnumerationSpecifier copy();
}
|