Hospital manager source file. More...
Go to the source code of this file.
Functions | |||||||||
loadHospitals | |||||||||
Load hospitals from file This function loads the hospitals from the file
| |||||||||
void | loadHospitals (void) | ||||||||
saveHospitals | |||||||||
Save hospitals to file This function saves the hospitals to the file
| |||||||||
void | saveHospitals (void) | ||||||||
addHospital | |||||||||
Add hospital This function adds a new hospital to the
| |||||||||
char * | addHospital (const char *name, const char *location) | ||||||||
validateHospitalCode | |||||||||
Validate hospital code This function validates the given hospital code by traversing the
| |||||||||
bool | validateHospitalCode (const char *code) | ||||||||
deleteHospital | |||||||||
Delete hospital This function deletes the hospital with the given code by traversing the
| |||||||||
bool | deleteHospital (const char *code, const char *adminUsername, const char *adminPassword) | ||||||||
getHospitalNameByCode | |||||||||
Get hospital name by code This function gets the hospital name by the given code by traversing the
| |||||||||
char * | getHospitalNameByCode (const char *code) | ||||||||
displayHospitals | |||||||||
Display all hospitals This function displays all the hospitals in the
| |||||||||
void | displayHospitals (void) | ||||||||
freeHospital | |||||||||
Free hospital list from memory This function frees the
| |||||||||
void | freeHospital (void) | ||||||||
Variables | |
Hospital * | hospitalHead = NULL |
Hospital head pointer. | |
Hospital manager source file.
This file contains the implementation of the functions for the hospital manager module.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Definition in file hospital_manager.c.
char * addHospital | ( | const char * | name, |
const char * | location ) |
Definition at line 149 of file hospital_manager.c.
bool deleteHospital | ( | const char * | code, |
const char * | adminUsername, | ||
const char * | adminPassword ) |
Definition at line 280 of file hospital_manager.c.
void displayHospitals | ( | void | ) |
Definition at line 379 of file hospital_manager.c.
void freeHospital | ( | void | ) |
Definition at line 405 of file hospital_manager.c.
char * getHospitalNameByCode | ( | const char * | code | ) |
Definition at line 345 of file hospital_manager.c.
void loadHospitals | ( | void | ) |
Definition at line 57 of file hospital_manager.c.
void saveHospitals | ( | void | ) |
Definition at line 113 of file hospital_manager.c.
bool validateHospitalCode | ( | const char * | code | ) |
Definition at line 237 of file hospital_manager.c.
Hospital* hospitalHead = NULL |
Hospital head pointer.
This pointer is used to track hospital linkedlist on runtime.
Definition at line 38 of file hospital_manager.c.