IN101 project on Conway's Game of Life
Classes | Typedefs | Functions
linked_list_cell.h File Reference

Header file for a linked list implementation. More...

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
Include dependency graph for linked_list_cell.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  linked_cell
 

Typedefs

typedef struct linked_cell linked_cell
 
typedef linked_celllinked_list
 

Functions

linked_cell linked_list_get (linked_list list, int idx)
 Get a cell from a linked list by its index. More...
 
void linked_list_insert_unsorted (linked_list *p_list, int row, int column)
 Insert an element into a linked list, at the first position. More...
 
void linked_list_insert (linked_list *p_list, int row, int column)
 Insert an element into a linked list, sorted by row and column. More...
 
void linked_list_delete (linked_list *p_list, int row, int column)
 Delete an element from a linked list. More...
 
void linked_list_free (linked_list list)
 Free a linked list from memory. More...
 

Detailed Description

Header file for a linked list implementation.

Author
Victor Colomb (vic.c.nosp@m.ol@h.nosp@m.otmai.nosp@m.l.fr)
Date
2021-03-06

Function Documentation

◆ linked_list_delete()

void linked_list_delete ( linked_list p_list,
int  row,
int  column 
)

Delete an element from a linked list.

Parameters
p_listpointer to a linked list
idx
Precondition
idx has to be inferior to the number of cells in the list

◆ linked_list_free()

void linked_list_free ( linked_list  list)

Free a linked list from memory.

Parameters
list

◆ linked_list_get()

linked_cell linked_list_get ( linked_list  list,
int  idx 
)

Get a cell from a linked list by its index.

Parameters
list
idx
Precondition
idx has to be inferior to the number of cells in the list
Returns
linked_cell of the given index

◆ linked_list_insert()

void linked_list_insert ( linked_list p_list,
int  row,
int  column 
)

Insert an element into a linked list, sorted by row and column.

Parameters
p_listpointer to a linked list
row
column

◆ linked_list_insert_unsorted()

void linked_list_insert_unsorted ( linked_list p_list,
int  row,
int  column 
)

Insert an element into a linked list, at the first position.

Parameters
p_listpointer to a linked list
row
column