ctf: Assign a CtfTmfEventFactory to each trace
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 4 Sep 2015 21:32:13 +0000 (17:32 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 23 Oct 2015 20:09:01 +0000 (16:09 -0400)
commit8e3764747b89563f868311b458e148d50a92580e
treedbc8ef61d2c27c232c284977c87d5ac55716125f
parent03c962176b077efdc05dc436b5d926eff1669a25
ctf: Assign a CtfTmfEventFactory to each trace

A singleton factory means we cannot possibly extend CtfTmfEvent,
because the sole factory can only generate CtfTmfEvent objects.

To rectify this, we can turn the factory into a standard non-static
class, and have each trace take ownership of its event factory. This
means that sub-classes of CtfTmfTrace will be able to provide their
own extension of CtfTmfEventFactory if they want to generate other
event types.

Bug: 476679
Change-Id: I66e9cd49044edd2a77276d779d0f563a2e20d520
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/56191
Reviewed-by: Hudson CI
ctf/org.eclipse.tracecompass.tmf.ctf.core.tests/src/org/eclipse/tracecompass/tmf/ctf/core/tests/event/CtfTmfEventTest.java
ctf/org.eclipse.tracecompass.tmf.ctf.core/src/org/eclipse/tracecompass/internal/tmf/ctf/core/trace/iterator/CtfIterator.java
ctf/org.eclipse.tracecompass.tmf.ctf.core/src/org/eclipse/tracecompass/tmf/ctf/core/event/CtfTmfEvent.java
ctf/org.eclipse.tracecompass.tmf.ctf.core/src/org/eclipse/tracecompass/tmf/ctf/core/event/CtfTmfEventFactory.java
ctf/org.eclipse.tracecompass.tmf.ctf.core/src/org/eclipse/tracecompass/tmf/ctf/core/trace/CtfTmfTrace.java
This page took 0.02471 seconds and 5 git commands to generate.