Add C++ interface for the libbabeltrace2 `bt_field` API
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 18 Dec 2020 04:27:10 +0000 (23:27 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 28 Jan 2022 16:22:26 +0000 (11:22 -0500)
commita1e3187822e3320ce83e37a0e30bc68e176112d4
treea2be50ef662b5597a1eecfe163e93b5c4ea81ad0
parent12435a68fc55fa763809f511465a1e6b2ec25e44
Add C++ interface for the libbabeltrace2 `bt_field` API

This patch adds C++ wrappers for Babeltrace 2 field objects.

The class hierarchy is:

    Field
      BoolField
      BitArrayField
      UnsignedIntegerField
        UnsignedEnumerationField
      SignedIntegerField
        SignedEnumerationField
      SinglePrecisionRealField
      DoublePrecisionRealField
      StringField
      StructureField
      ArrayField
        DynamicArrayField
      OptionField
      VariantField
    ConstField
      ConstBoolField
      ConstBitArrayField
      ConstUnsignedIntegerField
        ConstUnsignedEnumerationField
      ConstSignedIntegerField
        ConstSignedEnumerationField
      ConstSinglePrecisionRealField
      ConstDoublePrecisionRealField
      ConstStringField
      ConstStructureField
      ConstArrayField
        ConstDynamicArrayField
      ConstOptionField
      ConstVariantField
    EnumerationFieldClassMappingLabels

Implicitly convert from a mutable field to a constant field with
converting constructors and assignment operators.

Those new template classes follow the approach of other wrappers in
`src/cpp-common/bt2`.

Each specialized field type has a cls() method which returns a
corresponding specialized field class type instance.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ic8886033befc38366f3ee676e0c779640420a72f
Reviewed-on: https://review.lttng.org/c/babeltrace/+/4629
src/cpp-common/bt2/field.hpp [new file with mode: 0644]
This page took 0.027875 seconds and 4 git commands to generate.