1
0
mirror of https://gitlab.com/klmp200/LO27.git synced 2025-07-13 21:49:22 +00:00

New project acrh

This commit is contained in:
2016-12-11 01:53:18 +01:00
parent 53c05a0ca5
commit 24e3bb4b90
7 changed files with 8 additions and 42 deletions

View File

@ -0,0 +1,95 @@
#ifndef CELLELMNT_H
#define CELLELMNT_H
/*---bool---
*@true : 1
*@false : 0
*/
typedef enum Bool{
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 {
int colIndex;
int rowIndex;
bool value;
struct cellElement * nextCol;
struct cellElement * nextRow;
};
typedef struct cellElement cellElement;
/*---CreateCellElem---
*Allocates a cellElement and returns it
*
*@return : pointer on the allocated cellElement
*
*/
cellElement * CreateCellElem();
/*---AddNextCol---
*Allocates a cellElement and sets it as the NextCol of the tree
*
*@tree : an allocated cellElement
*
*/
int AddNextCol(cellElement* tree);
/*---AddNextRow---
*Allocates a cellElement and sets it as the NextRow of the tree
*
*@tree : an allocated cellElement
*
*/
int AddNextRow(cellElement* tree);
/*---removeNextCol---
*Free the nextCol cellElement of the tree
*
*@tree : an allocated cellElement
*
*/
void removeNextCol(cellElement* tree);
/*---removeNextRow---
*Free the nextRow cellElement of the tree
*
*@tree : an allocated cellElement
*
*/
void removeNextRow(cellElement* tree);
void recursivePrint(cellElement * tree);
/*---FreeCellElem---
*Allocates a cellElement and returns it
*
*@return : pointer on the allocated cellElement
*
*/
void FreeCellElement(cellElement* element);
#endif