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 | ||
13 | package org.eclipse.linuxtools.tmf.analysis.xml.core.model; | |
14 | ||
15 | import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlStateSystemContainer; | |
16 | import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; | |
17 | ||
18 | /** | |
19 | * Interface that describe a state attribute defined in an XML element | |
20 | * | |
21 | * @author Geneviève Bastien | |
22 | */ | |
23 | public interface ITmfXmlStateAttribute { | |
24 | ||
25 | /** | |
26 | * This method gets the quark for this state attribute in the State System. | |
27 | * | |
28 | * Unless this attribute is a location, in which case the quark must exist, | |
29 | * the quark will be added to the state system if the state system is in | |
30 | * builder mode. | |
31 | * | |
32 | * @param startQuark | |
33 | * root quark, use {@link IXmlStateSystemContainer#ROOT_QUARK} to search | |
34 | * the full attribute tree | |
35 | * @return the quark described by attribute or | |
36 | * {@link IXmlStateSystemContainer#ERROR_QUARK} if quark cannot be found | |
37 | */ | |
38 | int getAttributeQuark(int startQuark); | |
39 | ||
40 | /** | |
41 | * This method gets the quark for this state attribute in the State System. | |
42 | * | |
43 | * Unless this attribute is a location, in which case the quark must exist, | |
44 | * the quark will be added to the state system if the state system is in | |
45 | * builder mode. | |
46 | * | |
47 | * @param event | |
48 | * The current event being handled | |
49 | * @param startQuark | |
50 | * root quark, use {@link IXmlStateSystemContainer#ROOT_QUARK} to search | |
51 | * the full attribute tree | |
52 | * @return the quark described by attribute or | |
53 | * {@link IXmlStateSystemContainer#ERROR_QUARK} if quark cannot be found | |
54 | */ | |
55 | int getAttributeQuark(ITmfEvent event, int startQuark); | |
56 | } |