47 lines
1.6 KiB
C++
47 lines
1.6 KiB
C++
/*
|
|
File: DataStore.h
|
|
Description: Declares the DataStore singleton class responsible for managing collections of users, services, combo packages, service bookings, job cards, inventory items, invoices, and payments in the Vehicle Service Management System.
|
|
Author: Trenser
|
|
Date: 19-May-2026
|
|
*/
|
|
|
|
#pragma once
|
|
#include <string>
|
|
#include "Map.h"
|
|
|
|
class User;
|
|
class Service;
|
|
class ComboPackage;
|
|
class ServiceBooking;
|
|
class JobCard;
|
|
class InventoryItem;
|
|
class Invoice;
|
|
class Payment;
|
|
|
|
class DataStore
|
|
{
|
|
private:
|
|
util::Map<std::string, User*> m_users;
|
|
util::Map<std::string, Service*> m_services;
|
|
util::Map<std::string, ComboPackage*> m_comboPackages;
|
|
util::Map<std::string, ServiceBooking*> m_serviceBookings;
|
|
util::Map<std::string, JobCard*> m_jobCards;
|
|
util::Map<std::string, InventoryItem*> m_inventoryItems;
|
|
util::Map<std::string, Invoice*> m_invoices;
|
|
util::Map<std::string, Payment*> m_payments;
|
|
DataStore() {}
|
|
public:
|
|
static DataStore& getInstance();
|
|
DataStore(const DataStore&) = delete;
|
|
DataStore& operator=(const DataStore&) = delete;
|
|
DataStore(DataStore&&) = delete;
|
|
DataStore& operator=(DataStore&&) = delete;
|
|
util::Map<std::string, User*>& getUsers();
|
|
util::Map<std::string, Service*>& getServices();
|
|
util::Map<std::string, ComboPackage*>& getComboPackages();
|
|
util::Map<std::string, ServiceBooking*>& getServiceBookings();
|
|
util::Map<std::string, JobCard*>& getJobCards();
|
|
util::Map<std::string, InventoryItem*>& getInventoryItems();
|
|
util::Map<std::string, Invoice*>& getInvoices();
|
|
util::Map<std::string, Payment*>& getPayments();
|
|
}; |