1#ifndef FASTUIDRAW_DEMO_COLORSTOP_COMMAND_LINE_HPP
2#define FASTUIDRAW_DEMO_COLORSTOP_COMMAND_LINE_HPP
3
4#include <string>
5#include <map>
6#include <fastuidraw/colorstop.hpp>
7
8#include "generic_command_line.hpp"
9
10class color_stop_arguments:public command_line_argument
11{
12public:
13
14 class colorstop_data
15 {
16 public:
17 colorstop_data(void):
18 m_discretization(16)
19 {}
20
21 fastuidraw::ColorStopArray m_stops;
22 int m_discretization;
23 };
24
25 typedef std::map<std::string, colorstop_data*> hoard;
26
27
28 explicit
29 color_stop_arguments(command_line_register &parent);
30
31 ~color_stop_arguments();
32
33 virtual
34 int
35 check_arg(const std::vector<std::string> &args, int location);
36
37 virtual
38 void
39 print_command_line_description(std::ostream &ostr) const;
40
41 virtual
42 void
43 print_detailed_description(std::ostream &ostr) const;
44
45 //if necessary allocate the object too.
46 colorstop_data&
47 fetch(const std::string &pname);
48
49 const hoard&
50 values(void) const
51 {
52 return m_values;
53 }
54
55private:
56
57 hoard m_values;
58 std::string m_add, m_add2, m_disc;
59};
60
61#endif
62