7#ifndef BABELTRACE2_GRAPH_PORT_H
8#define BABELTRACE2_GRAPH_PORT_H
12#ifndef __BT_IN_BABELTRACE_H
13# error "Please include <babeltrace2/babeltrace.h> instead."
18#include <babeltrace2/types.h>
263 const bt_port *port) __BT_NOEXCEPT;
285 const bt_port *port) __BT_NOEXCEPT;
385#define BT_PORT_PUT_REF_AND_RESET(_port) \
387 bt_port_put_ref(_port); \
416#define BT_PORT_MOVE_REF(_dst, _src) \
418 bt_port_put_ref(_dst); \
449 return __BT_UPCAST_CONST(
bt_port, port);
500#define BT_PORT_INPUT_PUT_REF_AND_RESET(_port) \
502 bt_port_input_put_ref(_port); \
531#define BT_PORT_INPUT_MOVE_REF(_dst, _src) \
533 bt_port_input_put_ref(_dst); \
564 return __BT_UPCAST_CONST(
bt_port, port);
615#define BT_PORT_OUTPUT_PUT_REF_AND_RESET(_port) \
617 bt_port_output_put_ref(_port); \
646#define BT_PORT_OUTPUT_MOVE_REF(_dst, _src) \
648 bt_port_output_put_ref(_dst); \
int bt_bool
Babeltrace 2 boolean type.
Definition types.h:126
struct bt_component bt_component
Component.
Definition types.h:24
struct bt_connection bt_connection
Connection.
Definition types.h:33
void bt_port_output_get_ref(const bt_port_output *port)
Increments the reference count of the output port port.
void bt_port_input_get_ref(const bt_port_input *port)
Increments the reference count of the input port port.
void bt_port_put_ref(const bt_port *port)
Decrements the reference count of the port port.
struct bt_port_output bt_port_output
Output port.
Definition types.h:67
struct bt_port bt_port
Port.
Definition types.h:65
bt_bool bt_port_is_connected(const bt_port *port)
Returns whether or not the port port is connected.
bt_port_type bt_port_get_type(const bt_port *port)
Returns the type enumerator of the port port.
const bt_component * bt_port_borrow_component_const(const bt_port *port)
Borrows the component to which the port port belongs.
static bt_bool bt_port_is_input(const bt_port *port)
Returns whether or not the port port is an input port.
Definition port.h:214
void bt_port_output_put_ref(const bt_port_output *port)
Decrements the reference count of the output port port.
static const bt_port * bt_port_output_as_port_const(const bt_port_output *port)
Upcasts the output port port to the common bt_port type.
Definition port.h:561
struct bt_port_input bt_port_input
Input port.
Definition types.h:66
static bt_bool bt_port_is_output(const bt_port *port)
Returns whether or not the port port is an output port.
Definition port.h:235
bt_port_type
Port type enumerators.
Definition port.h:165
void bt_port_get_ref(const bt_port *port)
Increments the reference count of the port port.
const bt_connection * bt_port_borrow_connection_const(const bt_port *port)
Borrows the connection of the port port.
void bt_port_input_put_ref(const bt_port_input *port)
Decrements the reference count of the input port port.
static const bt_port * bt_port_input_as_port_const(const bt_port_input *port)
Upcasts the input port port to the common bt_port type.
Definition port.h:446
const char * bt_port_get_name(const bt_port *port)
Returns the name of the port port.
@ BT_PORT_TYPE_INPUT
Input port.
Definition port.h:170
@ BT_PORT_TYPE_OUTPUT
Output port.
Definition port.h:176