MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / parse

Method parse

utils/command_line/ListOption.h:72–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70
71template <typename T>
72bool ListOption<T>::parse(std::string value)
73{
74 _is_set = true;
75
76 try
77 {
78 std::stringstream stream{value};
79 std::string item;
80
81 while (!std::getline(stream, item, ',').fail())
82 {
83 std::stringstream item_stream(item);
84 T typed_value{};
85
86 item_stream >> typed_value;
87
88 if (!item_stream.fail())
89 {
90 _values.emplace_back(typed_value);
91 }
92
93 _is_set = _is_set && !item_stream.fail();
94 }
95
96 return _is_set;
97 }
98 catch (const std::invalid_argument &)
99 {
100 return false;
101 }
102}
103
104template <typename T>
105inline std::string ListOption<T>::help() const

Callers 15

mainFunction · 0.45
run_exampleFunction · 0.45
do_setupMethod · 0.45
do_setupMethod · 0.45
run_exampleFunction · 0.45
do_setupMethod · 0.45
do_setupMethod · 0.45
do_setupMethod · 0.45
do_setupMethod · 0.45
do_setupMethod · 0.45
do_setupMethod · 0.45
do_setupMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected