From c94d0c347fdbd8acc774df4ac17617a3f63e4507 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sun, 9 Jul 2017 23:48:06 +0200 Subject: Delete old codebase This change removes version 1 of the OpenDC simulator codebase as it will be replaced by a complete rewrite in the Kotlin language. --- Simulator/include/simulation/Section.h | 76 ---------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 Simulator/include/simulation/Section.h (limited to 'Simulator/include/simulation/Section.h') diff --git a/Simulator/include/simulation/Section.h b/Simulator/include/simulation/Section.h deleted file mode 100644 index 3c11b073..00000000 --- a/Simulator/include/simulation/Section.h +++ /dev/null @@ -1,76 +0,0 @@ -#pragma once -#include "modeling/Datacenter.h" -#include "modeling/Room.h" -#include "simulation/history/SimulationHistory.h" - -#include -#include - -namespace Simulation -{ - /** - * \brief Holds a datacenter and the tick on which the parent experiment should switch to this section. - * \tparam DatacenterType The type of datacenter to be used. - */ - template - class Section - { - public: - /** - * \brief Initializes the datacenter in the simulation. Sets paused to false and finished to false. - * \param dc The topology of this section. - * \param startTick The tick on which the experiment should start using the topology of this section. - */ - Section(DatacenterType& dc, uint32_t startTick) : datacenter(dc), startTick(startTick) - {} - - /** - * \return A reference to the datacenter of this section. - */ - DatacenterType& getDatacenter() - { - return datacenter; - } - - /** - * \return All machines in the datacenter of section. - */ - std::vector> getMachines() - { - using namespace std; - - vector> machineAccumulator; - - // For each serverroom, we get the racks in the room - vector& rooms = datacenter.template getRoomsOfType(); - for(auto& room : rooms) - // For each rack get the machines inside that rack - for(auto& rack : room.getEntitiesOfType()) - // Add each machine to the accumulator - for(auto& machine : rack.getMachines()) - machineAccumulator.push_back(ref(machine.second)); - - return machineAccumulator; - } - - /** - * \return The tick on which the experiment should start using the topology of this section. - */ - uint32_t getStartTick() const - { - return startTick; - } - - private: - /** - * \brief The datacenter that is used for experiments. - */ - DatacenterType datacenter; - - /** - * \brief The tick when the next sections starts. This is -1 if this is the last section. - */ - uint32_t startTick; - }; - -} -- cgit v1.2.3