DESCRIPTION

Updated Enum handling for a CTFTmfEventField

This change provides a way to extract the Enum long value and Enum
value name from the CTF EnumDefinition and store it in a
CtfTmfEventField object. Before this change the CtfTmfEventField
only contained the Enum value name.

For this change, the class Pair<A,B> which was part of the legacy
LTTng core is now integrated in TMF core.

Change-Id: I948d3b9bdde83d5eda7c8397c1b9494e15f7706a
Signed-off-by: Ricky Reeves xxx@xxx.xxx


COMMENTS

author: Ricky Reeves
date: 2012-08-21 17:53:14.000000000

Uploaded patch set 3.

-------------------------------------
author: Ricky Reeves
date: 2012-08-21 17:54:56.000000000

Patch Set 3:

Make sure that CtfTmfEnumFlield does a deep copy of CtfEnumPair in constructor

-------------------------------------
author: Luciana Barry
date: 2012-08-21 17:58:28.000000000

Patch Set 3: Verified; Looks good to me, approved; IP review completed



-------------------------------------
author: Braxton Mccarthy
date: 2012-08-21 18:02:09.000000000

Patch Set 3: I would prefer that you didn't submit this

(1 inline comment)



Line:78, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/Pair.java -> Ouch, that's a bit hard to get one's head around ;)

Shouldn't there be insanceof checks for A and B too? like,

if (other instanceof Pair) {

  if ((otherPair.getFirst() instanceof A.getClass()) && (otherPair.getSecond() instanceof B.getClass())) {

    return (A.equals(otherPair.getFirst()) && B.equals(otherPair.getSecond()));

  }

}

return false;

-------------------------------------
author: Braxton Mccarthy
date: 2012-08-21 18:08:28.000000000

Patch Set 3: No score

In fact it's not that important, the .equals() normally do "instanceof" checks. It's more an aesthetic comment...

-------------------------------------
author: Braxton Mccarthy
date: 2012-08-21 18:10:58.000000000

Patch Set 3: (1 inline comment)



Line:78, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/Pair.java -> I think,

if (other instanceof Pair) {

  return (A.equals(otherPair.getFirst()) && B.equals(otherPair.getSecond()));

}

return false;

should be enough.

-------------------------------------
