Flow-IPC 3.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 MQ_TYPE_OR_NONE, bool TRANSMIT_NATIVE_HANDLES, typename Mdt_payload>
32class Session_base;
33
34template<schema::MqType MQ_TYPE_OR_NONE, bool TRANSMIT_NATIVE_HANDLES, typename Mdt_payload,
35 schema::ShmType SHM_TYPE_OR_NONE = schema::ShmType::NONE,
36 size_t SHM_MAX_HNDL_SZ = 0,
37 bool GRACEFUL_FINISH_REQUIRED = false>
38class Server_session_impl;
39
40template<schema::MqType MQ_TYPE_OR_NONE, bool TRANSMIT_NATIVE_HANDLES, typename Mdt_payload,
41 schema::ShmType SHM_TYPE_OR_NONE = schema::ShmType::NONE,
42 bool GRACEFUL_FINISH_REQUIRED = false>
43class Client_session_impl;
44
45template<typename Server_session_t>
46struct Server_session_dtl;
47
48struct Info_collector_dtl;
49
50template<typename Session_server_t, typename Server_session_t>
51class Session_server_impl;
52
53// Free functions.
54
55/**
56 * Prints string representation of the given `Server_session_impl` to the given `ostream`.
57 *
58 * @relatesalso Server_session_impl
59 *
60 * @param os
61 * Stream to which to write.
62 * @param val
63 * Object to serialize.
64 * @return `os`.
65 */
66template<schema::MqType MQ_TYPE_OR_NONE, bool TRANSMIT_NATIVE_HANDLES, typename Mdt_payload,
67 schema::ShmType SHM_TYPE_OR_NONE, size_t SHM_MAX_HNDL_SZ, bool GRACEFUL_FINISH_REQUIRED>
68std::ostream& operator<<(std::ostream& os,
69 const Server_session_impl<MQ_TYPE_OR_NONE, TRANSMIT_NATIVE_HANDLES,
70 Mdt_payload, SHM_TYPE_OR_NONE, SHM_MAX_HNDL_SZ,
71 GRACEFUL_FINISH_REQUIRED>& val);
72
73/**
74 * Prints string representation of the given `Client_session_impl` to the given `ostream`.
75 *
76 * @relatesalso Client_session_impl
77 *
78 * @param os
79 * Stream to which to write.
80 * @param val
81 * Object to serialize.
82 * @return `os`.
83 */
84template<schema::MqType MQ_TYPE_OR_NONE, bool TRANSMIT_NATIVE_HANDLES, typename Mdt_payload,
85 schema::ShmType SHM_TYPE_OR_NONE, bool GRACEFUL_FINISH_REQUIRED>
86std::ostream& operator<<(std::ostream& os,
87 const Client_session_impl<MQ_TYPE_OR_NONE, TRANSMIT_NATIVE_HANDLES,
88 Mdt_payload, SHM_TYPE_OR_NONE,
89 GRACEFUL_FINISH_REQUIRED>& val);
90
91/**
92 * Prints string representation of the given `Session_server_impl` to the given `ostream`.
93 *
94 * @relatesalso Session_server_impl
95 *
96 * @param os
97 * Stream to which to write.
98 * @param val
99 * Object to serialize.
100 * @return `os`.
101 */
102template<typename Session_server_t, typename Server_session_t>
103std::ostream& operator<<(std::ostream& os,
104 const Session_server_impl<Session_server_t, Server_session_t>& val);
105
106} // namespace ipc::session
Flow-IPC module providing the broad lifecycle and shared-resource organization – via the session conc...
Definition: app.cpp:29
std::ostream & operator<<(std::ostream &os, const App &val)
Prints string representation of the given App to the given ostream.
Definition: app.cpp:130