30 lines
777 B
C++
30 lines
777 B
C++
/*
|
|
File: Room.h
|
|
* Description : Models a room entity that maintains room details and manages its bookings.
|
|
* Author : Trenser
|
|
* Created : 31-Mar-2026
|
|
*/
|
|
|
|
#pragma once
|
|
#include <string>
|
|
#include <map>
|
|
#include <memory>
|
|
#include "Booking.h"
|
|
using bookingMap = std::map<std::string, Booking*>;
|
|
|
|
class Room
|
|
{
|
|
private:
|
|
std::string m_id;
|
|
std::string m_name;
|
|
bookingMap m_bookings;
|
|
public:
|
|
Room() : m_id(""), m_name("") {}
|
|
Room(const std::string& id, const std::string& name) : m_id(id), m_name(name) {}
|
|
const std::string& getRoomId() const;
|
|
const std::string& getRoomName() const;
|
|
const bookingMap& getBookings() const;
|
|
void setRoomId(const std::string& id);
|
|
void setRoomName(const std::string& name);
|
|
void addBooking(Booking* booking);
|
|
}; |