pars
0.2.1
Loading...
Searching...
No Matches
lib
include
nngxx
pipe.h
Go to the documentation of this file.
1
/*
2
Copyright (c) 2025 Giuseppe Roberti.
3
All rights reserved.
4
5
Redistribution and use in source and binary forms, with or without modification,
6
are permitted provided that the following conditions are met:
7
8
1. Redistributions of source code must retain the above copyright notice, this
9
list of conditions and the following disclaimer.
10
11
2. Redistributions in binary form must reproduce the above copyright notice,
12
this list of conditions and the following disclaimer in the documentation and/or
13
other materials provided with the distribution.
14
15
3. Neither the name of the copyright holder nor the names of its contributors
16
may be used to endorse or promote products derived from this software without
17
specific prior written permission.
18
19
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
*/
30
#pragma once
31
32
#include "
nngxx/iface/pipe.h
"
33
34
namespace
nngxx
35
{
36
37
using
pipe_view
=
clev::iface<nng_pipe>
;
38
39
enum class
pipe_ev
40
{
41
add_pre
= NNG_PIPE_EV_ADD_PRE,
42
add_post
= NNG_PIPE_EV_ADD_POST,
43
rem_post
= NNG_PIPE_EV_REM_POST,
44
num
= NNG_PIPE_EV_NUM
45
};
46
47
inline
nng_pipe_ev
cast_pipe_ev
(
pipe_ev
ev)
noexcept
48
{
49
return
static_cast<
nng_pipe_ev
>
(ev);
50
}
51
52
inline
pipe_ev
cast_pipe_ev
(nng_pipe_ev ev)
noexcept
53
{
54
return
static_cast<
pipe_ev
>
(ev);
55
}
56
57
}
// namespace nngxx
58
59
static_assert
(std::copyable<nngxx::pipe_view>);
nngxx
Definition
aio.h:35
nngxx::pipe_ev
pipe_ev
Definition
pipe.h:40
nngxx::pipe_ev::num
@ num
Definition
pipe.h:44
nngxx::pipe_ev::rem_post
@ rem_post
Definition
pipe.h:43
nngxx::pipe_ev::add_pre
@ add_pre
Definition
pipe.h:41
nngxx::pipe_ev::add_post
@ add_post
Definition
pipe.h:42
nngxx::pipe_view
clev::iface< nng_pipe > pipe_view
Definition
pipe.h:37
nngxx::cast_pipe_ev
nng_pipe_ev cast_pipe_ev(pipe_ev ev) noexcept
Definition
pipe.h:47
pipe.h
clev::iface
Definition
iface.h:36
Generated by
1.13.2