Commit | Line | Data |
---|---|---|
21fb02fa | 1 | /******************************************************************************* |
ed902a2b | 2 | * Copyright (c) 2011, 2014 Ericsson, Ecole Polytechnique de Montreal and others |
21fb02fa MK |
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 | ||
f357bcd4 | 12 | package org.eclipse.tracecompass.ctf.core.event.types; |
21fb02fa | 13 | |
a4fa4e36 | 14 | import org.eclipse.jdt.annotation.NonNull; |
f357bcd4 | 15 | import org.eclipse.tracecompass.ctf.core.event.scope.IDefinitionScope; |
a4fa4e36 | 16 | |
21fb02fa MK |
17 | /** |
18 | * Simple Datatype definition is a datatype that allows the addition of | |
19 | * getIntegerValue and getStringValue to a class. | |
20 | * | |
21 | * @author Matthew Khouzam | |
21fb02fa MK |
22 | */ |
23 | public abstract class SimpleDatatypeDefinition extends Definition { | |
24 | ||
8de0528f AM |
25 | /** |
26 | * Create a new SimpleDatatypeDefinition | |
27 | * | |
a4fa4e36 MK |
28 | * @param declaration |
29 | * definition's declaration | |
8de0528f AM |
30 | * @param definitionScope |
31 | * The scope of this definition | |
32 | * @param fieldName | |
33 | * The name of the field matching this definition in the parent | |
34 | * scope | |
35 | */ | |
a4fa4e36 MK |
36 | public SimpleDatatypeDefinition(@NonNull IDeclaration declaration, IDefinitionScope definitionScope, |
37 | @NonNull String fieldName) { | |
38 | super(declaration, definitionScope, fieldName); | |
21fb02fa MK |
39 | } |
40 | ||
41 | /** | |
a511da0d | 42 | * Gets the value in integer form |
21fb02fa MK |
43 | * |
44 | * @return the integer in a Long, can be null | |
45 | */ | |
46 | public Long getIntegerValue() { | |
47 | return null; | |
48 | } | |
49 | ||
50 | /** | |
a511da0d | 51 | * Gets the value in string form |
21fb02fa MK |
52 | * |
53 | * @return the integer in a String, can be null | |
54 | */ | |
55 | public String getStringValue() { | |
56 | return null; | |
57 | } | |
58 | ||
59 | } |