Commit | Line | Data |
---|---|---|
1d7e62f9 GB |
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 | ||
2bdf0193 | 13 | package org.eclipse.tracecompass.tmf.analysis.xml.core.model; |
1d7e62f9 | 14 | |
12685851 | 15 | import org.eclipse.jdt.annotation.Nullable; |
2bdf0193 AM |
16 | import org.eclipse.tracecompass.tmf.analysis.xml.core.module.IXmlStateSystemContainer; |
17 | import org.eclipse.tracecompass.tmf.core.event.ITmfEvent; | |
1d7e62f9 GB |
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 | |
0b563c20 JCK |
34 | * root quark, use {@link IXmlStateSystemContainer#ROOT_QUARK} to |
35 | * search the full attribute tree | |
36 | * @param scenarioInfo | |
37 | * The active scenario details. Or <code>null</code> if there is | |
38 | * no scenario. | |
1d7e62f9 | 39 | * @return the quark described by attribute or |
0b563c20 JCK |
40 | * {@link IXmlStateSystemContainer#ERROR_QUARK} if quark cannot be |
41 | * found | |
42 | * @since 2.0 | |
1d7e62f9 | 43 | */ |
0b563c20 | 44 | int getAttributeQuark(int startQuark, @Nullable TmfXmlScenarioInfo scenarioInfo); |
1d7e62f9 GB |
45 | |
46 | /** | |
47 | * This method gets the quark for this state attribute in the State System. | |
48 | * | |
49 | * Unless this attribute is a location, in which case the quark must exist, | |
50 | * the quark will be added to the state system if the state system is in | |
3a5f73a1 JCK |
51 | * builder mode. This state attribute path uses runtime data queried using |
52 | * the current event. | |
1d7e62f9 GB |
53 | * |
54 | * @param event | |
55 | * The current event being handled | |
56 | * @param startQuark | |
0b563c20 JCK |
57 | * root quark, use {@link IXmlStateSystemContainer#ROOT_QUARK} to |
58 | * search the full attribute tree | |
59 | * @param scenarioInfo | |
60 | * The active scenario details. Or <code>null</code> if there is | |
61 | * no scenario. | |
1d7e62f9 | 62 | * @return the quark described by attribute or |
0b563c20 JCK |
63 | * {@link IXmlStateSystemContainer#ERROR_QUARK} if quark cannot be |
64 | * found | |
65 | * @since 2.0 | |
1d7e62f9 | 66 | */ |
0b563c20 | 67 | int getAttributeQuark(@Nullable ITmfEvent event, int startQuark, @Nullable TmfXmlScenarioInfo scenarioInfo); |
1d7e62f9 | 68 | } |