Sturk 1.0.2
Publish-subscribe C implementation.
Loading...
Searching...
No Matches
streambag.h File Reference

Bag of streams. More...

#include "st/os/fstream.h"
Include dependency graph for streambag.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct StStreamBag StStreamBag
 A bag of streams.
 

Functions

StStreamBagst_streambag_create (void)
 Create a new empty bag of streams.
 
void st_streambag_destroy (StStreamBag *bag)
 Destroy a bag of streams.
 
void st_streambag_ins (StStreamBag *bag, StFstream *stream)
 Insert a stream into a bag.
 
void st_streambag_rem (StStreamBag *bag, StFstream *stream)
 Remove a stream from a bag.
 
void st_streambag_vprint (StStreamBag *bag, const char *format, va_list vlist)
 Print to all streams from a bag.
 
int st_streambag_count (const StStreamBag *bag)
 Get the number of streams in a bag.
 

Detailed Description

Bag of streams.

Function Documentation

◆ st_streambag_count()

int st_streambag_count ( const StStreamBag bag)

Get the number of streams in a bag.

Parameters
[in]bagThe bag.
Returns
The number of streams.

◆ st_streambag_create()

StStreamBag * st_streambag_create ( void  )

Create a new empty bag of streams.

Returns
An empty bag of streams.

◆ st_streambag_destroy()

void st_streambag_destroy ( StStreamBag bag)

Destroy a bag of streams.

Parameters
[in,out]bagThe bag.

◆ st_streambag_ins()

void st_streambag_ins ( StStreamBag bag,
StFstream stream 
)

Insert a stream into a bag.

Parameters
[in,out]bagThe bag.
[in]streamThe stream.

◆ st_streambag_rem()

void st_streambag_rem ( StStreamBag bag,
StFstream stream 
)

Remove a stream from a bag.

Parameters
[in,out]bagThe bag.
[in]streamThe stream.

◆ st_streambag_vprint()

void st_streambag_vprint ( StStreamBag bag,
const char *  format,
va_list  vlist 
)

Print to all streams from a bag.

Parameters
[in,out]bagThe bag.
[in]formatThe format string.
[in]vlistThe list of arguments.