1 /*******************************************************************************
2 * Copyright (c) 2014 École Polytechnique de Montréal
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
10 * Geneviève Bastien - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.internal
.tmf
.analysis
.xml
.core
.model
;
15 import java
.util
.List
;
17 import org
.eclipse
.jdt
.annotation
.Nullable
;
18 import org
.eclipse
.tracecompass
.statesystem
.core
.exceptions
.AttributeNotFoundException
;
19 import org
.eclipse
.tracecompass
.statesystem
.core
.exceptions
.StateValueTypeException
;
20 import org
.eclipse
.tracecompass
.statesystem
.core
.exceptions
.TimeRangeException
;
21 import org
.eclipse
.tracecompass
.statesystem
.core
.statevalue
.ITmfStateValue
;
22 import org
.eclipse
.tracecompass
.tmf
.core
.event
.ITmfEvent
;
25 * Interface that describe operations on a state value described in an XML
28 * @author Geneviève Bastien
30 public interface ITmfXmlStateValue
{
33 * Get the current {@link ITmfStateValue} of this state value for an event.
34 * It does not increment the value and does not any other processing of the
38 * The current event or <code>null</code> if no event is
41 * The active scenario details. Or <code>null</code> if there is
43 * @return the {@link ITmfStateValue}
44 * @throws AttributeNotFoundException
45 * May be thrown by the state system during the query
47 ITmfStateValue
getValue(@Nullable ITmfEvent event
, @Nullable TmfXmlScenarioInfo scenarioInfo
) throws AttributeNotFoundException
;
50 * Get the value of the event field that is the path of this state value
54 * @return the value of the event field
56 ITmfStateValue
getEventFieldValue(ITmfEvent event
);
59 * Get the list of state attributes, the path to the state value
61 * @return the list of Attribute to have the path in the State System
63 List
<ITmfXmlStateAttribute
> getAttributes();
66 * Handles an event, by setting the value of the attribute described by the
67 * state attribute path in the state system.
70 * The event to process
72 * The active scenario details. Or <code>null</code> if there is
74 * @throws AttributeNotFoundException
75 * Pass through the exception it received
76 * @throws TimeRangeException
77 * Pass through the exception it received
78 * @throws StateValueTypeException
79 * Pass through the exception it received
81 void handleEvent(ITmfEvent event
, @Nullable TmfXmlScenarioInfo scenarioInfo
) throws AttributeNotFoundException
, StateValueTypeException
, TimeRangeException
;