Flow-IPC 3.0.0
Flow-IPC project: Full implementation reference.
classic_fwd.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
21#include <flow/util/stat/stat_fwd.hpp>
22#include <ostream>
23
24/// ipc::shm sub-module with the SHM-classic SHM-provider. See ipc::shm doc header for introduction.
26{
27
28// Types.
29
30// Find doc headers near the bodies of these compound types.
31
32class Pool_arena;
33
34// Free functions.
35
36/**
37 * Prints string representation of the given `Pool_arena` to the given `ostream`.
38 *
39 * @relatesalso Pool_arena
40 *
41 * @param os
42 * Stream to which to write.
43 * @param val
44 * Object to serialize.
45 * @return `os`.
46 */
47std::ostream& operator<<(std::ostream& os, const Pool_arena& val);
48
49} // namespace ipc::shm::classic
50
51/// Stats-related sub-namespace, for ADL segregation and general organization.
53{
54
55// Types.
56
57// Find doc headers near the bodies of these compound types.
58
59struct Arena_stats;
60struct Local_stats;
61struct Arena_info_dump;
62
63// Free functions.
64
65/**
66 * Prints string representation of the given `Arena_info_dump` to the given `ostream`.
67 *
68 * @note `val.m_fmt` (util::stat::Info_dump_format) may contain knobs to affect the shape of the printed output.
69 *
70 * @relatesalso Arena_info_dump
71 *
72 * @param os
73 * Stream to which to write.
74 * @param val
75 * Object to serialize.
76 * @return `os`.
77 */
78std::ostream& operator<<(std::ostream& os, const Arena_info_dump& val);
79
80/**
81 * Declares the stats for Arena_stats. Not invoked directly except by `flow::util::stat` internals,
82 * or when composing this stat-set into another.
83 * @see `flow::util::stat` namespace doc header for background on the declare/visit mechanism.
84 *
85 * @tparam Visitor
86 * See above.
87 * @param name_prefix
88 * See above.
89 * @param src_stats
90 * See above.
91 * @param target_stats
92 * See above.
93 * @param visitor
94 * See above.
95 */
96template<typename Visitor>
97void declare_stats(const flow::util::stat::Stat_name& name_prefix,
98 const Arena_stats* src_stats, Arena_stats* target_stats,
99 Visitor&& visitor);
100
101/**
102 * Declares the stats for Local_stats. Not invoked directly except by `flow::util::stat` internals,
103 * or when composing this stat-set into another.
104 * @see `flow::util::stat` namespace doc header for background on the declare/visit mechanism.
105 *
106 * @tparam Visitor
107 * See above.
108 * @param name_prefix
109 * See above.
110 * @param src_stats
111 * See above.
112 * @param target_stats
113 * See above.
114 * @param visitor
115 * See above.
116 */
117template<typename Visitor>
118void declare_stats(const flow::util::stat::Stat_name& name_prefix,
119 const Local_stats* src_stats, Local_stats* target_stats,
120 Visitor&& visitor);
121
122} // namespace ipc::shm::classic::stat
A SHM-classic interface around a single SHM pool with allocation-algorithm services by boost....
Definition: pool_arena.hpp:225
Stats-related sub-namespace, for ADL segregation and general organization.
Definition: classic_fwd.hpp:53
void declare_stats(const flow::util::stat::Stat_name &name_prefix, const Arena_stats *src_stats, Arena_stats *target_stats, Visitor &&visitor)
Declares the stats for Arena_stats.
std::ostream & operator<<(std::ostream &os, const Arena_info_dump &val)
Prints string representation of the given Arena_info_dump to the given ostream.
ipc::shm sub-module with the SHM-classic SHM-provider. See ipc::shm doc header for introduction.
Definition: classic_fwd.hpp:26
std::ostream & operator<<(std::ostream &os, const Pool_arena &val)
Prints string representation of the given Pool_arena to the given ostream.
Definition: pool_arena.cpp:418
Printable (with knobs in contained util::stat::Info_dump_format) bundling of stats/info pertaining to...
Cumulative stats relevant to one SHM-classic arena – in this case single SHM-pool in shared memory,...
Cumulative stats relevant to a given SHM-classic arena object – a Pool_arena – and excluding those in...