X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcpp-common%2Fbt2%2Ftrace-ir.hpp;fp=src%2Fcpp-common%2Fbt2%2Ftrace-ir.hpp;h=e00950818afb8863d62866f6a7748802403ebad7;hb=328a274a0722349196f8c7161dce7d5adc7e2489;hp=5ee989601764d34fcea234c7eb46148e857cfa03;hpb=c0b73c6309f7b6a0d488e49c62f145293d7e12e0;p=babeltrace.git diff --git a/src/cpp-common/bt2/trace-ir.hpp b/src/cpp-common/bt2/trace-ir.hpp index 5ee98960..e0095081 100644 --- a/src/cpp-common/bt2/trace-ir.hpp +++ b/src/cpp-common/bt2/trace-ir.hpp @@ -163,6 +163,11 @@ public: return *this; } + CommonEvent asConst() const noexcept + { + return CommonEvent {*this}; + } + Class cls() const noexcept; _Stream stream() const noexcept; nonstd::optional<_Packet> packet() const noexcept; @@ -305,6 +310,11 @@ public: return *this; } + CommonPacket asConst() const noexcept + { + return CommonPacket {*this}; + } + _Stream stream() const noexcept; nonstd::optional<_StructureField> contextField() const noexcept @@ -459,6 +469,11 @@ public: return *this; } + CommonStream asConst() const noexcept + { + return CommonStream {*this}; + } + Packet::Shared createPacket() const { static_assert(!std::is_const::value, "`LibObjT` must NOT be `const`."); @@ -675,6 +690,11 @@ public: return *this; } + CommonTrace asConst() const noexcept + { + return CommonTrace {*this}; + } + Class cls() const noexcept; void name(const char * const name) const @@ -993,6 +1013,11 @@ public: return *this; } + CommonEventClass asConst() const noexcept + { + return CommonEventClass {*this}; + } + _StreamClass streamClass() const noexcept; std::uint64_t id() const noexcept @@ -1322,6 +1347,11 @@ public: return *this; } + CommonStreamClass asConst() const noexcept + { + return CommonStreamClass {*this}; + } + Stream::Shared instantiate(const Trace trace) const { static_assert(!std::is_const::value, "`LibObjT` must NOT be `const`."); @@ -1736,6 +1766,11 @@ public: return *this; } + CommonTraceClass asConst() const noexcept + { + return CommonTraceClass {*this}; + } + Trace::Shared instantiate() const { static_assert(!std::is_const::value, "`LibObjT` must NOT be `const`.");