Flow 1.0.2
Flow project: Full implementation reference.
common.hpp
Go to the documentation of this file.
1/* Flow
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 <boost/unordered_map.hpp>
22
23namespace flow
24{
25
26/// @cond
27// -^- Doxygen, please ignore the following. common.hpp documented the relevant items specially.
28
29/* The following flow::log-recommended trio of #directives begins the necessary flow::log::Component-related
30 * definitions having to do with Flow's own Component-compatible enumeration. Namely:
31 * - This defines the `enum class Flow_log_component` itself, auto-generated via macro magic.
32 * - This declares (but does not yet populate) a (Flow_log_component -> std::string) multimap containing
33 * each enum value's string representation.
34 * - common.cpp will complete this procedure by populating the map.
35 *
36 * IMPORTANT:
37 * `flow/detail/macros/log_component_enum_declare.macros.hpp` declares the log components used by all of Flow
38 * (i.e., by everything in `flow` namespace). Hence, if enum value X is in that file, then it can be (a)
39 * passed into Log_context ctor; (b) passed into FLOW_LOG_SET_CONTEXT(); (c) potentially seen in per-message
40 * log output; and (d) be used to configure verbosity for messages with component X. */
41
42// This tells the below and certain other boiler-plate macro files the name of the `enum class` being generated.
43#define FLOW_LOG_CFG_COMPONENT_ENUM_CLASS Flow_log_component
44/* This tells the below and certain other boiler-plate macro files the name of the enum-to-string multimap mapping each
45 * enum value to its name for log output and config purposes. */
46#define FLOW_LOG_CFG_COMPONENT_ENUM_NAME_MAP S_FLOW_LOG_COMPONENT_NAME_MAP
47
51
52// -v- Doxygen, please stop ignoring.
53/// @endcond
54
55} // namespace flow
Catch-all namespace for the Flow project: A collection of various production-quality modules written ...
Definition: async_fwd.hpp:75