/* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef AAPT_LINKER_REFERENCELINKER_H #define AAPT_LINKER_REFERENCELINKER_H #include "android-base/macros.h" #include "Resource.h" #include "ResourceValues.h" #include "link/Linkers.h" #include "process/IResourceTableConsumer.h" #include "process/SymbolTable.h" #include "xml/XmlDom.h" namespace aapt { // A ValueTransformer that returns fully linked versions of resource and macro references. class ReferenceLinkerTransformer : public CloningValueTransformer { public: ReferenceLinkerTransformer(const CallSite& callsite, IAaptContext* context, SymbolTable* symbols, StringPool* string_pool, ResourceTable* table, xml::IPackageDeclStack* decl) : CloningValueTransformer(string_pool), callsite_(callsite), context_(context), symbols_(symbols), table_(table), package_decls_(decl) { } std::unique_ptr TransformDerived(const Reference* value) override; std::unique_ptr TransformItem(const Reference* value) override; std::unique_ptr