Robot Agent  1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Typedefs | Functions
doublylinkedlist.h File Reference

Go to the source code of this file.

Data Structures

struct  s_DOUBLYLINKEDLIST_NODE_STRUCT
 Doubly linked list node structure. More...
 
struct  s_DOUBLYLINKEDLIST_STRUCT
 Doubly linked list structure. More...
 

Typedefs

typedef struct
s_DOUBLYLINKEDLIST_NODE_STRUCT 
doublylinkedlist_node_t
 Doubly linked list node structure. More...
 
typedef struct
s_DOUBLYLINKEDLIST_STRUCT 
doublylinkedlist_t
 Doubly linked list structure. More...
 

Functions

doublylinkedlist_tdoublylinkedlist_init (void)
 
void doublylinkedlist_destroy (doublylinkedlist_t *dlls)
 
void doublylinkedlist_insert_after (doublylinkedlist_t *dlls, doublylinkedlist_node_t *node, void *data, int data_type)
 
void doublylinkedlist_insert_before (doublylinkedlist_t *dlls, doublylinkedlist_node_t *node, void *data, int data_type)
 
void doublylinkedlist_insert_beginning (doublylinkedlist_t *dlls, void *data, int data_type)
 
void doublylinkedlist_insert_end (doublylinkedlist_t *dlls, void *data, int data_type)
 
void doublylinkedlist_remove (doublylinkedlist_t *dlls, doublylinkedlist_node_t *node, void *data, int *data_type)
 
void doublylinkedlist_delete (doublylinkedlist_t *dlls, doublylinkedlist_node_t *node)
 
void doublylinkedlist_empty (doublylinkedlist_t *dlls)
 

Detailed Description

Author
Eriks Zaharans
Date
21 Oct 2013

DESCRIPTION

Doubly linked list library header file.

Definition in file doublylinkedlist.h.

Typedef Documentation

Doubly linked list node structure.

Doubly linked list structure.

Function Documentation

void doublylinkedlist_delete ( doublylinkedlist_t dlls,
doublylinkedlist_node_t node 
)

Delete a node from the doubly linked list structure

Parameters
dllsPointer to doubly linked list structure
nodePointer to node structure which should be removed
Returns
Void

Definition at line 340 of file doublylinkedlist.c.

void doublylinkedlist_destroy ( doublylinkedlist_t dlls)

Deinitialize doubly linked list

Parameters
dllPointer to doubly linked list structure
Returns
Void

Definition at line 47 of file doublylinkedlist.c.

void doublylinkedlist_empty ( doublylinkedlist_t dlls)

Empty the doubly linked list

Parameters
dllsPointer to doubly linked list structure
Returns
Void

Definition at line 379 of file doublylinkedlist.c.

doublylinkedlist_t* doublylinkedlist_init ( void  )

Initialize doubly linked list

Returns
Pointer to doubly linked list structure

Definition at line 29 of file doublylinkedlist.c.

void doublylinkedlist_insert_after ( doublylinkedlist_t dlls,
doublylinkedlist_node_t node,
void *  data,
int  data_type 
)

Add a new node after specified node

Parameters
dllsPointer to doubly linked list structure
nodePointer to node structure after which a new node should be placed
dataPointer to data structure
data_typeData type
Returns
Void

Definition at line 63 of file doublylinkedlist.c.

void doublylinkedlist_insert_before ( doublylinkedlist_t dlls,
doublylinkedlist_node_t node,
void *  data,
int  data_type 
)

Add a new node before specified node

Parameters
dllsPointer to doubly linked list structure
nodePointer to node structure before which a new node should be placed
dataPointer to data structure
data_typeData type
Returns
Void

Definition at line 134 of file doublylinkedlist.c.

void doublylinkedlist_insert_beginning ( doublylinkedlist_t dlls,
void *  data,
int  data_type 
)

Add a new node in the beginning of the doubly linked list

Parameters
dllsPointer to doubly linked list structure
dataPointer to data structure
data_typeData type
Returns
Void

Definition at line 205 of file doublylinkedlist.c.

void doublylinkedlist_insert_end ( doublylinkedlist_t dlls,
void *  data,
int  data_type 
)

Add a new node in the end of the doubly linked list

Parameters
dllsPointer to doubly linked list structure
dataPointer to data structure
data_typeData type
Returns
Void

Definition at line 275 of file doublylinkedlist.c.

void doublylinkedlist_remove ( doublylinkedlist_t dlls,
doublylinkedlist_node_t node,
void *  data,
int *  data_type 
)

Remove a node and retrieve the data from the doubly linked list structure

Parameters
dllsPointer to doubly linked list structure
nodePointer to node structure which should be removed
dataPointer to memory to where save data structure
data_typePointer to memory where to save data type
Returns
Void

Definition at line 298 of file doublylinkedlist.c.