Babeltrace 2 C API 2.0.6
Open-source trace manipulation framework
Loading...
Searching...
No Matches
self-component-port.h
1#ifndef BABELTRACE2_GRAPH_SELF_COMPONENT_PORT_H
2#define BABELTRACE2_GRAPH_SELF_COMPONENT_PORT_H
3
4/*
5 * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
24 */
25
26#ifndef __BT_IN_BABELTRACE_H
27# error "Please include <babeltrace2/babeltrace.h> instead."
28#endif
29
30#include <babeltrace2/types.h>
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
103 bt_self_component_port *self_component_port);
104
131 const bt_self_component_port *self_component_port);
132
133
156static inline
158 bt_self_component_port *self_component_port)
159{
160 return __BT_UPCAST_CONST(bt_port, self_component_port);
161}
162
178static inline
180 const bt_self_component_port_input *self_component_port)
181{
182 return __BT_UPCAST_CONST(bt_port_input, self_component_port);
183}
184
200static inline
202 bt_self_component_port_output *self_component_port)
203{
204 return __BT_UPCAST_CONST(bt_port_output, self_component_port);
205}
206
230static inline
233 bt_self_component_port_input *self_component_port)
234{
235 return __BT_UPCAST(bt_self_component_port, self_component_port);
236}
237
254static inline
257 bt_self_component_port_output *self_component_port)
258{
259 return __BT_UPCAST(bt_self_component_port, self_component_port);
260}
261
266#ifdef __cplusplus
267}
268#endif
269
270#endif /* BABELTRACE2_GRAPH_SELF_COMPONENT_PORT_H */
struct bt_port_output bt_port_output
Output port.
Definition types.h:81
struct bt_port bt_port
Port.
Definition types.h:79
struct bt_port_input bt_port_input
Input port.
Definition types.h:80
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_self_component_port_output bt_self_component_port_output
Self component output port.
Definition types.h:95
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:201
struct bt_self_component_port bt_self_component_port
Self component component.
Definition types.h:92
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_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:256
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:179
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:232
struct bt_self_component_port_input bt_self_component_port_input
Self component input port.
Definition types.h:93
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:157
struct bt_self_component bt_self_component
Self component.
Definition types.h:85