Advertisement
ak02

HOSTO.h

May 26th, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.18 KB | None | 0 0
  1. #ifndef __HOSTO__H__
  2. #define __HOSTO__H__
  3.  
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include <string.h>
  7. #include <time.h>
  8.  
  9. #define MAX 250
  10. #define LENGTH 8
  11.  
  12. /* Enumération booléenne */
  13. typedef enum Bool
  14. {
  15.     false,
  16.     true
  17.  
  18. }Bool;
  19.  
  20. /* Definition de la structure d'un patient */
  21. typedef struct Sick
  22. {
  23.     char num[MAX];
  24.     char name[MAX];
  25.     char surname[MAX];
  26.     char address[MAX];
  27.     char maritalSituation[MAX];
  28.     int birthYear;
  29.     int birthDate;
  30.     int birthMonth;
  31.     char phone[MAX];
  32.  
  33. }Sick;
  34.  
  35. /* Structure medecin */
  36. typedef struct Medecin
  37. {
  38.     int numID;
  39.     char name[MAX];
  40.     char surname[MAX];
  41.     char phone[MAX];
  42.     char speciality[MAX];
  43. }Medecin;
  44.  
  45. /* Liste de patients */
  46. typedef struct ListElement
  47. {
  48.     Sick patient;
  49.     struct ListElement *next;
  50.  
  51. }ListElement, *List;
  52.  
  53. /* Structure d'une pile de medecin*/
  54. typedef struct Pile
  55. {
  56.     Medecin liste;
  57.     struct Pile *next;
  58.  
  59. }Pile, *ListMedecin;
  60.  
  61. /* Structure gérant le nombre de lits par salle liee a une unité de soin */
  62. typedef struct Lit
  63. {
  64.     int nbLit;
  65.     int uniteDeSoin;
  66. }Lit;
  67.  
  68. /* Structure de la File de salles disponibles dans l'hopital */
  69. typedef struct Salle
  70. {
  71.     Lit nombreDeLit;
  72.     struct Salle *next;
  73.  
  74. }Salle, *sallePatient;
  75.  
  76. static Salle *premiere = NULL;
  77. static Salle *derniere = NULL;
  78. static int nb_salle = 0;
  79. /* Prototypes des fonctions */
  80. List new_list(void);
  81. ListMedecin new_ListOf_Medecine(void);
  82. Bool is_empty_list_Of_Medecine(ListMedecin mylist);
  83. ListMedecin addDoctor(ListMedecin mylist, Medecin doctor);
  84. void ListDoctor(ListMedecin mylist);
  85. void medecin(void);
  86. void patient(void);
  87. int doctorNumber(ListMedecin mylist);
  88. ListMedecin pop_doctor(ListMedecin mylist);
  89. Medecin topMedecin(ListMedecin mylist);
  90. ListMedecin deleteDoctor(ListMedecin mylist);
  91. Bool is_empty_list(List mylist);
  92. void print_list(List mylist);
  93. List addPatient(List mylist, Sick patient);
  94. List deletePatient(List mylist);
  95. int length(List mylist);
  96. void timer(void);
  97. void temps(void);
  98. Bool salle_vide(void);
  99. int derniere_salle(void);
  100. int premiere_salle(void);
  101. int nombre_salle(void);
  102. void vider_une_salle(void);
  103. void occuper_une_salle(Lit p);
  104. void lister_les_salles(void);
  105. void fermer_les_salles(void);
  106. int soin(int choix);
  107.  
  108. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement