heavily simplified imports and using directives
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
#ifndef CUSTOMER_H
|
||||
#define CUSTOMER_H
|
||||
#pragma once
|
||||
#include "../thirdparty/SQLiteCpp/include/SQLiteCpp/SQLiteCpp.h"
|
||||
#include "Park_time.h"
|
||||
#include <ctime>
|
||||
#include <random>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "data.h"
|
||||
|
||||
using std::string;
|
||||
|
||||
#include "Park_time.h"
|
||||
#include "data.h"
|
||||
#include <random>
|
||||
#include <vector>
|
||||
|
||||
|
||||
using std::vector;
|
||||
|
||||
// will make it easy to represent it in the database while making it easy to use while programming
|
||||
@@ -32,7 +31,7 @@ class Customer {
|
||||
Customer(string name_, Verhicle_type verhicle_);
|
||||
Customer(int id_, string name_, string card_code_, Verhicle_type verhicle_,
|
||||
vector<Park_time> instances); // needed to construct from db
|
||||
// potentially: add a destructor that calls update_db() before being destroyed
|
||||
~Customer();
|
||||
int id;
|
||||
string name;
|
||||
string card_code;
|
||||
|
@@ -14,8 +14,9 @@ class Park_spot {
|
||||
public:
|
||||
int id;
|
||||
bool taken;
|
||||
Customer* parked; //TODO: think about memory management
|
||||
Customer* parked;
|
||||
Park_spot();
|
||||
~Park_spot();
|
||||
void clock(Customer* c_customer);
|
||||
private:
|
||||
void save_db();
|
||||
|
@@ -5,12 +5,14 @@
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <ctime>
|
||||
#include "data.h"
|
||||
|
||||
|
||||
using namespace std::chrono;
|
||||
using std::string;
|
||||
using std::to_string;
|
||||
using std::cout;
|
||||
/*
|
||||
|
||||
|
||||
@@ -21,6 +23,7 @@ class Park_time {
|
||||
public:
|
||||
Park_time(int c_id, int s_id);
|
||||
// Park_time(int c_id, int s_id );
|
||||
~Park_time();
|
||||
int id;
|
||||
int customer_id;
|
||||
int spot_id;
|
||||
|
Reference in New Issue
Block a user