Patrick Venture | 863b924 | 2018-03-08 08:29:23 -0800 | [diff] [blame] | 1 | #pragma once |
2 | |||||
3 | /* Interface that implements an exception throwing read method. */ | ||||
4 | |||||
5 | #include "interfaces.hpp" | ||||
6 | |||||
Patrick Venture | da4a5dd | 2018-08-31 09:42:48 -0700 | [diff] [blame] | 7 | class ReadOnly : public WriteInterface |
Patrick Venture | 863b924 | 2018-03-08 08:29:23 -0800 | [diff] [blame] | 8 | { |
Patrick Venture | da4a5dd | 2018-08-31 09:42:48 -0700 | [diff] [blame] | 9 | public: |
10 | ReadOnly() : WriteInterface(0, 0) | ||||
Patrick Venture | a83a3ec | 2020-08-04 09:52:05 -0700 | [diff] [blame] | 11 | {} |
Patrick Venture | 863b924 | 2018-03-08 08:29:23 -0800 | [diff] [blame] | 12 | |
Patrick Venture | da4a5dd | 2018-08-31 09:42:48 -0700 | [diff] [blame] | 13 | void write(double value) override; |
Patrick Venture | 863b924 | 2018-03-08 08:29:23 -0800 | [diff] [blame] | 14 | }; |
15 | |||||
Patrick Venture | da4a5dd | 2018-08-31 09:42:48 -0700 | [diff] [blame] | 16 | class ReadOnlyNoExcept : public WriteInterface |
Patrick Venture | 863b924 | 2018-03-08 08:29:23 -0800 | [diff] [blame] | 17 | { |
Patrick Venture | da4a5dd | 2018-08-31 09:42:48 -0700 | [diff] [blame] | 18 | public: |
19 | ReadOnlyNoExcept() : WriteInterface(0, 0) | ||||
Patrick Venture | a83a3ec | 2020-08-04 09:52:05 -0700 | [diff] [blame] | 20 | {} |
Patrick Venture | 863b924 | 2018-03-08 08:29:23 -0800 | [diff] [blame] | 21 | |
Patrick Venture | da4a5dd | 2018-08-31 09:42:48 -0700 | [diff] [blame] | 22 | void write(double value) override; |
Patrick Venture | 863b924 | 2018-03-08 08:29:23 -0800 | [diff] [blame] | 23 | }; |