42 lines
666 B
C++
42 lines
666 B
C++
/*
|
|
File: Room.cpp
|
|
* Description : Models a room entity that maintains room details and manages its bookings.
|
|
* Author : Trenser
|
|
* Created : 31-Mar-2026
|
|
*/
|
|
|
|
#include "Room.h"
|
|
|
|
//Getters and setters
|
|
const std::string& Room::getRoomId() const
|
|
{
|
|
return m_id;
|
|
}
|
|
|
|
const std::string& Room::getRoomName() const
|
|
{
|
|
return m_name;
|
|
}
|
|
|
|
const bookingMap& Room::getBookings() const
|
|
{
|
|
return m_bookings;
|
|
}
|
|
|
|
void Room::setRoomId(const std::string& id)
|
|
{
|
|
m_id = id;
|
|
}
|
|
|
|
void Room::setRoomName(const std::string& name)
|
|
{
|
|
m_name = name;
|
|
}
|
|
|
|
void Room::addBooking(Booking* booking)
|
|
{
|
|
if (booking)
|
|
{
|
|
m_bookings[booking->getBookingId()] = booking;
|
|
}
|
|
} |