Flow-IPC 1.0.0
Flow-IPC project: Full implementation reference.
session_fwd.hpp
Go to the documentation of this file.
1/* Flow-IPC: Sessions
2 * Copyright 2023 Akamai Technologies, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the
5 * "License"); you may not use this file except in
6 * compliance with the License. You may obtain a copy
7 * of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in
12 * writing, software distributed under the License is
13 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14 * CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing
16 * permissions and limitations under the License. */
17
18/// @file
19#pragma once
20
21#include "ipc/session/schema/common.capnp.h"
22#include <ostream>
23
24namespace ipc::session
25{
26
27// Types.
28
29// Find doc headers near the bodies of these compound types.
30
31template<schema::MqType S_MQ_TYPE_OR_NONE, bool S_TRANSMIT_NATIVE_HANDLES, typename Mdt_payload>
32class Session_base;
33
34template<schema::MqType S_MQ_TYPE_OR_NONE, bool S_TRANSMIT_NATIVE_HANDLES, typename Mdt_payload,
35 schema::ShmType S_SHM_TYPE_OR_NONE = schema::ShmType::NONE,
36 size_t S_SHM_MAX_HNDL_SZ = 0,
37 bool S_GRACEFUL_FINISH_REQUIRED_V = false>
38class Server_session_impl;
39
40template<schema::MqType S_MQ_TYPE_OR_NONE, bool S_TRANSMIT_NATIVE_HANDLES, typename Mdt_payload,
41 schema::ShmType S_SHM_TYPE_OR_NONE = schema::ShmType::NONE,
42 bool S_GRACEFUL_FINISH_REQUIRED_V = false>
43class Client_session_impl;
44
45template<typename Server_session_t>
46class Server_session_dtl;
47
48template<typename Session_server_t, typename Server_session_t>
49class Session_server_impl;
50
51// Free functions.
52
53/**
54 * Prints string representation of the given `Server_session_impl` to the given `ostream`.
55 *
56 * @relatesalso Server_session_impl
57 *
58 * @param os
59 * Stream to which to write.
60 * @param val
61 * Object to serialize.
62 * @return `os`.
63 */
64template<schema::MqType S_MQ_TYPE_OR_NONE, bool S_TRANSMIT_NATIVE_HANDLES, typename Mdt_payload,
65 schema::ShmType S_SHM_TYPE_OR_NONE, size_t S_SHM_MAX_HNDL_SZ, bool S_GRACEFUL_FINISH_REQUIRED_V>
66std::ostream& operator<<(std::ostream& os,
67 const Server_session_impl<S_MQ_TYPE_OR_NONE, S_TRANSMIT_NATIVE_HANDLES,
68 Mdt_payload, S_SHM_TYPE_OR_NONE, S_SHM_MAX_HNDL_SZ,
69 S_GRACEFUL_FINISH_REQUIRED_V>& val);
70
71/**
72 * Prints string representation of the given `Client_session_impl` to the given `ostream`.
73 *
74 * @relatesalso Client_session_impl
75 *
76 * @param os
77 * Stream to which to write.
78 * @param val
79 * Object to serialize.
80 * @return `os`.
81 */
82template<schema::MqType S_MQ_TYPE_OR_NONE, bool S_TRANSMIT_NATIVE_HANDLES, typename Mdt_payload,
83 schema::ShmType S_SHM_TYPE_OR_NONE, bool S_GRACEFUL_FINISH_REQUIRED_V>
84std::ostream& operator<<(std::ostream& os,
85 const Client_session_impl<S_MQ_TYPE_OR_NONE, S_TRANSMIT_NATIVE_HANDLES,
86 Mdt_payload, S_SHM_TYPE_OR_NONE,
87 S_GRACEFUL_FINISH_REQUIRED_V>& val);
88
89/**
90 * Prints string representation of the given `Session_server_impl` to the given `ostream`.
91 *
92 * @relatesalso Session_server_impl
93 *
94 * @param os
95 * Stream to which to write.
96 * @param val
97 * Object to serialize.
98 * @return `os`.
99 */
100template<typename Session_server_t, typename Server_session_t>
101std::ostream& operator<<(std::ostream& os,
102 const Session_server_impl<Session_server_t, Server_session_t>& val);
103
104} // namespace ipc::session
Flow-IPC module providing the broad lifecycle and shared-resource organization – via the session conc...
Definition: app.cpp:27
std::ostream & operator<<(std::ostream &os, const App &val)
Prints string representation of the given App to the given ostream.
Definition: app.cpp:124