Lines Matching refs:value
148 // JSON file. You can look up a value by enum or by name. If there are
150 // The EValue must have an unsigned |value| field and a string |name| field.
167 // Returns the first EValue in the sequence with the given value.
168 // More than one EValue might have the same value.
169 EValue& operator[](unsigned value) {
170 auto where = std::find_if(begin(), end(), [&value](const EValue& e) {
171 return value == e.value;
176 // gets *all* entries for the value, including the first one
177 void gatherAliases(unsigned value, std::vector<EValue*>& aliases) {
179 if (value == e.value)
200 // A single enumerant value. Corresponds to a row in an enumeration table
204 EnumValue() : value(0), desc(nullptr) {}
208 value(the_value), name(the_name), capabilities(std::move(the_caps)),
212 // For ValueEnum, the value from the JSON file.
215 unsigned value;
246 // Returns the first EnumValue in the sequence with the given value.
247 // More than one EnumValue might have the same value. Only valid
249 EnumValue& operator[](unsigned value) {
251 return (*enumValues)[value];
253 // Returns the name of the first EnumValue with the given value.
255 const char* getName(unsigned value) {
256 return (*this)[value].name.c_str();