Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 2b2fbf6a96f8a8f24ee324f119a0eb1b3e5b98cd (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
/*******************************************************************************
 *  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.parser.upc.ast;

import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTLayoutQualifier;
import org.eclipse.cdt.internal.core.dom.parser.ASTNode;

@SuppressWarnings("restriction")
public class UPCASTLayoutQualifier extends ASTNode implements IUPCASTLayoutQualifier {

	
	private boolean isPure;
	private boolean isIndefinite;
	private IASTExpression blockSizeExpression;
	
	public UPCASTLayoutQualifier copy() {
		UPCASTLayoutQualifier copy = new UPCASTLayoutQualifier();
		copy.isPure = isPure;
		copy.isIndefinite = isIndefinite;
		copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy());
		copy.setOffsetAndLength(this);
		return copy;
	}
	
	public IASTExpression getBlockSizeExpression() {
		return blockSizeExpression;
	}

	
	public boolean isIndefiniteBlockAllocation() {
		return isIndefinite;
	}

	
	public boolean isPureBlockAllocation() {
		return isPure;
	}

	
	public void setBlockSizeExpression(IASTExpression expr) {
		this.blockSizeExpression = expr;
	}

	
	public void setIndefiniteBlockAllocation(boolean allocation) {
		this.isIndefinite = allocation;
		
	}

	
	public void setPureBlockAllocation(boolean allocation) {
		this.isPure = allocation;
	}

	

}

Back to the top