1
0
mirror of https://gitlab.com/klmp200/LO27.git synced 2024-06-26 21:28:03 +00:00
LO27/LibList/CellElement.h

56 lines
971 B
C
Raw Normal View History

#ifndef CELLELMNT_H
#define CELLELMNT_H
/*---bool---
*@true : 1
*@false : 0
*/
typedef enum Bool{
2016-12-10 04:04:13 +00:00
true = 1,
false = 0
} bool;
/*---cellElement---
*Pointer on a cell of the matrix
*
*@colIndex : index (int) of the column of this cell
*@rowIndex : index (int) of the row of this cell
*
*@value : a boolean that is the content of the cell
*
*@nextCol : pointer on the next cellElement in the same column
*@nextRow : pointer on the next cellElement in the same row
*
*/
struct cellElement {
2016-12-10 20:11:46 +00:00
int colIndex;
int rowIndex;
bool value;
struct cellElement * nextCol;
struct cellElement * nextRow;
};
2016-12-10 20:11:46 +00:00
typedef struct cellElement cellElement;
cellElement * CreateCellElem();
void freeCellElem(cellElement * elem);
int AddNextCol(cellElement* tree);
int AddNextRow(cellElement* tree);
void removeNextCol(cellElement* list);
void removeNextRow(cellElement* list);
2016-12-10 20:11:46 +00:00
void recursivePrint(cellElement * tree);
2016-12-10 04:04:13 +00:00
void FreeCellElement(cellElement* element);
2016-12-10 04:04:13 +00:00
#endif