blob: 7e5638ef1cc51613dfb3e37e0ebabffb3e3963f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#pragma once
#include "modeling/Entity.h"
#include "modeling/machine/Machine.h"
#include <unordered_map>
namespace Modeling
{
/*
The Rack class models a physical rack. It holds a vector of machines.
*/
class Rack : public Entity
{
public:
/*
Initializes the rack with the given machines.
*/
Rack(int id, std::unordered_map<uint32_t, Machine> machines);
/*
Returns all machines in this rack.
*/
std::unordered_map<uint32_t, Machine>& getMachines();
/*
Returns the machine at the given slot.
*/
Machine& getMachineAtSlot(int slot);
private:
std::unordered_map<uint32_t, Machine> machines;
};
}
|