Lines Matching refs:out_resource

481                                    ParsedResource* out_resource) {  in ParseResource()  argument
556 diag_->Error(DiagMessage(out_resource->source) in ParseResource()
581 diag_->Error(DiagMessage(out_resource->source) in ParseResource()
587 out_resource->name.type = ResourceType::kId; in ParseResource()
588 out_resource->name.entry = maybe_name.value().to_string(); in ParseResource()
591 auto item = ParseItem(parser, out_resource, resource_format); in ParseResource()
596 String* empty = ValueCast<String>(out_resource->value.get()); in ParseResource()
599 out_resource->value = util::make_unique<Id>(); in ParseResource()
601 Reference* ref = ValueCast<Reference>(out_resource->value.get()); in ParseResource()
605 out_resource->value = util::make_unique<Id>(); in ParseResource()
608 diag_->Error(DiagMessage(out_resource->source) in ParseResource()
624 diag_->Error(DiagMessage(out_resource->source) in ParseResource()
629 out_resource->name.type = item_iter->second.type; in ParseResource()
630 out_resource->name.entry = maybe_name.value().to_string(); in ParseResource()
637 if (!ParseItem(parser, out_resource, resource_format)) { in ParseResource()
651 diag_->Error(DiagMessage(out_resource->source) in ParseResource()
656 out_resource->name.entry = maybe_name.value().to_string(); in ParseResource()
661 if (!bag_iter->second(this, parser, out_resource)) { in ParseResource()
674 diag_->Error(DiagMessage(out_resource->source) in ParseResource()
680 out_resource->name.type = *parsed_type; in ParseResource()
681 out_resource->name.entry = maybe_name.value().to_string(); in ParseResource()
682 out_resource->value = ParseXml(parser, android::ResTable_map::TYPE_REFERENCE, kNoRawString); in ParseResource()
683 if (!out_resource->value) { in ParseResource()
684 diag_->Error(DiagMessage(out_resource->source) in ParseResource()
692 diag_->Warn(DiagMessage(out_resource->source) in ParseResource()
698 ParsedResource* out_resource, in ParseItem() argument
701 return ParseString(parser, out_resource); in ParseItem()
704 out_resource->value = ParseXml(parser, format, kNoRawString); in ParseItem()
705 if (!out_resource->value) { in ParseItem()
706 diag_->Error(DiagMessage(out_resource->source) << "invalid " in ParseItem()
707 << out_resource->name.type); in ParseItem()
783 ParsedResource* out_resource) { in ParseString() argument
790 diag_->Error(DiagMessage(out_resource->source) in ParseString()
801 diag_->Error(DiagMessage(out_resource->source) in ParseString()
808 out_resource->value = in ParseString()
810 if (!out_resource->value) { in ParseString()
811 diag_->Error(DiagMessage(out_resource->source) << "not a valid string"); in ParseString()
815 if (String* string_value = ValueCast<String>(out_resource->value.get())) { in ParseString()
820 DiagMessage msg(out_resource->source); in ParseString()
832 } else if (StyledString* string_value = ValueCast<StyledString>(out_resource->value.get())) { in ParseString()
838 bool ResourceParser::ParsePublic(xml::XmlPullParser* parser, ParsedResource* out_resource) { in ParsePublic() argument
839 if (out_resource->config != ConfigDescription::DefaultConfig()) { in ParsePublic()
840 diag_->Warn(DiagMessage(out_resource->source) in ParsePublic()
841 << "ignoring configuration '" << out_resource->config << "' for <public> tag"); in ParsePublic()
846 diag_->Error(DiagMessage(out_resource->source) in ParsePublic()
853 diag_->Error(DiagMessage(out_resource->source) << "invalid resource type '" in ParsePublic()
859 out_resource->name.type = *parsed_type; in ParsePublic()
864 diag_->Error(DiagMessage(out_resource->source) in ParsePublic()
868 out_resource->id = maybe_id.value(); in ParsePublic()
873 out_resource->value = util::make_unique<Id>(); in ParsePublic()
876 out_resource->visibility_level = Visibility::Level::kPublic; in ParsePublic()
880 bool ResourceParser::ParsePublicGroup(xml::XmlPullParser* parser, ParsedResource* out_resource) { in ParsePublicGroup() argument
881 if (out_resource->config != ConfigDescription::DefaultConfig()) { in ParsePublicGroup()
882 diag_->Warn(DiagMessage(out_resource->source) in ParsePublicGroup()
883 << "ignoring configuration '" << out_resource->config in ParsePublicGroup()
889 diag_->Error(DiagMessage(out_resource->source) in ParsePublicGroup()
896 diag_->Error(DiagMessage(out_resource->source) << "invalid resource type '" in ParsePublicGroup()
905 diag_->Error(DiagMessage(out_resource->source) in ParsePublicGroup()
913 diag_->Error(DiagMessage(out_resource->source) << "invalid resource ID '" in ParsePublicGroup()
967 out_resource->child_resources.push_back(std::move(child_resource)); in ParsePublicGroup()
980 ParsedResource* out_resource) { in ParseSymbolImpl() argument
983 diag_->Error(DiagMessage(out_resource->source) in ParseSymbolImpl()
991 diag_->Error(DiagMessage(out_resource->source) in ParseSymbolImpl()
997 out_resource->name.type = *parsed_type; in ParseSymbolImpl()
1001 bool ResourceParser::ParseSymbol(xml::XmlPullParser* parser, ParsedResource* out_resource) { in ParseSymbol() argument
1002 if (out_resource->config != ConfigDescription::DefaultConfig()) { in ParseSymbol()
1003 diag_->Warn(DiagMessage(out_resource->source) in ParseSymbol()
1004 << "ignoring configuration '" << out_resource->config << "' for <" in ParseSymbol()
1008 if (!ParseSymbolImpl(parser, out_resource)) { in ParseSymbol()
1012 out_resource->visibility_level = Visibility::Level::kPrivate; in ParseSymbol()
1016 bool ResourceParser::ParseOverlayable(xml::XmlPullParser* parser, ParsedResource* out_resource) { in ParseOverlayable() argument
1017 if (out_resource->config != ConfigDescription::DefaultConfig()) { in ParseOverlayable()
1018 diag_->Warn(DiagMessage(out_resource->source) in ParseOverlayable()
1019 << "ignoring configuration '" << out_resource->config << "' for <overlayable> tag"); in ParseOverlayable()
1025 diag_->Error(DiagMessage(out_resource->source) in ParseOverlayable()
1061 diag_->Error(DiagMessage(out_resource->source) in ParseOverlayable()
1073 out_resource->child_resources.push_back(std::move(child_resource)); in ParseOverlayable()
1084 bool ResourceParser::ParseAddResource(xml::XmlPullParser* parser, ParsedResource* out_resource) { in ParseAddResource() argument
1085 if (ParseSymbolImpl(parser, out_resource)) { in ParseAddResource()
1086 out_resource->visibility_level = Visibility::Level::kUndefined; in ParseAddResource()
1087 out_resource->allow_new = true; in ParseAddResource()
1094 ParsedResource* out_resource) { in ParseAttr() argument
1095 return ParseAttrImpl(parser, out_resource, false); in ParseAttr()
1099 ParsedResource* out_resource, bool weak) { in ParseAttrImpl() argument
1100 out_resource->name.type = ResourceType::kAttr; in ParseAttrImpl()
1103 if (out_resource->config != ConfigDescription::DefaultConfig()) { in ParseAttrImpl()
1104 diag_->Warn(DiagMessage(out_resource->source) in ParseAttrImpl()
1105 << "ignoring configuration '" << out_resource->config in ParseAttrImpl()
1106 << "' for attribute " << out_resource->name); in ParseAttrImpl()
1107 out_resource->config = ConfigDescription::DefaultConfig(); in ParseAttrImpl()
1215 out_resource->child_resources.push_back(std::move(child_resource)); in ParseAttrImpl()
1252 out_resource->value = std::move(attr); in ParseAttrImpl()
1317 ParsedResource* out_resource) { in ParseStyle() argument
1318 out_resource->name.type = type; in ParseStyle()
1329 diag_->Error(DiagMessage(out_resource->source) << err_str); in ParseStyle()
1340 std::string style_name = out_resource->name.entry; in ParseStyle()
1372 out_resource->value = std::move(style); in ParseStyle()
1376 bool ResourceParser::ParseArray(xml::XmlPullParser* parser, ParsedResource* out_resource) { in ParseArray() argument
1386 return ParseArrayImpl(parser, out_resource, resource_format); in ParseArray()
1389 bool ResourceParser::ParseIntegerArray(xml::XmlPullParser* parser, ParsedResource* out_resource) { in ParseIntegerArray() argument
1390 return ParseArrayImpl(parser, out_resource, android::ResTable_map::TYPE_INTEGER); in ParseIntegerArray()
1393 bool ResourceParser::ParseStringArray(xml::XmlPullParser* parser, ParsedResource* out_resource) { in ParseStringArray() argument
1394 return ParseArrayImpl(parser, out_resource, android::ResTable_map::TYPE_STRING); in ParseStringArray()
1398 ParsedResource* out_resource, in ParseArrayImpl() argument
1400 out_resource->name.type = ResourceType::kArray; in ParseArrayImpl()
1408 diag_->Error(DiagMessage(out_resource->source) in ParseArrayImpl()
1449 out_resource->value = std::move(array); in ParseArrayImpl()
1454 ParsedResource* out_resource) { in ParsePlural() argument
1455 out_resource->name.type = ResourceType::kPlurals; in ParsePlural()
1529 out_resource->value = std::move(plural); in ParsePlural()
1534 ParsedResource* out_resource) { in ParseDeclareStyleable() argument
1535 out_resource->name.type = ResourceType::kStyleable; in ParseDeclareStyleable()
1538 out_resource->visibility_level = Visibility::Level::kPublic; in ParseDeclareStyleable()
1541 if (out_resource->config != ConfigDescription::DefaultConfig()) { in ParseDeclareStyleable()
1542 diag_->Warn(DiagMessage(out_resource->source) in ParseDeclareStyleable()
1543 << "ignoring configuration '" << out_resource->config in ParseDeclareStyleable()
1544 << "' for styleable " << out_resource->name.entry); in ParseDeclareStyleable()
1545 out_resource->config = ConfigDescription::DefaultConfig(); in ParseDeclareStyleable()
1603 out_resource->child_resources.push_back(std::move(child_resource)); in ParseDeclareStyleable()
1619 out_resource->value = std::move(styleable); in ParseDeclareStyleable()