tmf: Remove source and reference from ITmfEvent
[deliverable/tracecompass.git] / org.eclipse.tracecompass.gdbtrace.core / src / org / eclipse / tracecompass / internal / gdbtrace / core / event / GdbTraceEvent.java
CommitLineData
6de2f761
PT
1/*******************************************************************************
2 * Copyright (c) 2011, 2013 Ericsson
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 * Francois Chouinard - Initial API and implementation
11 * Patrick Tasse - Updated for TMF 2.0
12 *******************************************************************************/
13
04c0d7d3 14package org.eclipse.tracecompass.internal.gdbtrace.core.event;
6de2f761 15
04c0d7d3 16import org.eclipse.tracecompass.internal.gdbtrace.core.trace.GdbTrace;
2bdf0193
AM
17import org.eclipse.tracecompass.tmf.core.event.ITmfEventType;
18import org.eclipse.tracecompass.tmf.core.event.TmfEvent;
19import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
0c7471fb 20import org.eclipse.tracecompass.tmf.core.trace.ITmfContext;
6de2f761
PT
21
22/**
23 * GDB Trace implementation of TmfEvent
24 * @author Francois Chouinard
25 */
26public class GdbTraceEvent extends TmfEvent {
27
e1de2fd4
AM
28 // ------------------------------------------------------------------------
29 // Fields
30 // ------------------------------------------------------------------------
31
32 private final String fSource;
33 private final String fReference;
34
6de2f761
PT
35 // ------------------------------------------------------------------------
36 // Constructors
37 // ------------------------------------------------------------------------
38
39 /**
40 * Default constructor
41 */
42 public GdbTraceEvent() {
e1de2fd4
AM
43 super(null, ITmfContext.UNKNOWN_RANK, null, null, null);
44 fSource = null;
45 fReference = null;
6de2f761
PT
46 }
47
48 /**
49 * Full constructor
6db12af8
AM
50 *
51 * @param trace
52 * the parent trace
53 * @param timestamp
54 * the event timestamp
55 * @param source
56 * the event source
57 * @param type
58 * the event type
59 * @param content
60 * the event content
61 * @param reference
62 * the event reference
6de2f761
PT
63 */
64 public GdbTraceEvent(GdbTrace trace, ITmfTimestamp timestamp, String source,
6db12af8 65 ITmfEventType type, GdbTraceEventContent content, String reference) {
e1de2fd4
AM
66 super(trace, ITmfContext.UNKNOWN_RANK, timestamp, type, content);
67 fSource = source;
68 fReference = reference;
69 }
70
71 /**
72 * Return the event's source
73 *
74 * @return The event source
75 */
76 public String getSource() {
77 return fSource;
78 }
79
80 /**
81 * Return the event's reference
82 *
83 * @return The event reference
84 */
85 public String getReference() {
86 return fReference;
6de2f761
PT
87 }
88
6db12af8
AM
89 @Override
90 public GdbTraceEventContent getContent() {
91 /* We only allow GdbTraceEventContent at the constructor */
92 return (GdbTraceEventContent) super.getContent();
93 }
94
6de2f761 95}
This page took 0.046011 seconds and 5 git commands to generate.