C++ features by examples
patterns.cpp
Go to the documentation of this file.
1#include <bits/stdc++.h>
2
3using namespace std;
4
66template <typename ValueType>
69 virtual void set(ValueType i) = 0;
70 virtual ~Setter_interface() = default;
71};
72
73template <typename ValueType>
76 virtual ValueType get() const = 0;
77 virtual ~Getter_interface() = default;
78};
79
80template <typename ValueType>
83 virtual void change(ValueType c) = 0;
84 virtual ~Change_interface() = default;
85};
86