Lines Matching refs:field

50 // for an int field.  Do not report failures for missing fields.
54 // For nested field, the internal message also has to implement the registration
65 // For repeated field, we just assume std::vector<std::unique_ptr<ElementType>>
111 virtual bool Convert(const base::Value& value, FieldType* field) const = 0;
118 FieldType StructType::*field,
121 field_pointer_(field),
143 bool Convert(const base::Value& value, int* field) const override;
155 bool Convert(const base::Value& value, std::string* field) const override;
168 bool Convert(const base::Value& value, std::u16string* field) const override;
180 bool Convert(const base::Value& value, double* field) const override;
192 bool Convert(const base::Value& value, bool* field) const override;
202 typedef bool (*ConvertFunc)(const base::Value* value, FieldType* field);
207 bool Convert(const base::Value& value, FieldType* field) const override {
208 return convert_func_(&value, field);
221 typedef bool (*ConvertFunc)(std::string_view value, FieldType* field);
226 bool Convert(const base::Value& value, FieldType* field) const override {
229 convert_func_(string_value, field);
244 bool Convert(const base::Value& value, NestedType* field) const override {
245 return converter_.Convert(value, field);
261 std::vector<std::unique_ptr<Element>>* field) const override {
264 // The field is not a list.
268 field->reserve(list->GetSize());
276 field->push_back(std::move(e));
297 std::vector<std::unique_ptr<NestedType>>* field) const override {
302 field->reserve(list->GetSize());
310 field->push_back(std::move(nested));
328 typedef bool (*ConvertFunc)(const base::Value* value, NestedType* field);
334 std::vector<std::unique_ptr<NestedType>>* field) const override {
339 field->reserve(list->GetSize());
347 field->push_back(std::move(nested));
369 void RegisterIntField(const std::string& field_name, int StructType::*field) {
372 field_name, field, new internal::BasicValueConverter<int>));
376 std::string StructType::*field) {
379 field_name, field, new internal::BasicValueConverter<std::string>));
383 std::u16string StructType::*field) {
386 field_name, field,
391 bool StructType::*field) {
394 field_name, field, new internal::BasicValueConverter<bool>));
398 double StructType::*field) {
401 field_name, field, new internal::BasicValueConverter<double>));
406 NestedType StructType::*field) {
409 field_name, field, new internal::NestedValueConverter<NestedType>));
414 FieldType StructType::*field,
418 field_name, field,
424 FieldType StructType::*field,
429 field_name, field,
435 std::vector<std::unique_ptr<int>> StructType::*field) {
438 field_name, field, new internal::RepeatedValueConverter<int>));
443 std::vector<std::unique_ptr<std::string>> StructType::*field) {
447 field_name, field,
453 std::vector<std::unique_ptr<std::u16string>> StructType::*field) {
457 field_name, field,
463 std::vector<std::unique_ptr<double>> StructType::*field) {
466 field_name, field, new internal::RepeatedValueConverter<double>));
471 std::vector<std::unique_ptr<bool>> StructType::*field) {
474 field_name, field, new internal::RepeatedValueConverter<bool>));
480 std::vector<std::unique_ptr<NestedType>> StructType::*field,
485 field_name, field,
493 std::vector<std::unique_ptr<NestedType>> StructType::*field) {
497 field_name, field,
509 const base::Value* field = NULL;
510 if (dictionary_value->Get(field_converter->field_path(), &field)) {
511 if (!field_converter->ConvertField(*field, output)) {