Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 87557db824197f8dd739a58f3bb6ba64c4cffa54 (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) 2000, 2005 QNX Software Systems 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:
 *     QNX Software Systems - Initial API and implementation
 *******************************************************************************/

package org.eclipse.cdt.utils.debug;


/**
 * DebugStructType
 *  
 */
public class DebugStructType extends DebugType {

	String name;
	int size;
	boolean isUnion;
	final static DebugField[] EMPTY_FIELDS = new DebugField[0];
	DebugField[] fields;

	/**
	 *  
	 */
	public DebugStructType(String name, int size, boolean union) {
		this.name = name;
		this.size = size;
		this.isUnion = union;
		fields = EMPTY_FIELDS;
	}

	public int getSize() {
		return size;
	}

	public String getName() {
		return name;
	}

	public boolean isUnion() {
		return isUnion;
	}

	public DebugField[] getDebugFields() {
		return fields;
	}

	public void addField(DebugField field) {
		DebugField[] fs = new DebugField[fields.length + 1];
		System.arraycopy(fields, 0, fs, 0, fields.length);
		fs[fields.length] = field;
		fields = fs;
	}

}

Back to the top