1#ifndef BABELTRACE2_GRAPH_COMPONENT_H 
    2#define BABELTRACE2_GRAPH_COMPONENT_H 
   26#ifndef __BT_IN_BABELTRACE_H 
   27# error "Please include <babeltrace2/babeltrace.h> instead." 
   30#include <babeltrace2/graph/component-class.h> 
   31#include <babeltrace2/types.h> 
   32#include <babeltrace2/logging.h> 
  452#define BT_COMPONENT_PUT_REF_AND_RESET(_component)  \ 
  454        bt_component_put_ref(_component);   \ 
  455        (_component) = NULL;            \ 
 
  483#define BT_COMPONENT_MOVE_REF(_dst, _src)   \ 
  485        bt_component_put_ref(_dst); \ 
 
  686#define BT_COMPONENT_SOURCE_PUT_REF_AND_RESET(_component)   \ 
  688        bt_component_source_put_ref(_component);    \ 
  689        (_component) = NULL;                \ 
 
  717#define BT_COMPONENT_SOURCE_MOVE_REF(_dst, _src)    \ 
  719        bt_component_source_put_ref(_dst);  \ 
 
  999#define BT_COMPONENT_FILTER_PUT_REF_AND_RESET(_component)   \ 
 1001        bt_component_filter_put_ref(_component);    \ 
 1002        (_component) = NULL;                \ 
 
 1030#define BT_COMPONENT_FILTER_MOVE_REF(_dst, _src)    \ 
 1032        bt_component_filter_put_ref(_dst);  \ 
 
 1233#define BT_COMPONENT_SINK_PUT_REF_AND_RESET(_component)     \ 
 1235        bt_component_sink_put_ref(_component);      \ 
 1236        (_component) = NULL;                \ 
 
 1265#define BT_COMPONENT_SINK_MOVE_REF(_dst, _src)      \ 
 1267        bt_component_sink_put_ref(_dst);    \ 
 
int bt_bool
Babeltrace 2 boolean type.
Definition types.h:140
bt_component_class_type
Component class type enumerators.
Definition component-class.h:214
struct bt_component_class_sink bt_component_class_sink
Sink component class.
Definition types.h:41
struct bt_component_class_source bt_component_class_source
Source component class.
Definition types.h:42
struct bt_component_class_filter bt_component_class_filter
Filter component class.
Definition types.h:40
struct bt_component_class bt_component_class
Component class.
Definition types.h:39
@ BT_COMPONENT_CLASS_TYPE_FILTER
Filter component class.
Definition component-class.h:225
@ BT_COMPONENT_CLASS_TYPE_SOURCE
Source component class.
Definition component-class.h:219
@ BT_COMPONENT_CLASS_TYPE_SINK
Sink component class.
Definition component-class.h:231
static const bt_component * bt_component_source_as_component_const(const bt_component_source *component)
Upcasts the source component component to the common bt_component type.
Definition component.h:537
const bt_port_input * bt_component_sink_borrow_input_port_by_index_const(const bt_component_sink *component, uint64_t index)
Borrows the input port at index index from the sink component component.
uint64_t bt_component_source_get_output_port_count(const bt_component_source *component)
Returns the number of output ports that the source component component has.
static bt_bool bt_component_is_source(const bt_component *component)
Returns whether or not the component component is a source component.
Definition component.h:276
const bt_component_class * bt_component_borrow_class_const(const bt_component *component)
Borrows the class of the component component.
void bt_component_sink_get_ref(const bt_component_sink *component)
Increments the reference count of the sink component component.
void bt_component_source_get_ref(const bt_component_source *component)
Increments the reference count of the source component component.
const bt_port_input * bt_component_filter_borrow_input_port_by_name_const(const bt_component_filter *component, const char *name)
Borrows the input port named name from the filter component component.
const char * bt_component_get_name(const bt_component *component)
Returns the name of the component component.
const bt_component_class_filter * bt_component_filter_borrow_class_const(const bt_component_filter *component)
Borrows the class of the filter component component.
const bt_port_output * bt_component_filter_borrow_output_port_by_name_const(const bt_component_filter *component, const char *name)
Borrows the output port named name from the filter component component.
uint64_t bt_component_filter_get_output_port_count(const bt_component_filter *component)
Returns the number of output ports that the filter component component has.
struct bt_component_filter bt_component_filter
Filter component.
Definition types.h:44
bt_component_class_type bt_component_get_class_type(const bt_component *component)
Returns the type enumerator of the class of the component component.
const bt_port_output * bt_component_source_borrow_output_port_by_name_const(const bt_component_source *component, const char *name)
Borrows the output port named name from the source component component.
void bt_component_filter_put_ref(const bt_component_filter *component)
Decrements the reference count of the filter component component.
void bt_component_filter_get_ref(const bt_component_filter *component)
Increments the reference count of the filter component component.
void bt_component_sink_put_ref(const bt_component_sink *component)
Decrements the reference count of the sink component component.
void bt_component_put_ref(const bt_component *component)
Decrements the reference count of the component component.
uint64_t bt_component_sink_get_input_port_count(const bt_component_sink *component)
Returns the number of input ports that the sink component component has.
struct bt_component_source bt_component_source
Source component.
Definition types.h:46
static bt_bool bt_component_is_sink(const bt_component *component)
Returns whether or not the component component is a sink component.
Definition component.h:322
const bt_port_output * bt_component_filter_borrow_output_port_by_index_const(const bt_component_filter *component, uint64_t index)
Borrows the output port at index index from the filter component component.
struct bt_component bt_component
Component.
Definition types.h:38
void bt_component_get_ref(const bt_component *component)
Increments the reference count of the component component.
static const bt_component * bt_component_sink_as_component_const(const bt_component_sink *component)
Upcasts the sink component component to the common bt_component type.
Definition component.h:1084
const bt_port_input * bt_component_filter_borrow_input_port_by_index_const(const bt_component_filter *component, uint64_t index)
Borrows the input port at index index from the filter component component.
static const bt_component * bt_component_filter_as_component_const(const bt_component_filter *component)
Upcasts the filter component component to the common bt_component type.
Definition component.h:771
const bt_port_output * bt_component_source_borrow_output_port_by_index_const(const bt_component_source *component, uint64_t index)
Borrows the output port at index index from the source component component.
void bt_component_source_put_ref(const bt_component_source *component)
Decrements the reference count of the source component component.
struct bt_component_sink bt_component_sink
Sink component.
Definition types.h:45
const bt_component_class_sink * bt_component_sink_borrow_class_const(const bt_component_sink *component)
Borrows the class of the sink component component.
bt_logging_level bt_component_get_logging_level(const bt_component *component)
Returns the logging level of the component component and its message iterators, if any.
static bt_bool bt_component_is_filter(const bt_component *component)
Returns whether or not the component component is a filter component.
Definition component.h:299
const bt_port_input * bt_component_sink_borrow_input_port_by_name_const(const bt_component_sink *component, const char *name)
Borrows the output port named name from the sink component component.
uint64_t bt_component_filter_get_input_port_count(const bt_component_filter *component)
Returns the number of input ports that the filter component component has.
const bt_component_class_source * bt_component_source_borrow_class_const(const bt_component_source *component)
Borrows the class of the source component component.
bt_logging_level
Logging level enumerators.
Definition logging.h:110
struct bt_port_output bt_port_output
Output port.
Definition types.h:81
struct bt_port_input bt_port_input
Input port.
Definition types.h:80