Flow-IPC 3.0.0
Flow-IPC project: Full implementation reference.
session_server_dtl.hpp
Go to the documentation of this file.
1/* Flow-IPC: Shared Memory
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
22#include <utility>
23
25{
26
27// Types.
28
29/**
30 * This is the `friend` facade of shm::classic::Session_server that exposes specific `private` APIs hidden from public
31 * user by providing public access to them; this is used internally by at least classic::Server_session_impl. Same idea
32 * as session::Server_session_dtl and others.
33 *
34 * @tparam Base_t
35 * The type of object whose specific `private` API to expose.
36 */
37template<typename Base_t>
39{
40 // Types.
41
42 /// Short-hand for wrapped class.
43 using Base = Base_t;
44
45 // Data.
46
47 /// Direct-initializable wrapped object. Access `public` API through this reference; `private` API via `*this`.
49
50 // Methods.
51
52 /**
53 * See #Base counterpart.
54 * @param args
55 * See above.
56 * @return See above.
57 */
58 template<typename... Args>
59 Arena_ptr app_shm_ptr(Args&&... args);
60}; // struct Session_server_dtl
61
62// Template implementations.
63
64template<typename Base_t>
65template<typename... Args>
67{
68 return m_base.app_shm_ptr(std::forward<Args>(args)...);
69}
70
71} // namespace ipc::session::shm::classic
Support for SHM-backed ipc::session sessions and session-servers with the SHM-classic (ipc::shm::clas...
Definition: classic_fwd.hpp:26
boost::shared_ptr< ipc::shm::classic::Pool_arena > Arena_ptr
Ref-counted handle to a SHM-classic arena (Arena memebr alias in the classes here),...
Definition: classic_fwd.hpp:54
This is the friend facade of shm::classic::Session_server that exposes specific private APIs hidden f...
Base & m_base
Direct-initializable wrapped object. Access public API through this reference; private API via *this.
Arena_ptr app_shm_ptr(Args &&... args)
See Base counterpart.
Base_t Base
Short-hand for wrapped class.