diff options
| author | Yana Blashchishina <[email protected]> | 2024-03-07 17:41:26 -0800 |
|---|---|---|
| committer | Yana Blashchishina <[email protected]> | 2024-03-07 17:41:26 -0800 |
| commit | bbdf772656c277a78b245e89ad295519cc7d5e18 (patch) | |
| tree | bf7883bb37a0b9ad9e88ac9d9ac2c1847e5b3284 /Homework 8/MyStructures/Contact.hpp | |
| parent | contacts.hpp added (diff) | |
| download | homework-8-yanablash-bbdf772656c277a78b245e89ad295519cc7d5e18.tar.xz homework-8-yanablash-bbdf772656c277a78b245e89ad295519cc7d5e18.zip | |
errors :(
Diffstat (limited to 'Homework 8/MyStructures/Contact.hpp')
| -rw-r--r-- | Homework 8/MyStructures/Contact.hpp | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/Homework 8/MyStructures/Contact.hpp b/Homework 8/MyStructures/Contact.hpp index 44cc0ed..5d47aed 100644 --- a/Homework 8/MyStructures/Contact.hpp +++ b/Homework 8/MyStructures/Contact.hpp @@ -3,10 +3,115 @@ namespace MyStructures { + template<typename T> + class Contact + { + public: + Contact() = default; + Contact(const char* name, short age); + + ~Contact() = default; + + Contact(const Contact& copy); + Contact& operator=(const Contact& rhs); + + Contact(Contact&& move); + Contact& operator=(Contact&& rhs); + + short GetAge(); + const char* GetName(); + + void SetAge(short age); + void SetName(const char* name); + + T GetCustomValue(); + void SetCustomValue(T& newValue); + + void Print(); + + private: + const char* name_{}; + short age_{ 0 }; + T custom_value_{}; + + + + + }; + +} + +template <typename T> +Contact<T>::Contact(const char* name, short age) +{ +} + +template <typename T> +Contact<T>::Contact(const Contact& copy) +{ +} + +template <typename T> +Contact<T>& Contact<T>::operator=(const Contact& rhs) +{ +} + +template <typename T> +Contact<T>::Contact(Contact&& move) +{ +} + +template <typename T> +Contact<T>& Contact<T>::operator=(Contact&& rhs) +{ + +} + +template <typename T> +short Contact<T>::GetAge() +{ + +} + +template <typename T> +const char* Contact<T>::GetName() +{ } +template <typename T> +void Contact<T>::SetAge(short age) +{ + +} + + +template<typename T> +void Contact<T>::SetName(const char* name) +{ + +} + + +template<typename T> +T Contact<T>::GetCustomValue() +{ + return custome_value_; +} + + +template<typename T> +void Contact<T>::SetCustomValue(T& newValue) +{ + custom_value_ = newValue; +} + + +template<typename T> +void Contact<T>::Print() + { + } #endif
\ No newline at end of file |