Babeltrace 2 C API  2.1.0
Open-source trace manipulation framework
self-component-port.h
1 /*
2  * SPDX-License-Identifier: MIT
3  *
4  * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
5  */
6 
7 #ifndef BABELTRACE2_GRAPH_SELF_COMPONENT_PORT_H
8 #define BABELTRACE2_GRAPH_SELF_COMPONENT_PORT_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 
89  bt_self_component_port *self_component_port) __BT_NOEXCEPT;
90 
117  const bt_self_component_port *self_component_port)
118  __BT_NOEXCEPT;
119 
142 static inline
144  bt_self_component_port *self_component_port) __BT_NOEXCEPT
145 {
146  return __BT_UPCAST_CONST(bt_port, self_component_port);
147 }
148 
164 static inline
166  const bt_self_component_port_input *self_component_port)
167  __BT_NOEXCEPT
168 {
169  return __BT_UPCAST_CONST(bt_port_input, self_component_port);
170 }
171 
187 static inline
189  bt_self_component_port_output *self_component_port)
190  __BT_NOEXCEPT
191 {
192  return __BT_UPCAST_CONST(bt_port_output, self_component_port);
193 }
194 
218 static inline
221  bt_self_component_port_input *self_component_port)
222  __BT_NOEXCEPT
223 {
224  return __BT_UPCAST(bt_self_component_port, self_component_port);
225 }
226 
243 static inline
246  bt_self_component_port_output *self_component_port)
247  __BT_NOEXCEPT
248 {
249  return __BT_UPCAST(bt_self_component_port, self_component_port);
250 }
251 
256 #ifdef __cplusplus
257 }
258 #endif
259 
260 #endif /* BABELTRACE2_GRAPH_SELF_COMPONENT_PORT_H */
static const bt_port_input * bt_self_component_port_input_as_port_input(const bt_self_component_port_input *self_component_port)
Upcasts the self component input port self_component_port to the public bt_port_input type...
Definition: self-component-port.h:165
bt_self_component * bt_self_component_port_borrow_component(bt_self_component_port *self_component_port)
Borrows the component of the port self_component_port.
static bt_self_component_port * bt_self_component_port_input_as_self_component_port(bt_self_component_port_input *self_component_port)
Upcasts the self input port self_component_port to the common bt_self_component_port type...
Definition: self-component-port.h:220
struct bt_port_input bt_port_input
Input port.
Definition: types.h:66
struct bt_port_output bt_port_output
Output port.
Definition: types.h:67
struct bt_self_component bt_self_component
Self component.
Definition: types.h:71
struct bt_self_component_port_input bt_self_component_port_input
Self component input port.
Definition: types.h:79
void * bt_self_component_port_get_data(const bt_self_component_port *self_component_port)
Returns the user data of the port self_component_port.
struct bt_port bt_port
Port.
Definition: types.h:65
struct bt_self_component_port bt_self_component_port
Self component component.
Definition: types.h:78
static bt_self_component_port * bt_self_component_port_output_as_self_component_port(bt_self_component_port_output *self_component_port)
Upcasts the self output port self_component_port to the common bt_self_component_port type...
Definition: self-component-port.h:245
static const bt_port_output * bt_self_component_port_output_as_port_output(bt_self_component_port_output *self_component_port)
Upcasts the self component output port self_component_port to the public bt_port_output type...
Definition: self-component-port.h:188
struct bt_self_component_port_output bt_self_component_port_output
Self component output port.
Definition: types.h:81
static const bt_port * bt_self_component_port_as_port(bt_self_component_port *self_component_port)
Upcasts the self component port self_component_port to the public bt_port type.
Definition: self-component-port.h:143