almost all internals done after i fix segfault
This commit is contained in:
@ -4,8 +4,6 @@
|
||||
|
||||
#include "Park_time.h"
|
||||
#include "data.h"
|
||||
|
||||
#include <random>
|
||||
#include <vector>
|
||||
|
||||
using std::vector;
|
||||
@ -24,16 +22,15 @@ park_time object. Voegt het toe aan een vector.
|
||||
|
||||
class Customer {
|
||||
public:
|
||||
Customer(string name_, Verhicle_type verhicle_);
|
||||
Customer(int id_, string name_, // needed to construct from db
|
||||
string card_code_,
|
||||
Verhicle_type verhicle_, // TODO: how init. p_time instances?
|
||||
vector<Park_time> instances);
|
||||
~Customer();
|
||||
|
||||
int id;
|
||||
string name;
|
||||
string card_code;
|
||||
|
||||
string password;
|
||||
Customer(string name_, string password_, Verhicle_type verhicle_);
|
||||
Customer(int id_, string name_, // needed to construct from db
|
||||
string password_,
|
||||
Verhicle_type verhicle_, // TODO: how init. p_time instances?
|
||||
vector<Park_time> instances);
|
||||
void clock_in(int s_id);
|
||||
void clock_out(int s_id);
|
||||
|
||||
@ -45,10 +42,13 @@ class Customer {
|
||||
private:
|
||||
Verhicle_type verhicle;
|
||||
vector<Park_time> park_instances;
|
||||
|
||||
string gen_cardcode();
|
||||
void save_db();
|
||||
int auto_increment_db();
|
||||
};
|
||||
|
||||
static vector<Customer> park_customers; // save the customers that are parked in here
|
||||
// parking_spot uses pointers, so it's better to save the parked customers here
|
||||
// where we know they'll be destroyed at the end of this scope, instead of too early
|
||||
// and end up with dangling pointers
|
||||
|
||||
#endif // CUSTOMER_H
|
Reference in New Issue
Block a user