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