a5b584660a579ee3eae011444b592ab89fdda118
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.analysis.xml.core / src / org / eclipse / tracecompass / tmf / analysis / xml / core / model / ITmfXmlStateAttribute.java
1 /*******************************************************************************
2 * Copyright (c) 2014 École Polytechnique de Montréal
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made 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:
10 * Geneviève Bastien - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.tracecompass.tmf.analysis.xml.core.model;
14
15 import org.eclipse.jdt.annotation.Nullable;
16 import org.eclipse.tracecompass.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
17 import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
18
19 /**
20 * Interface that describe a state attribute defined in an XML element
21 *
22 * @author Geneviève Bastien
23 */
24 public interface ITmfXmlStateAttribute {
25
26 /**
27 * This method gets the quark for this state attribute in the State System.
28 *
29 * Unless this attribute is a location, in which case the quark must exist,
30 * the quark will be added to the state system if the state system is in
31 * builder mode.
32 *
33 * @param startQuark
34 * root quark, use {@link IXmlStateSystemContainer#ROOT_QUARK} to search
35 * the full attribute tree
36 * @return the quark described by attribute or
37 * {@link IXmlStateSystemContainer#ERROR_QUARK} if quark cannot be found
38 */
39 int getAttributeQuark(int startQuark);
40
41 /**
42 * This method gets the quark for this state attribute in the State System.
43 *
44 * Unless this attribute is a location, in which case the quark must exist,
45 * the quark will be added to the state system if the state system is in
46 * builder mode.
47 *
48 * @param event
49 * The current event being handled
50 * @param startQuark
51 * root quark, use {@link IXmlStateSystemContainer#ROOT_QUARK} to search
52 * the full attribute tree
53 * @return the quark described by attribute or
54 * {@link IXmlStateSystemContainer#ERROR_QUARK} if quark cannot be found
55 */
56 int getAttributeQuark(@Nullable ITmfEvent event, int startQuark);
57 }
This page took 0.033617 seconds and 4 git commands to generate.