#include <babeltrace2/babeltrace.h>
#include "cpp-common/optional.hpp"
-#include "cpp-common/string_view.hpp"
#include "borrowed-object.hpp"
#include "clock-class.hpp"
}
template <typename OtherLibObjT>
- CommonEvent<LibObjT>& operator=(const CommonEvent<OtherLibObjT> event) noexcept
+ CommonEvent<LibObjT> operator=(const CommonEvent<OtherLibObjT> event) noexcept
{
_ThisBorrowedObject::operator=(event);
return *this;
}
template <typename OtherLibObjT>
- CommonPacket& operator=(const CommonPacket<OtherLibObjT> packet) noexcept
+ CommonPacket operator=(const CommonPacket<OtherLibObjT> packet) noexcept
{
_ThisBorrowedObject::operator=(packet);
return *this;
}
template <typename OtherLibObjT>
- CommonStream& operator=(const CommonStream<OtherLibObjT> stream) noexcept
+ CommonStream operator=(const CommonStream<OtherLibObjT> stream) noexcept
{
_ThisBorrowedObject::operator=(stream);
return *this;
this->name(name.data());
}
- nonstd::optional<bpstd::string_view> name() const noexcept
+ const char *name() const noexcept
{
- const auto name = bt_stream_get_name(this->libObjPtr());
-
- if (name) {
- return name;
- }
-
- return nonstd::nullopt;
+ return bt_stream_get_name(this->libObjPtr());
}
template <typename LibValT>
struct ConstEnvironmentEntry
{
- bpstd::string_view name;
+ const char *name;
ConstValue value;
};
}
template <typename OtherLibObjT>
- CommonTrace& operator=(const CommonTrace<OtherLibObjT> trace) noexcept
+ CommonTrace operator=(const CommonTrace<OtherLibObjT> trace) noexcept
{
_ThisBorrowedObject::operator=(trace);
return *this;
this->name(name.data());
}
- nonstd::optional<bpstd::string_view> name() const noexcept
+ const char *name() const noexcept
{
- const auto name = bt_trace_get_name(this->libObjPtr());
-
- if (name) {
- return name;
- }
-
- return nonstd::nullopt;
+ return bt_trace_get_name(this->libObjPtr());
}
void uuid(const bt2_common::UuidView& uuid) const noexcept
}
template <typename OtherLibObjT>
- CommonEventClass& operator=(const CommonEventClass<OtherLibObjT> eventClass) noexcept
+ CommonEventClass operator=(const CommonEventClass<OtherLibObjT> eventClass) noexcept
{
_ThisBorrowedObject::operator=(eventClass);
return *this;
this->name(name.data());
}
- nonstd::optional<bpstd::string_view> name() const noexcept
+ const char *name() const noexcept
{
- const auto name = bt_event_class_get_name(this->libObjPtr());
-
- if (name) {
- return name;
- }
-
- return nonstd::nullopt;
+ return bt_event_class_get_name(this->libObjPtr());
}
void logLevel(const LogLevel logLevel) const noexcept
this->emfUri(emfUri.data());
}
- nonstd::optional<bpstd::string_view> emfUri() const noexcept
+ const char *emfUri() const noexcept
{
- const auto emfUri = bt_event_class_get_emf_uri(this->libObjPtr());
-
- if (emfUri) {
- return emfUri;
- }
-
- return nonstd::nullopt;
+ return bt_event_class_get_emf_uri(this->libObjPtr());
}
void payloadFieldClass(const StructureFieldClass fc) const
}
template <typename OtherLibObjT>
- CommonStreamClass& operator=(const CommonStreamClass<OtherLibObjT> streamClass) noexcept
+ CommonStreamClass operator=(const CommonStreamClass<OtherLibObjT> streamClass) noexcept
{
_ThisBorrowedObject::operator=(streamClass);
return *this;
this->name(name.data());
}
- nonstd::optional<bpstd::string_view> name() const noexcept
+ const char *name() const noexcept
{
- const auto name = bt_stream_class_get_name(this->libObjPtr());
-
- if (name) {
- return name;
- }
-
- return nonstd::nullopt;
+ return bt_stream_class_get_name(this->libObjPtr());
}
void assignsAutomaticEventClassId(const bool val) const noexcept
}
template <typename OtherLibObjT>
- CommonTraceClass& operator=(const CommonTraceClass<OtherLibObjT> traceClass) noexcept
+ CommonTraceClass operator=(const CommonTraceClass<OtherLibObjT> traceClass) noexcept
{
_ThisBorrowedObject::operator=(traceClass);
return *this;