Add `ctf::src::Ctf1MetadataStreamParser` class (TSDL)
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 23 Aug 2022 13:50:13 +0000 (09:50 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 23 Aug 2022 16:06:16 +0000 (12:06 -0400)
commit8adbf88f076e750c7579424f1a370ae4b980d8f2
treeb56b8af2223a0045553dcba60af3ff262f908db9
parent853d1f79ccd44ab92faf9f80d8048c477890967b
Add `ctf::src::Ctf1MetadataStreamParser` class (TSDL)

This patch:

* Adds the `ctf::src::MetadataStreamParser` abstract base class
  to have a common base for CTF 1 and CTF 2 metadata stream parsers.

  Parse a metadata stream section with parseSection() (defers to the
  virtual _parseSection() method).

  Get the resulting, current trace class and metadata stream UUID
  with traceCls() and metadataStreamUuid().

  The constructor accepts an optional self component pointer so that
  parseSection() calls finalizeTraceCls() after calling the
  version-specific _parseSection().

* Adds the `ctf::src::Ctf1MetadataStreamParser` class which is a
  concrete TSDL metadata stream parser inheriting
  `ctf::src::MetadataStreamParser`.

  parseSection() requires one or more complete root blocks of TSDL
  contents.

  `ctf::src::Ctf1MetadataStreamParser` also implements the static
  ctf::src::Ctf1MetadataStreamParser::parse() which considers a whole
  metadata stream. While this static method currently doesn't add
  anything to creating a parser and calling parseSection() once, it
  could eventually contain more validation knowing that the metadata
  stream was completely parsed.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I55e0f2f05d64a0acc5949029e315aeefae424dda
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8000
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I24e175447f759220de5943ccb49c7888a5934ce5
src/plugins/ctf/common/src/metadata/tsdl/Makefile.am
src/plugins/ctf/common/src/metadata/tsdl/ctf-1-metadata-stream-parser.cpp [new file with mode: 0644]
src/plugins/ctf/common/src/metadata/tsdl/ctf-1-metadata-stream-parser.hpp [new file with mode: 0644]
This page took 0.026361 seconds and 5 git commands to generate.