ctf: better enum and variant verification
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core / src / org / eclipse / linuxtools / ctf / core / event / types / IDeclaration.java
1 /*******************************************************************************
2 * Copyright (c) 2011, 2013 Ericsson, Ecole Polytechnique de Montreal and others
3 *
4 * All rights reserved. This program and the accompanying materials are made
5 * available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors: Matthew Khouzam - Initial API and implementation
10 * Contributors: Simon Marchi - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.ctf.core.event.types;
14
15 /**
16 * A CTF data type declaration.
17 *
18 * An example: <br>
19 * int i = 0; <br>
20 * <b>int</b> is the declaration.<br>
21 * <b>i</b> is the definition.<br>
22 * <b>0</b> is the value assigned to the definition, not the declaration.<br>
23 *
24 * @version 1.0
25 * @author Matthew Khouzam
26 * @author Simon Marchi
27 */
28 public interface IDeclaration {
29
30 /**
31 * Create a definition from this declaration
32 *
33 * @param definitionScope
34 * the definition scope, the parent where the definition will be
35 * placed
36 * @param fieldName
37 * the name of the definition
38 * @return a reference to the definition
39 */
40 Definition createDefinition(IDefinitionScope definitionScope, String fieldName);
41
42 /**
43 * The minimum alignment. if the field is 32 bits, the definition will pad
44 * all the data up to (position%32==0)
45 *
46 * @return the alignment in bits
47 */
48 long getAlignment();
49 }
This page took 0.030927 seconds and 5 git commands to generate.