heavily simplified imports and using directives

This commit is contained in:
TinyAtoms
2019-06-29 23:22:58 -03:00
parent 97ed3150ec
commit 085cd5af08
8 changed files with 44 additions and 43 deletions

View File

@@ -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;

View File

@@ -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();

View File

@@ -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;