YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
bidirectional_intrusive_list.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
yaclib/log.hpp
>
4
5
#include <cstdint>
6
7
namespace
yaclib::detail::fiber
{
8
9
struct
Node
{
10
Node
*
prev
{
this
};
11
Node
*
next
{
this
};
12
13
bool
Erase
();
14
};
15
16
class
BiList
final
{
17
public
:
18
BiList
&
operator=
(
const
BiList
&) =
delete
;
19
BiList
&
operator=
(
BiList
&&)
noexcept
;
20
BiList
(
const
BiList
&) =
delete
;
21
22
BiList
()
noexcept
=
default
;
23
BiList
(
BiList
&&)
noexcept
;
24
25
void
PushBack
(
Node
*
node
)
noexcept
;
26
27
void
PushAll
(
BiList
&&
other
)
noexcept
;
28
29
Node
*
PopBack
()
noexcept
;
30
31
[[
nodiscard
]]
bool
Empty
()
const
noexcept
;
32
33
[[
nodiscard
]]
Node
*
GetElement
(std::
size_t
ind
,
bool
reversed
)
const
noexcept
;
34
35
private
:
36
Node
_head;
37
};
38
39
}
// namespace yaclib::detail::fiber
yaclib::detail::fiber::BiList
Definition
bidirectional_intrusive_list.hpp:16
yaclib::detail::fiber::BiList::Empty
bool Empty() const noexcept
Definition
bidirectional_intrusive_list.cpp:15
yaclib::detail::fiber::BiList::GetElement
Node * GetElement(std::size_t ind, bool reversed) const noexcept
Definition
bidirectional_intrusive_list.cpp:32
yaclib::detail::fiber::BiList::PopBack
Node * PopBack() noexcept
Definition
bidirectional_intrusive_list.cpp:26
yaclib::detail::fiber::BiList::PushBack
void PushBack(Node *node) noexcept
Definition
bidirectional_intrusive_list.cpp:7
yaclib::detail::fiber::BiList::operator=
BiList & operator=(const BiList &)=delete
yaclib::detail::fiber::BiList::PushAll
void PushAll(BiList &&other) noexcept
Definition
bidirectional_intrusive_list.cpp:93
log.hpp
yaclib::detail::fiber
Definition
atomic.hpp:7
yaclib::MakeContract
Contract< V, E > MakeContract()
Creates related future and promise.
Definition
contract.hpp:25
yaclib::detail::fiber::Node
Definition
bidirectional_intrusive_list.hpp:9
yaclib::detail::fiber::Node::prev
Node * prev
Definition
bidirectional_intrusive_list.hpp:10
yaclib::detail::fiber::Node::Erase
bool Erase()
Definition
bidirectional_intrusive_list.cpp:103
yaclib::detail::fiber::Node::next
Node * next
Definition
bidirectional_intrusive_list.hpp:11
include
yaclib
fault
detail
fiber
bidirectional_intrusive_list.hpp
Generated by
1.9.8