Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef _NUMERIC_ANSWER_H_
- #define _NUMERIC_ANSWER_H_
- #include <answer.h>
- #include <duration.h>
- #include <price.h>
- namespace appointy
- {
- template <typename NumericType>
- class NumericAnswer : public Answer
- {
- public:
- NumericAnswer(NumericType min, NumericType max, NumericType default_value, const Duration &duration, const Price &price) :
- Answer("numeric"),
- _min(min),
- _max(max),
- _default(default_value),
- _duration(duration),
- _price(price)
- {
- }
- public:
- auto min() const -> NumericType
- {
- return _min;
- }
- auto max() const -> NumericType
- {
- return _max;
- }
- auto default_value() const -> NumericType
- {
- return _default;
- }
- auto NumericAnswer::duration() const -> const Duration &
- {
- return _duration;
- }
- auto NumericAnswer::price() const -> const Price &
- {
- return _price;
- }
- private:
- NumericType _min;
- NumericType _max;
- NumericType _default;
- Duration _duration;
- Price _price;
- };
- } // namespace appointy
- #endif // _NUMERIC_ANSWER_H_
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement