1 #ifndef MENUPP_OPTION_HPP_
2 #define MENUPP_OPTION_HPP_
13 class Option
: public INode
20 explicit Option(const char* label
, F f
)
21 : _label(label
), _f(f
) {}
23 NodeId
id() const override
{ return _id
; }
25 void set_id(NodeId id
) override
{ _id
= id
; }
27 void dump(std::ostream
& os
, size_t indent
, size_t total_indent
) const override
30 std::fill_n(std::ostream_iterator
<char>(os
), total_indent
, ' ');
31 os
<< "Option" << _id
<< ": \"" << label() << "\"\n";
34 NodeId
move(Move m
) override
49 INode
* get(size_t) override
{ return nullptr; }
51 const char* label() const override
{ return _label
; }
56 #endif // MENUPP_OPTION_HPP_