Sturk 1.0.2
Publish-subscribe C implementation.
|
Doubly linked circular list. More...
#include "vx/graph.h"
Go to the source code of this file.
Macros | |
#define | VX_CIRQ(name, type) VX_GRAPH(name, 2, type) |
Define the cirq. | |
#define | vx_cirq_ins(cirq, ...) VX__CIRQ_INS((cirq), __VA_ARGS__, -1, ) |
Insert, at a given position, an entry into a cirq. | |
#define | vx_cirq_rem(...) VX__CIRQ_REM(__VA_ARGS__, 0, ) |
Remove, at a given position, an entry from a cirq. | |
Doubly linked circular list.
This header file provides data types, functions and macros that define and operate on doubly linked circular lists.
#define VX_CIRQ | ( | name, | |
type | |||
) | VX_GRAPH(name, 2, type) |
Define the cirq.
[in] | name | The name of the type used for the cirq. |
[in] | type | The type of the data held by name. |
This macro will define a compound type (must be struct or union) name, a type for a cirq entry that holds the data of the type type.
#define vx_cirq_ins | ( | cirq, | |
... | |||
) | VX__CIRQ_INS((cirq), __VA_ARGS__, -1, ) |
Insert, at a given position, an entry into a cirq.
A call vx_cirq_ins(cirq, entry, pos) will insert the entry into the cirq at the pos. To insert at the head use 0 for the pos and to insert at the tail use -1 for the pos. The argument pos is optional and by default it equals -1.
#define vx_cirq_rem | ( | ... | ) | VX__CIRQ_REM(__VA_ARGS__, 0, ) |
Remove, at a given position, an entry from a cirq.
A call vx_cirq_rem(cirqp, pos) will remove an entry from the cirqp at the pos and will return the removed entry. To remove from the head use 0 for the pos and to remove from the tail use -1 for the pos. The argument pos is optional and by default it equals 0.