#ifndef QUERY_H #define QUERY_H #pragma once #include "Park_spot.h" #include "Admin.h" /*these are the functions that search the database and create objects from it. query_parktimes_for_customer searches for the parktimes that are needed in customer initialisaiton. generally, i see no use outside of that. query_customer_with_name searches for customer data by name. query_customer_with_id does what the above does, but with id. populate_spots is used to query for all the park_spots and return them as objects. The design desision to use vector instead of is for the following reasons: 1. some of these can potentially return more than one object. For example, 2 customers who have the same name. 2. I have no clue how many of you have done error handling in c++ (try/catch/finally). I dont want to bombard you with more new concepts than needed. so now you'd do vector test = query_customer_with_name("Testman"); if (!test.size()) {print no customers found, do stuff} else if (test.size() > 1) { do stuff to get the right one if you only need one } instead of try { customer test = query_customer_with_name("Testman"); } catch(someException.probablycalled_not_found) {do_Stuff}; catch(...) { do stuff } finally{ do more stuff } */ vector query_parktimes_for_customer(int cid); vector query_customer_with_name(string name); Customer query_customer_with_id(int id); Admin query_admin_with_id(int id); vector populate_spots(); Park_spot query_parkspot_with_id(int id, vector& parkspots); void reports_from_parkspot(int spotid, bool weekly = false); void reports_from_allparkspots(bool weekly = false); void current_status_parkspots(vector& spots); #endif // CUSTOMER_H