tmf: Use tabs in statistics view for each traces
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.jni / src / org / eclipse / linuxtools / internal / lttng / jni / common / Jni_C_Pointer_And_Library_Id.java
1 package org.eclipse.linuxtools.internal.lttng.jni.common;
2
3 public class Jni_C_Pointer_And_Library_Id extends Jni_C_Pointer {
4
5 // *** Library Id
6 // Needed to know which library we need to make our functions call in case several are loaded
7 // This make possible to use several different trace version at the same time
8 private int libraryId = -1;
9
10 /**
11 * Default constructor.<p>
12 *
13 * Note : Pointer will be set to a 64bits "NULL" and Id -1.
14 */
15 public Jni_C_Pointer_And_Library_Id() {
16 super();
17 libraryId = -1;
18 }
19
20 /**
21 * Constructor with parameters for 64bits pointers and library handle id.
22 *
23 * @param newPtr long-converted (64 bits) C pointer.
24 * @param newHandle a valid library id as int
25 */
26 public Jni_C_Pointer_And_Library_Id(int newId, long newPtr) {
27 super(newPtr);
28 libraryId = newId;
29 }
30
31 /**
32 * Constructor with parameters for 32bits pointers and library handle id.
33 *
34 * @param newPtr int-converted (32 bits) C pointer.
35 * @param newHandle a valid library id as int
36 */
37 public Jni_C_Pointer_And_Library_Id(int newId, int newPtr) {
38 super(newPtr);
39 libraryId = newId;
40 }
41
42 /**
43 * Copy constructor.<p>
44 *
45 * @param oldPointerAndId The old object to copy from.
46 */
47 public Jni_C_Pointer_And_Library_Id(Jni_C_Pointer_And_Library_Id oldPointerAndId) {
48 super(oldPointerAndId.ptr);
49 libraryId = oldPointerAndId.libraryId;
50 }
51
52 /**
53 * Get the library handle id currently in use.<p>
54 * Id is used to tell the C which version of the functions to call.<p>
55 *
56 * @return The current id
57 */
58 public int getLibraryId() {
59 return libraryId;
60 }
61
62 /**
63 * Set a new library id.<p>
64 * Id is used to tell the C which version of the functions to call.<p>
65 *
66 * @param newHandleId The new Id to use (must be a valid id for the C library).
67 */
68 public void setLibraryId(int newId) {
69 this.libraryId = newId;
70 }
71 }
This page took 0.032432 seconds and 5 git commands to generate.