From ff62093671fdaae4f55712ef7c4663c9845e7ce5 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Thu, 24 Feb 2022 14:37:29 -0500 Subject: [PATCH] cpp-common: Add `CommonFieldClass::isReal()` method Signed-off-by: Francis Deslauriers Change-Id: I420462ccfd78c06d7b496f4650af77cd2d2e57b7 Reviewed-on: https://review.lttng.org/c/babeltrace/+/7385 Reviewed-by: Philippe Proulx Reviewed-on: https://review.lttng.org/c/babeltrace/+/10756 CI-Build: Philippe Proulx Tested-by: jenkins --- src/cpp-common/bt2/field-class.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cpp-common/bt2/field-class.hpp b/src/cpp-common/bt2/field-class.hpp index a248d9d1..642aff78 100644 --- a/src/cpp-common/bt2/field-class.hpp +++ b/src/cpp-common/bt2/field-class.hpp @@ -250,6 +250,11 @@ public: return this->_libTypeIs(BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION); } + bool isReal() const noexcept + { + return this->_libTypeIs(BT_FIELD_CLASS_TYPE_REAL); + } + bool isSinglePrecisionReal() const noexcept { return this->_libTypeIs(BT_FIELD_CLASS_TYPE_SINGLE_PRECISION_REAL); -- 2.34.1