summaryrefslogtreecommitdiff
path: root/Simulator/include/simulation/Path.h
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2017-07-09 23:48:06 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2017-07-09 23:48:06 +0200
commitc94d0c347fdbd8acc774df4ac17617a3f63e4507 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /Simulator/include/simulation/Path.h
parentbc4c41e21a64b444bdbab3b6d1d407fd5d919419 (diff)
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.
Diffstat (limited to 'Simulator/include/simulation/Path.h')
-rw-r--r--Simulator/include/simulation/Path.h63
1 files changed, 0 insertions, 63 deletions
diff --git a/Simulator/include/simulation/Path.h b/Simulator/include/simulation/Path.h
deleted file mode 100644
index d35d49fc..00000000
--- a/Simulator/include/simulation/Path.h
+++ /dev/null
@@ -1,63 +0,0 @@
-#pragma once
-#include "Section.h"
-#include "modeling/ModelingTypes.h"
-
-namespace Simulation
-{
- /**
- * \brief Holds all sections of the parent experiment, and returns the correct one
- * based on the current tick.
- */
- class Path
- {
- public:
- explicit Path(int id) : id(id)
- {}
-
-
- /**
- * \brief Adds the given section to this path. The begin tick of this section
- * should not already be in use by one of the other sections in this path.
- * \param section The section to add to this path.
- */
- void addSection(DefaultSection section)
- {
- sections.push_back(section);
- }
-
- /**
- * \brief Returns the section that is currently in use by taking the section
- * that has the greatest begin tick smaller than the current tick
- * \param currentTick The tick the simulator is simulating right now.
- * \return The section that is currently in use.
- */
- DefaultSection& getCurrentSection(uint32_t currentTick)
- {
- size_t currentSection = 0;
-
- uint32_t currentStartTick = 0;
- for(int i = 0; i < sections.size(); ++i)
- {
- uint32_t tempStartTick = sections.at(i).getStartTick();
- if(tempStartTick > currentStartTick && tempStartTick < currentTick)
- currentSection = i;
- }
-
- return sections.at(currentSection);
- }
-
- private:
-
- /**
- * \brief The unordered vector of sections in this path. No pair of sections
- * should share the same begin tick.
- */
- std::vector<DefaultSection> sections;
-
-
- /**
- * \brief The id of this path as it is in the database.
- */
- int id;
- };
-}