From 8c9de2d97dae21da371f6ceae3ddde547118a080 Mon Sep 17 00:00:00 2001 From: "quentin.perret" Date: Fri, 10 Jun 2022 15:16:13 +0200 Subject: [PATCH] add comment in queue.h --- Code-C/queue.c | 2 +- Code-C/queue.h | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Code-C/queue.c b/Code-C/queue.c index 0d680d4..bf570d1 100644 --- a/Code-C/queue.c +++ b/Code-C/queue.c @@ -50,7 +50,7 @@ int getCharLen(Pqueue elem){ return elem->charLen; } -char *gettabChar(Pqueue elem){ +char * gettabChar(Pqueue elem){ assert(elem); return elem->tabChar; } diff --git a/Code-C/queue.h b/Code-C/queue.h index 5736138..dbaed95 100644 --- a/Code-C/queue.h +++ b/Code-C/queue.h @@ -1,13 +1,27 @@ typedef struct queue *Pqueue; + +//Constructors Pqueue createE(int lenChar); Pqueue createEEmpty(); //create a new element but all variables in are null, use to create the first element of the queue in the main before define the elements in -// seter /getter pour la struct // constructeur avec 2 paramètres : strlen et tabchar + +//Getters Pqueue getNextE(Pqueue elem); +Pqueue getNextE(Pqueue elem); +char * gettabChar(Pqueue elem); + +//Setters Pqueue setCharLen(Pqueue elem , int _charLen); Pqueue setTabChar(Pqueue elem , int _charLen , char *_tabChar); +Pqueue addLastQ(Pqueue elem, const char* str, int len); + +//Removers Pqueue rmLastE(Pqueue elem); Pqueue rmFrstE(Pqueue elem); + Pqueue nextDelFrst(Pqueue elem); -Pqueue addLastQ(Pqueue elem, const char* str, int len); + +Pqueue nextDelFrst(Pqueue elem); + +//print function void printE(Pqueue elem); \ No newline at end of file