404d217504
- Remove FileManager and related file-based persistence logic - Remove obsolete observer persistence utilities - Remove unused service APIs and includes - Delete duplicate DataStore mutex stubs - Perform general dead-code cleanup
36 lines
1.3 KiB
C++
36 lines
1.3 KiB
C++
/*
|
|
File: InventoryManagementService.h
|
|
Description: Header file declaring the InventoryManagementService class,
|
|
which manages inventory items, stock updates, and notifications
|
|
related to low stock alerts. Inherits from NotificationManagementService.
|
|
Author: Trenser
|
|
Date:19-May-2026
|
|
*/
|
|
|
|
#pragma once
|
|
#include <string>
|
|
#include "Map.h"
|
|
#include "Vector.h"
|
|
#include "NotificationManagementService.h"
|
|
#include "DataStore.h"
|
|
|
|
class InventoryItem;
|
|
|
|
class InventoryManagementService : public NotificationManagementService
|
|
{
|
|
private:
|
|
DataStore& m_dataStore;
|
|
static util::Map<std::string, User*> m_observers;
|
|
public:
|
|
InventoryManagementService() : m_dataStore(DataStore::getInstance()) {}
|
|
util::Map<std::string, InventoryItem*> getInventoryItems();
|
|
InventoryItem* getInventoryItem(const std::string& inventoryItemID);
|
|
void addInventoryItem(const std::string& partName, int quantity, double price);
|
|
void removeInventoryItem(const std::string& inventoryItemID);
|
|
void addInventoryItemStock(const std::string& selectedItemId, int quantity);
|
|
void sendLowStockAlerts();
|
|
void sendNotification(User* user, const std::string& title, const std::string& message) override;
|
|
void attach(User* user) override;
|
|
void detach(User* user) override;
|
|
};
|