41 lines
1.3 KiB
C++
41 lines
1.3 KiB
C++
/*
|
|
File: Team.h
|
|
* Description : Models a team entity that maintains team identity, leadership, employee list, and size limitations.
|
|
* Author : Trenser
|
|
* Created : 31-Mar-2026
|
|
*/
|
|
|
|
#pragma once
|
|
#include <string>
|
|
#include <map>
|
|
#include <memory>
|
|
#include "Employee.h"
|
|
using employeeMap = std::map<std::string, Employee*>;
|
|
|
|
class Team
|
|
{
|
|
private:
|
|
std::string m_id;
|
|
std::string m_name;
|
|
Employee* m_lead;
|
|
employeeMap m_employees;
|
|
int m_maximumNumberOfEmployees;
|
|
public:
|
|
Team() : m_id(""), m_name(""), m_lead(nullptr), m_maximumNumberOfEmployees(0) {}
|
|
Team(const std::string& id,
|
|
const std::string& name,
|
|
Employee* lead,
|
|
int maximumNumberOfEmployees)
|
|
: m_id(id), m_name(name), m_lead(lead), m_maximumNumberOfEmployees(maximumNumberOfEmployees) {
|
|
}
|
|
const std::string& getTeamId() const;
|
|
const std::string& getTeamName() const;
|
|
Employee* getTeamLead() const;
|
|
const employeeMap& getEmployeesInTeam() const;
|
|
int getMaximumNumberOfEmployeesInTeam() const;
|
|
void setTeamId(const std::string& id);
|
|
void setTeamName(const std::string& name);
|
|
void setTeamLead(Employee* lead);
|
|
void setEmployeesInTeam(const employeeMap& employees);
|
|
void setMaximumNumberOfEmployeesInTeam(int maximumNumberOfEmployees);
|
|
}; |