Gator Library
An implementation of the Red-Black Tree and Priority queue data structure in C++.
Loading...
Searching...
No Matches
book.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <queue>
5
6#include <iostream>
7
8#include "reservation.hpp"
9#include "utilities.hpp"
10#include "priority_queue.hpp"
11
12using namespace std;
13
24class book {
25private:
29 void printReservations();
30
31public:
32 int BookId;
33 string BookName;
34 string AuthorName;
45 void AddReservation(reservation newReservation);
46
51 void DeleteReservation(int patronID);
52
56 void PrintBook();
57
65 book(int id, string name, string author, string availabilityStatus);
66
74 book(int id, string name, string author, BookAvailability available);
75
79 ~book();
80};
Represents a book in the library.
Definition book.hpp:24
BookAvailability AvailabilityStatus
Definition book.hpp:35
void printReservations()
Prints the reservations for the book.
Definition book.cpp:48
int BookId
Definition book.hpp:32
string AuthorName
Definition book.hpp:34
void PrintBook()
Prints the details of the book.
Definition book.cpp:37
void DeleteReservation(int patronID)
Deletes a reservation for the book.
~book()
Destructs the book object.
Definition book.cpp:33
void AddReservation(reservation newReservation)
Adds a new reservation for the book.
Definition book.cpp:68
pq_reservation ReservationHeap
Definition book.hpp:38
string BookName
Definition book.hpp:33
int BorrowedBy
Definition book.hpp:36
A priority queue implementation for reservations.This class represents a priority queue that stores r...
Definition priority_queue.hpp:15
The reservation class stores the priority number, patron id, and the time of reservation.
Definition reservation.hpp:15
This file contains the declaration of the utilities class and the BookAvailability enum.
BookAvailability
Enum representing the availability status of a book.
Definition utilities.hpp:28