diff options
clean up
10 files changed, 0 insertions, 165 deletions
| -rw-r--r-- | Utills/si_14.06/task2/Values/Date/Date.cpp | 19 | ||||
| -rw-r--r-- | Utills/si_14.06/task2/Values/Date/Date.h | 22 | ||||
| -rw-r--r-- | Utills/si_14.06/task2/Values/DateTime/DateTime.cpp | 14 | ||||
| -rw-r--r-- | Utills/si_14.06/task2/Values/DateTime/DateTime.h | 14 | ||||
| -rw-r--r-- | Utills/si_14.06/task2/Values/String/StringValue.cpp | 14 | ||||
| -rw-r--r-- | Utills/si_14.06/task2/Values/String/StringValue.h | 15 | ||||
| -rw-r--r-- | Utills/si_14.06/task2/Values/Time/Time.cpp | 19 | ||||
| -rw-r--r-- | Utills/si_14.06/task2/Values/Time/Time.h | 19 | ||||
| -rw-r--r-- | Utills/si_14.06/task2/Values/ValueBase/Value.cpp | 11 | ||||
| -rw-r--r-- | Utills/si_14.06/task2/Values/ValueBase/Value.h | 18 |
diff --git a/Utills/si_14.06/task2/Values/Date/Date.cpp b/Utills/si_14.06/task2/Values/Date/Date.cpp deleted file mode 100644 index 3d872d3..0000000 --- a/Utills/si_14.06/task2/Values/Date/Date.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "Date.h" - -//validation is needed for the date fields! -Date::Date(const std::string& name, unsigned day, unsigned month, unsigned year) : Value(name), year(year), month(month), day(day) -{} - -std::string Date::getDateString() const -{ - return std::to_string(day) + "." + std::to_string(month) + "." + std::to_string(year);; -} -std::string Date::toString() const -{ - return getPrefix() + getDateString() + "}"; -} - -Value* Date::clone() const -{ - return new Date(*this); -}
\ No newline at end of file diff --git a/Utills/si_14.06/task2/Values/Date/Date.h b/Utills/si_14.06/task2/Values/Date/Date.h deleted file mode 100644 index 6194225..0000000 --- a/Utills/si_14.06/task2/Values/Date/Date.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include "../ValueBase/Value.h" - -class Date : public virtual Value -{ - unsigned day; - unsigned month; - unsigned year; - -protected: - - std::string getDateString() const; - -public: - - Date(const std::string& name, unsigned day, unsigned month, unsigned year); - - Value* clone() const; - - std::string toString() const; -};
\ No newline at end of file diff --git a/Utills/si_14.06/task2/Values/DateTime/DateTime.cpp b/Utills/si_14.06/task2/Values/DateTime/DateTime.cpp deleted file mode 100644 index b2e7e97..0000000 --- a/Utills/si_14.06/task2/Values/DateTime/DateTime.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "DateTime.h" - -DateTime::DateTime(const std::string& name, size_t day, size_t month, size_t year, size_t hours, size_t mins) : Value(name), Date(name, day, month, year), Time(name, hours,mins) -{} - -std::string DateTime::toString() const -{ - return getPrefix() + getDateString() + ", " + getTimeString() + "}"; -} - -Value* DateTime::clone() const -{ - return new DateTime(*this); -}
\ No newline at end of file diff --git a/Utills/si_14.06/task2/Values/DateTime/DateTime.h b/Utills/si_14.06/task2/Values/DateTime/DateTime.h deleted file mode 100644 index 61d6a9a..0000000 --- a/Utills/si_14.06/task2/Values/DateTime/DateTime.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -#include "../Date/Date.h" -#include "../Time/Time.h" - -class DateTime : public Date, public Time -{ -public: - DateTime(const std::string& name, size_t day, size_t month, size_t year, size_t hours, size_t mins); - - std::string toString() const; - - Value* clone() const; -};
\ No newline at end of file diff --git a/Utills/si_14.06/task2/Values/String/StringValue.cpp b/Utills/si_14.06/task2/Values/String/StringValue.cpp deleted file mode 100644 index 8d47f24..0000000 --- a/Utills/si_14.06/task2/Values/String/StringValue.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "StringValue.h" - -StringValue::StringValue(const std::string& name, const std::string& value) : Value(name), value(value) -{} - -std::string StringValue::toString() const -{ - return getPrefix() + '\"' + value + '\"' + "}"; -} - -Value* StringValue::clone() const -{ - return new StringValue(*this); -}
\ No newline at end of file diff --git a/Utills/si_14.06/task2/Values/String/StringValue.h b/Utills/si_14.06/task2/Values/String/StringValue.h deleted file mode 100644 index 4e1500f..0000000 --- a/Utills/si_14.06/task2/Values/String/StringValue.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include "../ValueBase/Value.h" - -class StringValue : public Value -{ - std::string value; -public: - - StringValue(const std::string& name, const std::string& value); - - Value* clone() const; - - std::string toString() const; -};
\ No newline at end of file diff --git a/Utills/si_14.06/task2/Values/Time/Time.cpp b/Utills/si_14.06/task2/Values/Time/Time.cpp deleted file mode 100644 index 5b49e54..0000000 --- a/Utills/si_14.06/task2/Values/Time/Time.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "Time.h" - -//validation is needed for the time fields! -Time::Time(const std::string& name, unsigned hours, unsigned mins) : Value(name), hours(hours), mins(mins) -{} - -std::string Time::getTimeString() const -{ - return std::to_string(hours) + ":" + std::to_string(mins); -} -std::string Time::toString() const -{ - return getPrefix() + getTimeString() + "}"; -} - -Value* Time::clone() const -{ - return new Time(*this); -}
\ No newline at end of file diff --git a/Utills/si_14.06/task2/Values/Time/Time.h b/Utills/si_14.06/task2/Values/Time/Time.h deleted file mode 100644 index 1d93d49..0000000 --- a/Utills/si_14.06/task2/Values/Time/Time.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include "../ValueBase/Value.h" - -class Time : public virtual Value -{ - unsigned hours; - unsigned mins; - -protected: - std::string Time::getTimeString() const; - -public: - Time(const std::string& name, unsigned hours, unsigned mins); - - Value* clone() const; - - std::string toString() const; -};
\ No newline at end of file diff --git a/Utills/si_14.06/task2/Values/ValueBase/Value.cpp b/Utills/si_14.06/task2/Values/ValueBase/Value.cpp deleted file mode 100644 index cd7c821..0000000 --- a/Utills/si_14.06/task2/Values/ValueBase/Value.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "Value.h" - -Value::Value(const std::string& valueName) : valueName(valueName) -{ - -} - -std::string Value::getPrefix() const -{ - return "{ " + valueName + " : "; -}
\ No newline at end of file diff --git a/Utills/si_14.06/task2/Values/ValueBase/Value.h b/Utills/si_14.06/task2/Values/ValueBase/Value.h deleted file mode 100644 index e3320f3..0000000 --- a/Utills/si_14.06/task2/Values/ValueBase/Value.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once -#include <string> - -class Value -{ -protected: - std::string valueName; -public: - Value(const std::string& valueName); - - std::string getPrefix() const; - - virtual std::string toString() const = 0; - - virtual Value* clone() const = 0; - - virtual ~Value(){} -};
\ No newline at end of file |
