diff options
author | zaaarf <zaaarf@proton.me> | 2023-11-22 17:16:34 +0100 |
---|---|---|
committer | zaaarf <zaaarf@proton.me> | 2023-11-22 17:16:34 +0100 |
commit | 1683859e333f98fb63f1c72d926bb366a3b89f0b (patch) | |
tree | e11dde918a7f1f228d3383ba8f9287385e43b4f5 /src/openvic-simulation/testing/Requirement.hpp | |
parent | 5c6caf6fbb7c606f4ebe0c397cc15c97d776f13d (diff) |
chore: use PROPERTY and its variants when possible
Diffstat (limited to 'src/openvic-simulation/testing/Requirement.hpp')
-rw-r--r-- | src/openvic-simulation/testing/Requirement.hpp | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/src/openvic-simulation/testing/Requirement.hpp b/src/openvic-simulation/testing/Requirement.hpp index 20dad3d..e91fa79 100644 --- a/src/openvic-simulation/testing/Requirement.hpp +++ b/src/openvic-simulation/testing/Requirement.hpp @@ -1,44 +1,31 @@ #pragma once #include <string> +#include "openvic-simulation/utility/Getters.hpp" namespace OpenVic { class Requirement { // Loaded during construction - std::string id; - std::string text; - std::string acceptance_criteria; - bool pass = false; // Explicitly false to begin - bool tested = false; + std::string PROPERTY_RW(id); + std::string PROPERTY_RW(text); + std::string PROPERTY_RW(acceptance_criteria); + bool PROPERTY(pass); + bool PROPERTY_RW(tested); // Initialised and used during script execution - std::string target_value; - std::string actual_value; + std::string PROPERTY_RW(target_value); + std::string PROPERTY_RW(actual_value); public: Requirement(std::string in_id, std::string in_text, std::string in_acceptance_criteria) { id = in_id; text = in_text; acceptance_criteria = in_acceptance_criteria; + pass = false; // Explicitly false to begin + tested = false; } - // Getters - std::string get_id(); - std::string get_text(); - std::string get_acceptance_criteria(); - bool get_pass(); - bool get_tested(); - std::string get_target_value(); - std::string get_actual_value(); - - // Setters - void set_id(std::string in_id); - void set_text(std::string in_text); - void set_acceptance_criteria(std::string in_acceptance_criteria); void set_pass(bool in_pass); - void set_tested(bool in_tested); - void set_target_value(std::string in_target_value); - void set_actual_value(std::string in_actual_value); }; } |