cpp-common/bt2: make setters return `*this`
[babeltrace.git] / src / cpp-common / bt2 / self-message-iterator-configuration.hpp
CommitLineData
47cd0d7c
PP
1/*
2 * Copyright (c) 2023 Philippe Proulx <pproulx@efficios.com>
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#ifndef BABELTRACE_CPP_COMMON_BT2_SELF_MESSAGE_ITERATOR_CONFIGURATION_HPP
8#define BABELTRACE_CPP_COMMON_BT2_SELF_MESSAGE_ITERATOR_CONFIGURATION_HPP
9
10#include <babeltrace2/babeltrace.h>
11
12#include "borrowed-object.hpp"
13
14namespace bt2 {
15
16class SelfMessageIteratorConfiguration final :
17 public BorrowedObject<bt_self_message_iterator_configuration>
18{
19public:
d246c457 20 explicit SelfMessageIteratorConfiguration(const LibObjPtr libObjPtr) noexcept :
47cd0d7c
PP
21 _ThisBorrowedObject {libObjPtr}
22 {
23 }
24
2a24eba8 25 SelfMessageIteratorConfiguration canSeekForward(const bool canSeekForward) const noexcept
47cd0d7c
PP
26 {
27 bt_self_message_iterator_configuration_set_can_seek_forward(
28 this->libObjPtr(), static_cast<bt_bool>(canSeekForward));
2a24eba8 29 return *this;
47cd0d7c
PP
30 }
31};
32
33} /* namespace bt2 */
34
35#endif /* BABELTRACE_CPP_COMMON_BT2_SELF_MESSAGE_ITERATOR_CONFIGURATION_HPP */
This page took 0.02779 seconds and 4 git commands to generate.