From 070ce923574dcc57435cb3fb2dfe86b6a38cd249 Mon Sep 17 00:00:00 2001 From: MDBijman Date: Tue, 24 Jan 2017 12:15:26 +0100 Subject: Initial code commit with organized dependencies --- Simulator/include/modeling/Rack.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Simulator/include/modeling/Rack.h (limited to 'Simulator/include/modeling/Rack.h') diff --git a/Simulator/include/modeling/Rack.h b/Simulator/include/modeling/Rack.h new file mode 100644 index 00000000..7e5638ef --- /dev/null +++ b/Simulator/include/modeling/Rack.h @@ -0,0 +1,33 @@ +#pragma once +#include "modeling/Entity.h" +#include "modeling/machine/Machine.h" + +#include + +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 machines); + + /* + Returns all machines in this rack. + */ + std::unordered_map& getMachines(); + + /* + Returns the machine at the given slot. + */ + Machine& getMachineAtSlot(int slot); + + private: + std::unordered_map machines; + }; +} -- cgit v1.2.3