tmf: Expose getStateSystem() up to ITmfTrace
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 27 Sep 2012 18:57:11 +0000 (14:57 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 5 Oct 2012 19:46:06 +0000 (15:46 -0400)
The default implementation in TmfTrace will not provide any
state system for now, sub-classes need to specify their own.

Change-Id: I9239ac69c5ae20cea1bbe54b34260e829bd84465
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/7965

org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java

index 0cd83b23b614c1d5aa2ca216bc23b566693ce4e0..b8a36b3ab5b4aebd18672869ac2c80b1b3163840 100644 (file)
@@ -281,11 +281,9 @@ public class CtfTmfTrace extends TmfTrace implements ITmfEventParser {
     }
 
     /**
-     * Method getStateSystem.
-     *
-     * @return IStateSystemQuerier
      * @since 2.0
      */
+    @Override
     public ITmfStateSystem getStateSystem() {
         return this.ss;
     }
index ec087bea23f05da4a3bf74fef847924f563fe7ee..e6b862de58c2b1d2d7c164c1fec89ce876231e44 100644 (file)
@@ -20,6 +20,7 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
 
 /**
  * The event stream structure in TMF. In its basic form, a trace has:
@@ -171,6 +172,12 @@ public interface ITmfTrace extends ITmfDataProvider {
      */
     public int getCacheSize();
 
+    /**
+     * @return The state system that is associated with this trace
+     * @since 2.0
+     */
+    public ITmfStateSystem getStateSystem();
+
     // ------------------------------------------------------------------------
     // Trace characteristics getters
     // ------------------------------------------------------------------------
index 66a3e157777f638c669a5ac34819797b49c62e35..dcbf0dbc7c82067fc62114a61367039b6b517c94 100644 (file)
@@ -25,6 +25,7 @@ import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
 
 /**
  * Abstract implementation of ITmfTrace.
@@ -313,6 +314,18 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace {
         return fParser;
     }
 
+    /**
+     * @since 2.0
+     */
+    @Override
+    public ITmfStateSystem getStateSystem() {
+        /*
+         * By default, no state system is used. Sub-classes can specify their
+         * own behaviour.
+         */
+        return null;
+    }
+
     // ------------------------------------------------------------------------
     // ITmfTrace - Trace characteristics getters
     // ------------------------------------------------------------------------
This page took 0.026647 seconds and 5 git commands to generate.