cpp-common/bt2c/fmt.hpp: use `wise_enum::string_type` in `EnableIfIsWiseEnum` definition
[babeltrace.git] / include / babeltrace2 / graph / private-query-executor.h
1 /*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
5 */
6
7 #ifndef BABELTRACE2_GRAPH_PRIVATE_QUERY_EXECUTOR_H
8 #define BABELTRACE2_GRAPH_PRIVATE_QUERY_EXECUTOR_H
9
10 /* IWYU pragma: private, include <babeltrace2/babeltrace.h> */
11
12 #ifndef __BT_IN_BABELTRACE_H
13 # error "Please include <babeltrace2/babeltrace.h> instead."
14 #endif
15
16 #include <babeltrace2/types.h>
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 /*!
23 @defgroup api-priv-qexec Private query executor
24 @ingroup api-comp-cls-dev
25
26 @brief
27 Private view of a \bt_qexec for a \bt_comp_cls
28 \ref api-comp-cls-dev-meth-query "query method".
29
30 A <strong><em>private query executor</em></strong> is a private view,
31 from within a \bt_comp_cls
32 \ref api-comp-cls-dev-meth-query "query method", of a
33 \bt_qexec.
34
35 A query method receives a private query executor as its
36 \bt_p{query_executor} parameter.
37
38 As of \bt_name_version_min_maj, this module only offers the
39 bt_private_query_executor_as_query_executor_const() function to
40 \ref api-fund-c-typing "upcast" a private query executor to a
41 \c const query executor. You need this to get the query executor's
42 \ref api-qexec-prop-log-lvl "logging level".
43 */
44
45 /*! @{ */
46
47 /*!
48 @name Type
49 @{
50
51 @typedef struct bt_private_query_executor bt_private_query_executor;
52
53 @brief
54 Private query executor.
55
56 @}
57 */
58
59 /*!
60 @name Upcast
61 @{
62 */
63
64 /*!
65 @brief
66 \ref api-fund-c-typing "Upcasts" the private query executor
67 \bt_p{query_executor} to the public #bt_query_executor type.
68
69 @param[in] query_executor
70 @parblock
71 Private query executor to upcast.
72
73 Can be \c NULL.
74 @endparblock
75
76 @returns
77 \bt_p{query_executor} as a public query executor.
78 */
79 static inline
80 const bt_query_executor *
81 bt_private_query_executor_as_query_executor_const(
82 bt_private_query_executor *query_executor) __BT_NOEXCEPT
83 {
84 return __BT_UPCAST_CONST(bt_query_executor, query_executor);
85 }
86
87 /*! @} */
88
89 /*! @} */
90
91 #ifdef __cplusplus
92 }
93 #endif
94
95 #endif /* BABELTRACE2_GRAPH_PRIVATE_QUERY_EXECUTOR_H */
This page took 0.034654 seconds and 5 git commands to generate.