ctf.core: Replace all switch with if-then-else in metadata parsing
Sets the groundwork for future String based lookups rather than index. With CTF2.0 and JSON based metadata, the order of the arguments is no longer guaranteed.
This code is in the slow path, it is run once during file open, and thus performance impacts are not really a concern.
[changed]: Remove all switch statements and replace with if-else statements to set up for json text parsing
Change-Id: I252cca9ebfed2bacae0dd5a86e29f3f9ca6a5fad Signed-off-by: Sehr Moosabhoy <sehr.moosabhoy@ericsson.com> Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/202520 Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org> Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>