4956e0db84e556f36d468fb604f22f44af12b5ab
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core / src / org / eclipse / linuxtools / ctf / core / event / IEventDeclaration.java
1 /*******************************************************************************
2 * Copyright (c) 2011-2013 Ericsson, Ecole Polytechnique de Montreal and others
3 *
4 * All rights reserved. This program and the accompanying materials are made
5 * 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: Matthew Khouzam - Initial API and implementation
10 *******************************************************************************/
11
12 package org.eclipse.linuxtools.ctf.core.event;
13
14 import java.util.Set;
15
16 import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
17 import org.eclipse.linuxtools.ctf.core.trace.Stream;
18 import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
19
20 /**
21 * Representation of one type of event. A bit like "int" or "long" but for trace
22 * events.
23 *
24 * @author Matthew Khouzam
25 * @since 2.0
26 */
27 public interface IEventDeclaration {
28
29 /**
30 * Creates an instance of EventDefinition corresponding to this declaration.
31 *
32 * @param streamInputReader
33 * The StreamInputReader for which this definition is created.
34 * @return A new EventDefinition.
35 */
36 EventDefinition createDefinition(StreamInputReader streamInputReader);
37
38 /**
39 * Gets the name of an event declaration
40 *
41 * @return the name
42 */
43 String getName();
44
45 /**
46 * Gets the fields of an event declaration
47 *
48 * @return fields the fields in {@link StructDeclaration} format
49 */
50 StructDeclaration getFields();
51
52 /**
53 * Gets the context of an event declaration
54 *
55 * @return context the fields in {@link StructDeclaration} format
56 */
57 StructDeclaration getContext();
58
59 /**
60 * Gets the id of an event declaration
61 *
62 * @return The EventDeclaration ID
63 */
64 Long getId();
65
66 /**
67 * Gets the {@link Stream} of an event declaration
68 *
69 * @return the stream
70 * @since 2.0
71 */
72 Stream getStream();
73
74 /**
75 * What is the log level of this event?
76 *
77 * @return the log level.
78 * @since 2.0
79 */
80 long getLogLevel();
81
82 /**
83 * Get the {@link Set} of names of the custom CTF attributes.
84 *
85 * @return The set of custom attributes
86 * @since 2.0
87 */
88 Set<String> getCustomAttributes();
89
90 /**
91 * Get the value of a given CTF attribute.
92 *
93 * @param key
94 * The CTF attribute name
95 * @return the CTF attribute
96 * @since 2.0
97 */
98 String getCustomAttribute(String key);
99
100 }
This page took 0.033904 seconds and 4 git commands to generate.