1 /*******************************************************************************
2 * Copyright (c) 2011-2013 Ericsson, Ecole Polytechnique de Montreal and others
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
9 * Contributors: Matthew Khouzam - Initial API and implementation
10 *******************************************************************************/
12 package org
.eclipse
.linuxtools
.ctf
.core
.event
;
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
;
21 * Representation of one type of event. A bit like "int" or "long" but for trace
24 * @author Matthew Khouzam
27 public interface IEventDeclaration
{
30 * Creates an instance of EventDefinition corresponding to this declaration.
32 * @param streamInputReader
33 * The StreamInputReader for which this definition is created.
34 * @return A new EventDefinition.
36 EventDefinition
createDefinition(StreamInputReader streamInputReader
);
39 * Gets the name of an event declaration
46 * Gets the fields of an event declaration
48 * @return fields the fields in {@link StructDeclaration} format
50 StructDeclaration
getFields();
53 * Gets the context of an event declaration
55 * @return context the fields in {@link StructDeclaration} format
57 StructDeclaration
getContext();
60 * Gets the id of an event declaration
62 * @return The EventDeclaration ID
67 * Gets the {@link Stream} of an event declaration
75 * What is the log level of this event?
77 * @return the log level.
83 * Get the {@link Set} of names of the custom CTF attributes.
85 * @return The set of custom attributes
88 Set
<String
> getCustomAttributes();
91 * Get the value of a given CTF attribute.
94 * The CTF attribute name
95 * @return the CTF attribute
98 String
getCustomAttribute(String key
);