[Bug 303523] LTTng/TMF udpates:
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf / src / org / eclipse / linuxtools / tmf / experiment / TmfExperimentContext.java
CommitLineData
8c8bf09f
ASL
1/*******************************************************************************
2 * Copyright (c) 2009, 2010 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 *******************************************************************************/
12
13package org.eclipse.linuxtools.tmf.experiment;
14
e31e01e8
FC
15import java.util.Vector;
16
17import org.eclipse.linuxtools.tmf.component.ITmfContext;
8c8bf09f 18import org.eclipse.linuxtools.tmf.event.TmfEvent;
8c8bf09f 19import org.eclipse.linuxtools.tmf.trace.ITmfTrace;
e31e01e8 20import org.eclipse.linuxtools.tmf.trace.TmfTraceContext;
8c8bf09f
ASL
21
22/**
23 * <b><u>TmfExperimentContext</u></b>
24 * <p>
e31e01e8 25 * Implement me. Please.
8c8bf09f 26 */
e31e01e8 27public class TmfExperimentContext implements ITmfContext, Cloneable {
8c8bf09f 28
e31e01e8
FC
29 private ITmfTrace[] fTraces = new ITmfTrace[0]; // The set of traces
30 private TmfTraceContext[] fContexts; // The set of trace contexts
31 private TmfEvent[] fEvents;
8c8bf09f 32
e31e01e8
FC
33 public TmfExperimentContext(Vector<ITmfTrace> traces) {
34 fTraces = traces.toArray(fTraces);
35 fContexts = new TmfTraceContext[fTraces.length];
8c8bf09f 36 fEvents = new TmfEvent[fTraces.length];
e31e01e8 37 }
8c8bf09f 38
e31e01e8
FC
39 public TmfExperimentContext clone() {
40 try {
41 return (TmfExperimentContext) super.clone();
42 } catch (CloneNotSupportedException e) {
43 e.printStackTrace();
8c8bf09f 44 }
e31e01e8 45 return null;
8c8bf09f
ASL
46 }
47
e31e01e8
FC
48 public ITmfTrace[] getTraces() {
49 return fTraces;
8c8bf09f
ASL
50 }
51
e31e01e8
FC
52 public TmfTraceContext[] getContexts() {
53 return fContexts;
8c8bf09f
ASL
54 }
55
e31e01e8
FC
56 public TmfTraceContext[] cloneContexts() {
57 TmfTraceContext[] contexts = new TmfTraceContext[fContexts.length];
8c8bf09f
ASL
58 for (int i = 0; i < fContexts.length; i++)
59 contexts[i] = fContexts[i].clone();
60 return contexts;
61 }
62
8c8bf09f
ASL
63 public TmfEvent[] getEvents() {
64 return fEvents;
65 }
66
8c8bf09f 67}
This page took 0.027306 seconds and 5 git commands to generate.