template <typename LibObjT>
struct CommonEventSpec;
-// Functions specific to mutable events
+/* Functions specific to mutable events */
template <>
struct CommonEventSpec<bt_event> final
{
}
};
-// Functions specific to constant events
+/* Functions specific to constant events */
template <>
struct CommonEventSpec<const bt_event> final
{
}
};
-} // namespace internal
+} /* namespace internal */
template <typename LibObjT>
class CommonEvent final : public internal::BorrowedObj<LibObjT>
nonstd::optional<ConstStructureField> payloadField() const noexcept
{
- const auto libObjPtr = _ConstSpec::payloadField(this->_libObjPtr());
+ const auto libObjPtr = _ConstSpec::payloadField(this->libObjPtr());
if (libObjPtr) {
return ConstStructureField {libObjPtr};
nonstd::optional<_StructureField> payloadField() noexcept
{
- const auto libObjPtr = _Spec::payloadField(this->_libObjPtr());
+ const auto libObjPtr = _Spec::payloadField(this->libObjPtr());
if (libObjPtr) {
return _StructureField {libObjPtr};
nonstd::optional<ConstStructureField> specificContextField() const noexcept
{
- const auto libObjPtr = _ConstSpec::specificContextField(this->_libObjPtr());
+ const auto libObjPtr = _ConstSpec::specificContextField(this->libObjPtr());
if (libObjPtr) {
return ConstStructureField {libObjPtr};
nonstd::optional<_StructureField> specificContextField() noexcept
{
- const auto libObjPtr = _Spec::specificContextField(this->_libObjPtr());
+ const auto libObjPtr = _Spec::specificContextField(this->libObjPtr());
if (libObjPtr) {
return _StructureField {libObjPtr};
nonstd::optional<ConstStructureField> commonContextField() const noexcept
{
- const auto libObjPtr = _ConstSpec::commonContextField(this->_libObjPtr());
+ const auto libObjPtr = _ConstSpec::commonContextField(this->libObjPtr());
if (libObjPtr) {
return ConstStructureField {libObjPtr};
nonstd::optional<_StructureField> commonContextField() noexcept
{
- const auto libObjPtr = _Spec::commonContextField(this->_libObjPtr());
+ const auto libObjPtr = _Spec::commonContextField(this->libObjPtr());
if (libObjPtr) {
return _StructureField {libObjPtr};
template <typename LibObjT>
struct CommonPacketSpec;
-// Functions specific to mutable packets
+/* Functions specific to mutable packets */
template <>
struct CommonPacketSpec<bt_packet> final
{
}
};
-// Functions specific to constant packets
+/* Functions specific to constant packets */
template <>
struct CommonPacketSpec<const bt_packet> final
{
}
};
-} // namespace internal
+} /* namespace internal */
template <typename LibObjT>
class CommonPacket final : public internal::BorrowedObj<LibObjT>
nonstd::optional<ConstStructureField> contextField() const noexcept
{
- const auto libObjPtr = _ConstSpec::contextField(this->_libObjPtr());
+ const auto libObjPtr = _ConstSpec::contextField(this->libObjPtr());
if (libObjPtr) {
return ConstStructureField {libObjPtr};
nonstd::optional<_StructureField> contextField() noexcept
{
- const auto libObjPtr = _Spec::contextField(this->_libObjPtr());
+ const auto libObjPtr = _Spec::contextField(this->libObjPtr());
if (libObjPtr) {
return _StructureField {libObjPtr};
template <typename LibObjT>
nonstd::optional<ConstPacket> CommonEvent<LibObjT>::packet() const noexcept
{
- const auto libObjPtr = _ConstSpec::packet(this->_libObjPtr());
+ const auto libObjPtr = _ConstSpec::packet(this->libObjPtr());
if (libObjPtr) {
return ConstPacket {libObjPtr};
template <typename LibObjT>
nonstd::optional<typename CommonEvent<LibObjT>::_Packet> CommonEvent<LibObjT>::packet() noexcept
{
- const auto libObjPtr = _Spec::packet(this->_libObjPtr());
+ const auto libObjPtr = _Spec::packet(this->libObjPtr());
if (libObjPtr) {
return _Packet {libObjPtr};
template <typename LibObjT>
struct CommonStreamSpec;
-// Functions specific to mutable streams
+/* Functions specific to mutable streams */
template <>
struct CommonStreamSpec<bt_stream> final
{
}
};
-// Functions specific to constant streams
+/* Functions specific to constant streams */
template <>
struct CommonStreamSpec<const bt_stream> final
{
}
};
-} // namespace internal
+} /* namespace internal */
template <typename LibObjT>
class CommonStream final : public internal::BorrowedObj<LibObjT>
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_packet_create(this->_libObjPtr());
+ const auto libObjPtr = bt_packet_create(this->libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return Packet::Shared {Packet {libObjPtr}};
std::uint64_t id() const noexcept
{
- return bt_stream_get_id(this->_libObjPtr());
+ return bt_stream_get_id(this->libObjPtr());
}
void name(const char * const name)
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto status = bt_stream_set_name(this->_libObjPtr(), name);
+ const auto status = bt_stream_set_name(this->libObjPtr(), name);
if (status == BT_STREAM_SET_NAME_STATUS_MEMORY_ERROR) {
throw LibMemoryError {};
nonstd::optional<bpstd::string_view> name() const noexcept
{
- const auto name = bt_stream_get_name(this->_libObjPtr());
+ const auto name = bt_stream_get_name(this->libObjPtr());
if (name) {
return name;
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- bt_stream_set_user_attributes(this->_libObjPtr(), userAttrs._libObjPtr());
+ bt_stream_set_user_attributes(this->libObjPtr(), userAttrs.libObjPtr());
}
ConstMapValue userAttributes() const noexcept
{
- return ConstMapValue {_ConstSpec::userAttributes(this->_libObjPtr())};
+ return ConstMapValue {_ConstSpec::userAttributes(this->libObjPtr())};
}
UserAttributes userAttributes() noexcept
{
- return UserAttributes {_Spec::userAttributes(this->_libObjPtr())};
+ return UserAttributes {_Spec::userAttributes(this->libObjPtr())};
}
Shared shared() const noexcept
template <typename LibObjT>
ConstStream CommonEvent<LibObjT>::stream() const noexcept
{
- return ConstStream {_ConstSpec::stream(this->_libObjPtr())};
+ return ConstStream {_ConstSpec::stream(this->libObjPtr())};
}
template <typename LibObjT>
typename CommonEvent<LibObjT>::_Stream CommonEvent<LibObjT>::stream() noexcept
{
- return _Stream {_Spec::stream(this->_libObjPtr())};
+ return _Stream {_Spec::stream(this->libObjPtr())};
}
template <typename LibObjT>
ConstStream CommonPacket<LibObjT>::stream() const noexcept
{
- return ConstStream {_ConstSpec::stream(this->_libObjPtr())};
+ return ConstStream {_ConstSpec::stream(this->libObjPtr())};
}
template <typename LibObjT>
typename CommonPacket<LibObjT>::_Stream CommonPacket<LibObjT>::stream() noexcept
{
- return _Stream {_Spec::stream(this->_libObjPtr())};
+ return _Stream {_Spec::stream(this->libObjPtr())};
}
namespace internal {
template <typename LibObjT>
struct CommonTraceSpec;
-// Functions specific to mutable traces
+/* Functions specific to mutable traces */
template <>
struct CommonTraceSpec<bt_trace> final
{
}
};
-// Functions specific to constant traces
+/* Functions specific to constant traces */
template <>
struct CommonTraceSpec<const bt_trace> final
{
}
};
-} // namespace internal
+} /* namespace internal */
template <typename LibObjT>
class CommonTrace final : public internal::BorrowedObj<LibObjT>
{
- // Allow instantiate() to call `trace._libObjPtr()`
+ /* Allow instantiate() to call `trace.libObjPtr()` */
friend class CommonStreamClass<bt_stream_class>;
private:
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto status = bt_trace_set_name(this->_libObjPtr(), name);
+ const auto status = bt_trace_set_name(this->libObjPtr(), name);
if (status == BT_TRACE_SET_NAME_STATUS_MEMORY_ERROR) {
throw LibMemoryError {};
nonstd::optional<bpstd::string_view> name() const noexcept
{
- const auto name = bt_trace_get_name(this->_libObjPtr());
+ const auto name = bt_trace_get_name(this->libObjPtr());
if (name) {
return name;
void uuid(const std::uint8_t * const uuid) noexcept
{
- bt_trace_set_uuid(this->_libObjPtr(), uuid);
+ bt_trace_set_uuid(this->libObjPtr(), uuid);
}
nonstd::optional<bt2_common::UuidView> uuid() const noexcept
{
- const auto uuid = bt_trace_get_uuid(this->_libObjPtr());
+ const auto uuid = bt_trace_get_uuid(this->libObjPtr());
if (uuid) {
return bt2_common::UuidView {uuid};
std::uint64_t size() const noexcept
{
- return bt_trace_get_stream_count(this->_libObjPtr());
+ return bt_trace_get_stream_count(this->libObjPtr());
}
ConstStream operator[](const std::uint64_t index) const noexcept
{
- return ConstStream {_ConstSpec::streamByIndex(this->_libObjPtr(), index)};
+ return ConstStream {_ConstSpec::streamByIndex(this->libObjPtr(), index)};
}
_Stream operator[](const std::uint64_t index) noexcept
{
- return _Stream {_Spec::streamByIndex(this->_libObjPtr(), index)};
+ return _Stream {_Spec::streamByIndex(this->libObjPtr(), index)};
}
nonstd::optional<ConstStream> streamById(const std::uint64_t id) const noexcept
{
- const auto libObjPtr = _ConstSpec::streamById(this->_libObjPtr(), id);
+ const auto libObjPtr = _ConstSpec::streamById(this->libObjPtr(), id);
if (libObjPtr) {
return ConstStream {libObjPtr};
nonstd::optional<_Stream> streamById(const std::uint64_t id) noexcept
{
- const auto libObjPtr = _Spec::streamById(this->_libObjPtr(), id);
+ const auto libObjPtr = _Spec::streamById(this->libObjPtr(), id);
if (libObjPtr) {
return _Stream {libObjPtr};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto status = bt_trace_set_environment_entry_integer(this->_libObjPtr(), name, val);
+ const auto status = bt_trace_set_environment_entry_integer(this->libObjPtr(), name, val);
if (status == BT_TRACE_SET_ENVIRONMENT_ENTRY_STATUS_MEMORY_ERROR) {
throw LibMemoryError {};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto status = bt_trace_set_environment_entry_string(this->_libObjPtr(), name, val);
+ const auto status = bt_trace_set_environment_entry_string(this->libObjPtr(), name, val);
if (status == BT_TRACE_SET_ENVIRONMENT_ENTRY_STATUS_MEMORY_ERROR) {
throw LibMemoryError {};
std::uint64_t environmentSize() const noexcept
{
- return bt_trace_get_environment_entry_count(this->_libObjPtr());
+ return bt_trace_get_environment_entry_count(this->libObjPtr());
}
ConstEnvironmentEntry environmentEntry(const std::uint64_t index) const noexcept
const char *name;
const bt_value *libObjPtr;
- bt_trace_borrow_environment_entry_by_index_const(this->_libObjPtr(), index, &name,
+ bt_trace_borrow_environment_entry_by_index_const(this->libObjPtr(), index, &name,
&libObjPtr);
return ConstEnvironmentEntry {name, ConstValue {libObjPtr}};
}
nonstd::optional<ConstValue> environmentEntry(const char * const name) const noexcept
{
const auto libObjPtr =
- bt_trace_borrow_environment_entry_value_by_name_const(this->_libObjPtr(), name);
+ bt_trace_borrow_environment_entry_value_by_name_const(this->libObjPtr(), name);
if (libObjPtr) {
return ConstValue {libObjPtr};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- bt_trace_set_user_attributes(this->_libObjPtr(), userAttrs._libObjPtr());
+ bt_trace_set_user_attributes(this->libObjPtr(), userAttrs.libObjPtr());
}
ConstMapValue userAttributes() const noexcept
{
- return ConstMapValue {_ConstSpec::userAttributes(this->_libObjPtr())};
+ return ConstMapValue {_ConstSpec::userAttributes(this->libObjPtr())};
}
UserAttributes userAttributes() noexcept
{
- return UserAttributes {_Spec::userAttributes(this->_libObjPtr())};
+ return UserAttributes {_Spec::userAttributes(this->libObjPtr())};
}
Shared shared() const noexcept
template <typename LibObjT>
ConstTrace CommonStream<LibObjT>::trace() const noexcept
{
- return ConstTrace {_ConstSpec::trace(this->_libObjPtr())};
+ return ConstTrace {_ConstSpec::trace(this->libObjPtr())};
}
template <typename LibObjT>
typename CommonStream<LibObjT>::_Trace CommonStream<LibObjT>::trace() noexcept
{
- return _Trace {_Spec::trace(this->_libObjPtr())};
+ return _Trace {_Spec::trace(this->libObjPtr())};
}
namespace internal {
template <typename LibObjT>
struct CommonEventClassSpec;
-// Functions specific to mutable event classes
+/* Functions specific to mutable event classes */
template <>
struct CommonEventClassSpec<bt_event_class> final
{
}
};
-// Functions specific to constant event classes
+/* Functions specific to constant event classes */
template <>
struct CommonEventClassSpec<const bt_event_class> final
{
}
};
-} // namespace internal
+} /* namespace internal */
template <typename LibObjT>
class CommonEventClass final : public internal::BorrowedObj<LibObjT>
std::uint64_t id() const noexcept
{
- return bt_event_class_get_id(this->_libObjPtr());
+ return bt_event_class_get_id(this->libObjPtr());
}
void name(const char * const name)
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto status = bt_event_class_set_name(this->_libObjPtr(), name);
+ const auto status = bt_event_class_set_name(this->libObjPtr(), name);
if (status == BT_EVENT_CLASS_SET_NAME_STATUS_MEMORY_ERROR) {
throw LibMemoryError {};
nonstd::optional<bpstd::string_view> name() const noexcept
{
- const auto name = bt_event_class_get_name(this->_libObjPtr());
+ const auto name = bt_event_class_get_name(this->libObjPtr());
if (name) {
return name;
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- bt_event_class_set_log_level(this->_libObjPtr(),
+ bt_event_class_set_log_level(this->libObjPtr(),
static_cast<bt_event_class_log_level>(logLevel));
}
nonstd::optional<LogLevel> logLevel() const noexcept
{
bt_event_class_log_level libLogLevel;
- const auto avail = bt_event_class_get_log_level(this->_libObjPtr(), &libLogLevel);
+ const auto avail = bt_event_class_get_log_level(this->libObjPtr(), &libLogLevel);
if (avail == BT_PROPERTY_AVAILABILITY_AVAILABLE) {
return static_cast<LogLevel>(libLogLevel);
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto status = bt_event_class_set_emf_uri(this->_libObjPtr(), emfUri);
+ const auto status = bt_event_class_set_emf_uri(this->libObjPtr(), emfUri);
if (status == BT_EVENT_CLASS_SET_EMF_URI_STATUS_MEMORY_ERROR) {
throw LibMemoryError {};
nonstd::optional<bpstd::string_view> emfUri() const noexcept
{
- const auto emfUri = bt_event_class_get_emf_uri(this->_libObjPtr());
+ const auto emfUri = bt_event_class_get_emf_uri(this->libObjPtr());
if (emfUri) {
return emfUri;
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
const auto status =
- bt_event_class_set_payload_field_class(this->_libObjPtr(), fc._libObjPtr());
+ bt_event_class_set_payload_field_class(this->libObjPtr(), fc.libObjPtr());
if (status == BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR) {
throw LibMemoryError {};
nonstd::optional<ConstStructureFieldClass> payloadFieldClass() const noexcept
{
- const auto libObjPtr = _ConstSpec::payloadFieldClass(this->_libObjPtr());
+ const auto libObjPtr = _ConstSpec::payloadFieldClass(this->libObjPtr());
if (libObjPtr) {
return ConstStructureFieldClass {libObjPtr};
nonstd::optional<_StructureFieldClass> payloadFieldClass() noexcept
{
- const auto libObjPtr = _Spec::payloadFieldClass(this->_libObjPtr());
+ const auto libObjPtr = _Spec::payloadFieldClass(this->libObjPtr());
if (libObjPtr) {
return _StructureFieldClass {libObjPtr};
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
const auto status =
- bt_event_class_set_specific_context_field_class(this->_libObjPtr(), fc._libObjPtr());
+ bt_event_class_set_specific_context_field_class(this->libObjPtr(), fc.libObjPtr());
if (status == BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR) {
throw LibMemoryError {};
nonstd::optional<ConstStructureFieldClass> specificContextFieldClass() const noexcept
{
- const auto libObjPtr = _ConstSpec::specificContextFieldClass(this->_libObjPtr());
+ const auto libObjPtr = _ConstSpec::specificContextFieldClass(this->libObjPtr());
if (libObjPtr) {
return ConstStructureFieldClass {libObjPtr};
nonstd::optional<_StructureFieldClass> specificContextFieldClass() noexcept
{
- const auto libObjPtr = _Spec::specificContextFieldClass(this->_libObjPtr());
+ const auto libObjPtr = _Spec::specificContextFieldClass(this->libObjPtr());
if (libObjPtr) {
return _StructureFieldClass {libObjPtr};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- bt_event_class_set_user_attributes(this->_libObjPtr(), userAttrs._libObjPtr());
+ bt_event_class_set_user_attributes(this->libObjPtr(), userAttrs.libObjPtr());
}
ConstMapValue userAttributes() const noexcept
{
- return ConstMapValue {_ConstSpec::userAttributes(this->_libObjPtr())};
+ return ConstMapValue {_ConstSpec::userAttributes(this->libObjPtr())};
}
UserAttributes userAttributes() noexcept
{
- return UserAttributes {_Spec::userAttributes(this->_libObjPtr())};
+ return UserAttributes {_Spec::userAttributes(this->libObjPtr())};
}
Shared shared() const noexcept
template <typename LibObjT>
ConstEventClass CommonEvent<LibObjT>::cls() const noexcept
{
- return ConstEventClass {_ConstSpec::cls(this->_libObjPtr())};
+ return ConstEventClass {_ConstSpec::cls(this->libObjPtr())};
}
template <typename LibObjT>
typename CommonEvent<LibObjT>::Class CommonEvent<LibObjT>::cls() noexcept
{
- return Class {_Spec::cls(this->_libObjPtr())};
+ return Class {_Spec::cls(this->libObjPtr())};
}
namespace internal {
template <typename LibObjT>
struct CommonStreamClassSpec;
-// Functions specific to mutable stream classes
+/* Functions specific to mutable stream classes */
template <>
struct CommonStreamClassSpec<bt_stream_class> final
{
}
};
-// Functions specific to constant stream classes
+/* Functions specific to constant stream classes */
template <>
struct CommonStreamClassSpec<const bt_stream_class> final
{
}
};
-} // namespace internal
+} /* namespace internal */
template <typename LibObjT>
class CommonStreamClass final : public internal::BorrowedObj<LibObjT>
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_stream_create(this->_libObjPtr(), trace._libObjPtr());
+ const auto libObjPtr = bt_stream_create(this->libObjPtr(), trace.libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return Stream::Shared {Stream {libObjPtr}};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_stream_create_with_id(this->_libObjPtr(), trace._libObjPtr(), id);
+ const auto libObjPtr = bt_stream_create_with_id(this->libObjPtr(), trace.libObjPtr(), id);
internal::validateCreatedObjPtr(libObjPtr);
return Stream::Shared {Stream {libObjPtr}};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_event_class_create(this->_libObjPtr());
+ const auto libObjPtr = bt_event_class_create(this->libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return EventClass::Shared {EventClass {libObjPtr}};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_event_class_create_with_id(this->_libObjPtr(), id);
+ const auto libObjPtr = bt_event_class_create_with_id(this->libObjPtr(), id);
internal::validateCreatedObjPtr(libObjPtr);
return EventClass::Shared {EventClass {libObjPtr}};
std::uint64_t id() const noexcept
{
- return bt_stream_class_get_id(this->_libObjPtr());
+ return bt_stream_class_get_id(this->libObjPtr());
}
void name(const char * const name)
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto status = bt_stream_class_set_name(this->_libObjPtr(), name);
+ const auto status = bt_stream_class_set_name(this->libObjPtr(), name);
if (status == BT_STREAM_CLASS_SET_NAME_STATUS_MEMORY_ERROR) {
throw LibMemoryError {};
nonstd::optional<bpstd::string_view> name() const noexcept
{
- const auto name = bt_stream_class_get_name(this->_libObjPtr());
+ const auto name = bt_stream_class_get_name(this->libObjPtr());
if (name) {
return name;
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- bt_stream_class_set_assigns_automatic_event_class_id(this->_libObjPtr(),
+ bt_stream_class_set_assigns_automatic_event_class_id(this->libObjPtr(),
static_cast<bt_bool>(val));
}
bool assignsAutomaticEventClassId() const noexcept
{
return static_cast<bool>(
- bt_stream_class_assigns_automatic_event_class_id(this->_libObjPtr()));
+ bt_stream_class_assigns_automatic_event_class_id(this->libObjPtr()));
}
void assignsAutomaticStreamId(const bool val) noexcept
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- bt_stream_class_set_assigns_automatic_stream_id(this->_libObjPtr(),
+ bt_stream_class_set_assigns_automatic_stream_id(this->libObjPtr(),
static_cast<bt_bool>(val));
}
bool assignsAutomaticStreamId() const noexcept
{
- return static_cast<bool>(bt_stream_class_assigns_automatic_stream_id(this->_libObjPtr()));
+ return static_cast<bool>(bt_stream_class_assigns_automatic_stream_id(this->libObjPtr()));
}
void supportsPackets(const bool supportsPackets, const bool withBeginningDefaultClkSnapshot,
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- bt_stream_class_set_supports_packets(this->_libObjPtr(),
+ bt_stream_class_set_supports_packets(this->libObjPtr(),
static_cast<bt_bool>(supportsPackets),
static_cast<bt_bool>(withBeginningDefaultClkSnapshot),
static_cast<bt_bool>(withEndDefaultClkSnapshot));
bool supportsPackets() const noexcept
{
- return static_cast<bool>(bt_stream_class_supports_packets(this->_libObjPtr()));
+ return static_cast<bool>(bt_stream_class_supports_packets(this->libObjPtr()));
}
bool packetsHaveBeginningClockSnapshot() const noexcept
{
return static_cast<bool>(
- bt_stream_class_packets_have_beginning_default_clock_snapshot(this->_libObjPtr()));
+ bt_stream_class_packets_have_beginning_default_clock_snapshot(this->libObjPtr()));
}
bool packetsHaveEndClockSnapshot() const noexcept
{
return static_cast<bool>(
- bt_stream_class_packets_have_end_default_clock_snapshot(this->_libObjPtr()));
+ bt_stream_class_packets_have_end_default_clock_snapshot(this->libObjPtr()));
}
void supportsDiscardedEvents(const bool supportsDiscardedEvents,
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
bt_stream_class_set_supports_discarded_events(
- this->_libObjPtr(), static_cast<bt_bool>(supportsPackets),
+ this->libObjPtr(), static_cast<bt_bool>(supportsPackets),
static_cast<bt_bool>(withDefaultClkSnapshots));
}
bool supportsDiscardedEvents() const noexcept
{
- return static_cast<bool>(bt_stream_class_supports_discarded_events(this->_libObjPtr()));
+ return static_cast<bool>(bt_stream_class_supports_discarded_events(this->libObjPtr()));
}
bool discardedEventsHaveDefaultClockSnapshots() const noexcept
{
return static_cast<bool>(
- bt_stream_class_discarded_events_have_default_clock_snapshots(this->_libObjPtr()));
+ bt_stream_class_discarded_events_have_default_clock_snapshots(this->libObjPtr()));
}
void supportsDiscardedPackets(const bool supportsDiscardedPackets,
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
bt_stream_class_set_supports_discarded_packets(
- this->_libObjPtr(), static_cast<bt_bool>(supportsPackets),
+ this->libObjPtr(), static_cast<bt_bool>(supportsPackets),
static_cast<bt_bool>(withDefaultClkSnapshots));
}
bool supportsDiscardedPackets() const noexcept
{
- return static_cast<bool>(bt_stream_class_supports_discarded_packets(this->_libObjPtr()));
+ return static_cast<bool>(bt_stream_class_supports_discarded_packets(this->libObjPtr()));
}
bool discardedPacketsHaveDefaultClockSnapshots() const noexcept
{
return static_cast<bool>(
- bt_stream_class_discarded_packets_have_default_clock_snapshots(this->_libObjPtr()));
+ bt_stream_class_discarded_packets_have_default_clock_snapshots(this->libObjPtr()));
}
void defaultClockClass(const ClockClass& clkCls)
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
const auto status =
- bt_stream_class_set_default_clock_class(this->_libObjPtr(), clkCls._libObjPtr());
+ bt_stream_class_set_default_clock_class(this->libObjPtr(), clkCls.libObjPtr());
BT_ASSERT(status == BT_STREAM_CLASS_SET_DEFAULT_CLOCK_CLASS_STATUS_OK);
}
nonstd::optional<ConstClockClass> defaultClockClass() const noexcept
{
- const auto libObjPtr = _ConstSpec::defaultClockClass(this->_libObjPtr());
+ const auto libObjPtr = _ConstSpec::defaultClockClass(this->libObjPtr());
if (libObjPtr) {
return ConstClockClass {libObjPtr};
nonstd::optional<_ClockClass> defaultClockClass() noexcept
{
- const auto libObjPtr = _Spec::defaultClockClass(this->_libObjPtr());
+ const auto libObjPtr = _Spec::defaultClockClass(this->libObjPtr());
if (libObjPtr) {
return _ClockClass {libObjPtr};
std::uint64_t size() const noexcept
{
- return bt_stream_class_get_event_class_count(this->_libObjPtr());
+ return bt_stream_class_get_event_class_count(this->libObjPtr());
}
ConstEventClass operator[](const std::uint64_t index) const noexcept
{
- return ConstEventClass {_ConstSpec::eventClassByIndex(this->_libObjPtr(), index)};
+ return ConstEventClass {_ConstSpec::eventClassByIndex(this->libObjPtr(), index)};
}
_EventClass operator[](const std::uint64_t index) noexcept
{
- return _EventClass {_Spec::eventClassByIndex(this->_libObjPtr(), index)};
+ return _EventClass {_Spec::eventClassByIndex(this->libObjPtr(), index)};
}
nonstd::optional<ConstEventClass> eventClassById(const std::uint64_t id) const noexcept
{
- const auto libObjPtr = _ConstSpec::eventClassById(this->_libObjPtr(), id);
+ const auto libObjPtr = _ConstSpec::eventClassById(this->libObjPtr(), id);
if (libObjPtr) {
return ConstEventClass {libObjPtr};
nonstd::optional<_EventClass> eventClassById(const std::uint64_t id) noexcept
{
- const auto libObjPtr = _Spec::eventClassById(this->_libObjPtr(), id);
+ const auto libObjPtr = _Spec::eventClassById(this->libObjPtr(), id);
if (libObjPtr) {
return _EventClass {libObjPtr};
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
const auto status =
- bt_stream_class_set_packet_context_field_class(this->_libObjPtr(), fc._libObjPtr());
+ bt_stream_class_set_packet_context_field_class(this->libObjPtr(), fc.libObjPtr());
if (status == BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR) {
throw LibMemoryError {};
nonstd::optional<ConstStructureFieldClass> packetContextFieldClass() const noexcept
{
- const auto libObjPtr = _ConstSpec::packetContextFieldClass(this->_libObjPtr());
+ const auto libObjPtr = _ConstSpec::packetContextFieldClass(this->libObjPtr());
if (libObjPtr) {
return ConstStructureFieldClass {libObjPtr};
nonstd::optional<_StructureFieldClass> packetContextFieldClass() noexcept
{
- const auto libObjPtr = _Spec::packetContextFieldClass(this->_libObjPtr());
+ const auto libObjPtr = _Spec::packetContextFieldClass(this->libObjPtr());
if (libObjPtr) {
return _StructureFieldClass {libObjPtr};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto status = bt_stream_class_set_event_common_context_field_class(this->_libObjPtr(),
- fc._libObjPtr());
+ const auto status =
+ bt_stream_class_set_event_common_context_field_class(this->libObjPtr(), fc.libObjPtr());
if (status == BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR) {
throw LibMemoryError {};
nonstd::optional<ConstStructureFieldClass> eventCommonContextFieldClass() const noexcept
{
- const auto libObjPtr = _ConstSpec::eventCommonContextFieldClass(this->_libObjPtr());
+ const auto libObjPtr = _ConstSpec::eventCommonContextFieldClass(this->libObjPtr());
if (libObjPtr) {
return ConstStructureFieldClass {libObjPtr};
nonstd::optional<_StructureFieldClass> eventCommonContextFieldClass() noexcept
{
- const auto libObjPtr = _Spec::eventCommonContextFieldClass(this->_libObjPtr());
+ const auto libObjPtr = _Spec::eventCommonContextFieldClass(this->libObjPtr());
if (libObjPtr) {
return _StructureFieldClass {libObjPtr};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- bt_stream_class_set_user_attributes(this->_libObjPtr(), userAttrs._libObjPtr());
+ bt_stream_class_set_user_attributes(this->libObjPtr(), userAttrs.libObjPtr());
}
ConstMapValue userAttributes() const noexcept
{
- return ConstMapValue {_ConstSpec::userAttributes(this->_libObjPtr())};
+ return ConstMapValue {_ConstSpec::userAttributes(this->libObjPtr())};
}
UserAttributes userAttributes() noexcept
{
- return UserAttributes {_Spec::userAttributes(this->_libObjPtr())};
+ return UserAttributes {_Spec::userAttributes(this->libObjPtr())};
}
Shared shared() const noexcept
template <typename LibObjT>
ConstStreamClass CommonEventClass<LibObjT>::streamClass() const noexcept
{
- return ConstStreamClass {_ConstSpec::streamClass(this->_libObjPtr())};
+ return ConstStreamClass {_ConstSpec::streamClass(this->libObjPtr())};
}
template <typename LibObjT>
typename CommonEventClass<LibObjT>::_StreamClass CommonEventClass<LibObjT>::streamClass() noexcept
{
- return _StreamClass {_Spec::streamClass(this->_libObjPtr())};
+ return _StreamClass {_Spec::streamClass(this->libObjPtr())};
}
template <typename LibObjT>
ConstStreamClass CommonStream<LibObjT>::cls() const noexcept
{
- return ConstStreamClass {_ConstSpec::cls(this->_libObjPtr())};
+ return ConstStreamClass {_ConstSpec::cls(this->libObjPtr())};
}
template <typename LibObjT>
typename CommonStream<LibObjT>::Class CommonStream<LibObjT>::cls() noexcept
{
- return Class {_Spec::cls(this->_libObjPtr())};
+ return Class {_Spec::cls(this->libObjPtr())};
}
namespace internal {
template <typename LibObjT>
struct CommonTraceClassSpec;
-// Functions specific to mutable stream classes
+/* Functions specific to mutable stream classes */
template <>
struct CommonTraceClassSpec<bt_trace_class> final
{
}
};
-// Functions specific to constant stream classes
+/* Functions specific to constant stream classes */
template <>
struct CommonTraceClassSpec<const bt_trace_class> final
{
}
};
-} // namespace internal
+} /* namespace internal */
template <typename LibObjT>
class CommonTraceClass final : public internal::BorrowedObj<LibObjT>
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_trace_create(this->_libObjPtr());
+ const auto libObjPtr = bt_trace_create(this->libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return Trace::Shared {Trace {libObjPtr}};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_stream_class_create(this->_libObjPtr());
+ const auto libObjPtr = bt_stream_class_create(this->libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return StreamClass::Shared {StreamClass {libObjPtr}};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_stream_class_create_with_id(this->_libObjPtr(), id);
+ const auto libObjPtr = bt_stream_class_create_with_id(this->libObjPtr(), id);
internal::validateCreatedObjPtr(libObjPtr);
return StreamClass::Shared {StreamClass {libObjPtr}};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_field_class_bool_create(this->_libObjPtr());
+ const auto libObjPtr = bt_field_class_bool_create(this->libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return FieldClass::Shared {FieldClass {libObjPtr}};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_field_class_bit_array_create(this->_libObjPtr(), length);
+ const auto libObjPtr = bt_field_class_bit_array_create(this->libObjPtr(), length);
internal::validateCreatedObjPtr(libObjPtr);
return BitArrayFieldClass::Shared {BitArrayFieldClass {libObjPtr}};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_field_class_integer_unsigned_create(this->_libObjPtr());
+ const auto libObjPtr = bt_field_class_integer_unsigned_create(this->libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return IntegerFieldClass::Shared {IntegerFieldClass {libObjPtr}};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_field_class_integer_signed_create(this->_libObjPtr());
+ const auto libObjPtr = bt_field_class_integer_signed_create(this->libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return IntegerFieldClass::Shared {IntegerFieldClass {libObjPtr}};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_field_class_enumeration_unsigned_create(this->_libObjPtr());
+ const auto libObjPtr = bt_field_class_enumeration_unsigned_create(this->libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return UnsignedEnumerationFieldClass::Shared {UnsignedEnumerationFieldClass {libObjPtr}};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_field_class_enumeration_signed_create(this->_libObjPtr());
+ const auto libObjPtr = bt_field_class_enumeration_signed_create(this->libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return SignedEnumerationFieldClass::Shared {SignedEnumerationFieldClass {libObjPtr}};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_field_class_real_single_precision_create(this->_libObjPtr());
+ const auto libObjPtr = bt_field_class_real_single_precision_create(this->libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return FieldClass::Shared {FieldClass {libObjPtr}};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_field_class_real_double_precision_create(this->_libObjPtr());
+ const auto libObjPtr = bt_field_class_real_double_precision_create(this->libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return FieldClass::Shared {FieldClass {libObjPtr}};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_field_class_string_create(this->_libObjPtr());
+ const auto libObjPtr = bt_field_class_string_create(this->libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return FieldClass::Shared {FieldClass {libObjPtr}};
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
const auto libObjPtr = bt_field_class_array_static_create(
- this->_libObjPtr(), elementFieldClass._libObjPtr(), length);
+ this->libObjPtr(), elementFieldClass.libObjPtr(), length);
internal::validateCreatedObjPtr(libObjPtr);
return StaticArrayFieldClass::Shared {StaticArrayFieldClass {libObjPtr}};
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
const auto libObjPtr = bt_field_class_array_dynamic_create(
- this->_libObjPtr(), elementFieldClass._libObjPtr(), nullptr);
+ this->libObjPtr(), elementFieldClass.libObjPtr(), nullptr);
internal::validateCreatedObjPtr(libObjPtr);
return ArrayFieldClass::Shared {ArrayFieldClass {libObjPtr}};
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
const auto libObjPtr = bt_field_class_array_dynamic_create(
- this->_libObjPtr(), elementFieldClass._libObjPtr(), lengthFieldClass._libObjPtr());
+ this->libObjPtr(), elementFieldClass.libObjPtr(), lengthFieldClass.libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return DynamicArrayWithLengthFieldClass::Shared {
DynamicArrayWithLengthFieldClass {libObjPtr}};
}
- StructureFieldClass::Shared createStructureFieldClass(const std::uint64_t length)
+ StructureFieldClass::Shared createStructureFieldClass()
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_field_class_structure_create(this->_libObjPtr(), length);
+ const auto libObjPtr = bt_field_class_structure_create(this->libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return StructureFieldClass::Shared {StructureFieldClass {libObjPtr}};
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
const auto libObjPtr = bt_field_class_option_without_selector_create(
- this->_libObjPtr(), optionalFieldClass._libObjPtr());
+ this->libObjPtr(), optionalFieldClass.libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return OptionFieldClass::Shared {OptionFieldClass {libObjPtr}};
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
const auto libObjPtr = bt_field_class_option_with_selector_field_bool_create(
- this->_libObjPtr(), optionalFieldClass._libObjPtr(), selectorFieldClass._libObjPtr());
+ this->libObjPtr(), optionalFieldClass.libObjPtr(), selectorFieldClass.libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return OptionWithBoolSelectorFieldClass::Shared {
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
const auto libObjPtr = bt_field_class_option_with_selector_field_integer_unsigned_create(
- this->_libObjPtr(), optionalFieldClass._libObjPtr(), selectorFieldClass._libObjPtr(),
- ranges._libObjPtr());
+ this->libObjPtr(), optionalFieldClass.libObjPtr(), selectorFieldClass.libObjPtr(),
+ ranges.libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return OptionWithUnsignedIntegerSelectorFieldClass::Shared {
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
const auto libObjPtr = bt_field_class_option_with_selector_field_integer_signed_create(
- this->_libObjPtr(), optionalFieldClass._libObjPtr(), selectorFieldClass._libObjPtr(),
- ranges._libObjPtr());
+ this->libObjPtr(), optionalFieldClass.libObjPtr(), selectorFieldClass.libObjPtr(),
+ ranges.libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return OptionWithSignedIntegerSelectorFieldClass::Shared {
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- const auto libObjPtr = bt_field_class_variant_create(this->_libObjPtr());
+ const auto libObjPtr = bt_field_class_variant_create(this->libObjPtr(), nullptr);
internal::validateCreatedObjPtr(libObjPtr);
return VariantWithoutSelectorFieldClass::Shared {
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- bt_trace_class_set_assigns_automatic_stream_class_id(this->_libObjPtr(),
+ bt_trace_class_set_assigns_automatic_stream_class_id(this->libObjPtr(),
static_cast<bt_bool>(val));
}
bool assignsAutomaticStreamClassId() const noexcept
{
return static_cast<bool>(
- bt_trace_class_assigns_automatic_stream_class_id(this->_libObjPtr()));
+ bt_trace_class_assigns_automatic_stream_class_id(this->libObjPtr()));
}
std::uint64_t size() const noexcept
{
- return bt_trace_class_get_stream_class_count(this->_libObjPtr());
+ return bt_trace_class_get_stream_class_count(this->libObjPtr());
}
ConstStreamClass operator[](const std::uint64_t index) const noexcept
{
- return ConstStreamClass {_ConstSpec::streamClassByIndex(this->_libObjPtr(), index)};
+ return ConstStreamClass {_ConstSpec::streamClassByIndex(this->libObjPtr(), index)};
}
_StreamClass operator[](const std::uint64_t index) noexcept
{
- return _StreamClass {_Spec::streamClassByIndex(this->_libObjPtr(), index)};
+ return _StreamClass {_Spec::streamClassByIndex(this->libObjPtr(), index)};
}
nonstd::optional<ConstStreamClass> streamClassById(const std::uint64_t id) const noexcept
{
- const auto libObjPtr = _ConstSpec::streamClassById(this->_libObjPtr(), id);
+ const auto libObjPtr = _ConstSpec::streamClassById(this->libObjPtr(), id);
if (libObjPtr) {
return ConstStreamClass {libObjPtr};
nonstd::optional<_StreamClass> streamClassById(const std::uint64_t id) noexcept
{
- const auto libObjPtr = _Spec::streamClassById(this->_libObjPtr(), id);
+ const auto libObjPtr = _Spec::streamClassById(this->libObjPtr(), id);
if (libObjPtr) {
return _StreamClass {libObjPtr};
{
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
- bt_trace_class_set_user_attributes(this->_libObjPtr(), userAttrs._libObjPtr());
+ bt_trace_class_set_user_attributes(this->libObjPtr(), userAttrs.libObjPtr());
}
ConstMapValue userAttributes() const noexcept
{
- return ConstMapValue {_ConstSpec::userAttributes(this->_libObjPtr())};
+ return ConstMapValue {_ConstSpec::userAttributes(this->libObjPtr())};
}
UserAttributes userAttributes() noexcept
{
- return UserAttributes {_Spec::userAttributes(this->_libObjPtr())};
+ return UserAttributes {_Spec::userAttributes(this->libObjPtr())};
}
Shared shared() const noexcept
static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
const auto libObjPtr =
- bt_field_class_variant_create(this->_libObjPtr(), selectorFieldClass._libObjPtr());
+ bt_field_class_variant_create(this->libObjPtr(), selectorFieldClass.libObjPtr());
internal::validateCreatedObjPtr(libObjPtr);
return libObjPtr;
template <typename LibObjT>
ConstTraceClass CommonStreamClass<LibObjT>::traceClass() const noexcept
{
- return ConstTraceClass {_ConstSpec::traceClass(this->_libObjPtr())};
+ return ConstTraceClass {_ConstSpec::traceClass(this->libObjPtr())};
}
template <typename LibObjT>
typename CommonStreamClass<LibObjT>::_TraceClass CommonStreamClass<LibObjT>::traceClass() noexcept
{
- return _TraceClass {_Spec::traceClass(this->_libObjPtr())};
+ return _TraceClass {_Spec::traceClass(this->libObjPtr())};
}
template <typename LibObjT>
ConstTraceClass CommonTrace<LibObjT>::cls() const noexcept
{
- return ConstTraceClass {_ConstSpec::cls(this->_libObjPtr())};
+ return ConstTraceClass {_ConstSpec::cls(this->libObjPtr())};
}
template <typename LibObjT>
typename CommonTrace<LibObjT>::Class CommonTrace<LibObjT>::cls() noexcept
{
- return Class {_Spec::cls(this->_libObjPtr())};
+ return Class {_Spec::cls(this->libObjPtr())};
}
-} // namespace bt2
+} /* namespace bt2 */
-#endif // BABELTRACE_CPP_COMMON_BT2_TRACE_IR_HPP
+#endif /* BABELTRACE_CPP_COMMON_BT2_TRACE_IR_HPP */