Created
February 26, 2025 15:05
-
-
Save JasonMarechal25/a3c2ab23e05e159cad9c448eb410abb7 to your computer and use it in GitHub Desktop.
No getter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FillContext | |
| { | |
| public: | |
| FillContext(int first, int last): | |
| firstTimeStep(first), | |
| lastTimeStep(last), | |
| numberOfTimestep{last-first} | |
| { | |
| assert(last >= first); | |
| } | |
| [[nodiscard]] std::vector<unsigned> getSelectedScenarios() const | |
| { | |
| return selectedScenario; | |
| } | |
| void addSelectedScenarios(unsigned scenario) | |
| { | |
| selectedScenario.push_back(scenario); | |
| } | |
| private: | |
| std::vector<unsigned> selectedScenario; | |
| public: | |
| const int firstTimeStep = 0; | |
| const int lastTimeStep = 0; | |
| const int numberOfTimestep = 0; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FillContext | |
| { | |
| public: | |
| FillContext(unsigned first, unsigned last): | |
| firstTimeStep(first), | |
| lastTimeStep(last) | |
| { | |
| } | |
| unsigned getFirstTimeStep() const | |
| { | |
| return firstTimeStep; | |
| } | |
| unsigned getLastTimeStep() const | |
| { | |
| return lastTimeStep; | |
| } | |
| unsigned int getNumberOfTimestep() const | |
| { | |
| return lastTimeStep - firstTimeStep + 1; | |
| } | |
| [[nodiscard]] std::vector<unsigned> getSelectedScenarios() const | |
| { | |
| return selectedScenario; | |
| } | |
| void addSelectedScenarios(unsigned scenario) | |
| { | |
| selectedScenario.push_back(scenario); | |
| } | |
| private: | |
| std::vector<unsigned> selectedScenario; | |
| unsigned firstTimeStep = 0; | |
| unsigned lastTimeStep = 0; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment