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