summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceTable.h
diff options
context:
space:
mode:
author Adam Lesinski <adamlesinski@google.com> 2015-10-30 18:05:31 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-10-30 18:05:31 +0000
commit030cfd3da697d51bf1bffd076881c12acedd851e (patch)
treeb10071f3ec72837a39c2ba9202061e02034e5d3b /tools/aapt2/ResourceTable.h
parent1f1ed6e26dd88e940807fea197e6a1bf5bb3f0a3 (diff)
parente78fd617ec60139a973a01925fa7adad31febb39 (diff)
Merge "AAPT2: Move comments and source into Value"
Diffstat (limited to 'tools/aapt2/ResourceTable.h')
-rw-r--r--tools/aapt2/ResourceTable.h37
1 files changed, 16 insertions, 21 deletions
diff --git a/tools/aapt2/ResourceTable.h b/tools/aapt2/ResourceTable.h
index be909361bef1..980504be377b 100644
--- a/tools/aapt2/ResourceTable.h
+++ b/tools/aapt2/ResourceTable.h
@@ -47,12 +47,10 @@ struct Symbol {
};
/**
- * The resource value for a specific configuration.
+ * Represents a value defined for a given configuration.
*/
struct ResourceConfigValue {
ConfigDescription config;
- Source source;
- std::u16string comment;
std::unique_ptr<Value> value;
};
@@ -158,12 +156,11 @@ public:
static int resolveValueCollision(Value* existing, Value* incoming);
bool addResource(const ResourceNameRef& name, const ConfigDescription& config,
- const Source& source, std::unique_ptr<Value> value,
- IDiagnostics* diag);
+ std::unique_ptr<Value> value, IDiagnostics* diag);
bool addResource(const ResourceNameRef& name, const ResourceId resId,
- const ConfigDescription& config, const Source& source,
- std::unique_ptr<Value> value, IDiagnostics* diag);
+ const ConfigDescription& config, std::unique_ptr<Value> value,
+ IDiagnostics* diag);
bool addFileReference(const ResourceNameRef& name, const ConfigDescription& config,
const Source& source, const StringPiece16& path, IDiagnostics* diag);
@@ -174,18 +171,18 @@ public:
* names.
*/
bool addResourceAllowMangled(const ResourceNameRef& name, const ConfigDescription& config,
- const Source& source, std::unique_ptr<Value> value,
- IDiagnostics* diag);
+ std::unique_ptr<Value> value, IDiagnostics* diag);
bool addResourceAllowMangled(const ResourceNameRef& name, const ResourceId id,
- const ConfigDescription& config,
- const Source& source, std::unique_ptr<Value> value,
+ const ConfigDescription& config, std::unique_ptr<Value> value,
IDiagnostics* diag);
- bool setSymbolState(const ResourceNameRef& name, const ResourceId resId, const Source& source,
- SymbolState state, IDiagnostics* diag);
+ bool setSymbolState(const ResourceNameRef& name, const ResourceId resId,
+ const Symbol& symbol, IDiagnostics* diag);
+
bool setSymbolStateAllowMangled(const ResourceNameRef& name, const ResourceId resId,
- const Source& source, SymbolState state, IDiagnostics* diag);
+ const Symbol& symbol, IDiagnostics* diag);
+
struct SearchResult {
ResourceTablePackage* package;
ResourceTableType* type;
@@ -224,13 +221,11 @@ public:
private:
ResourceTablePackage* findOrCreatePackage(const StringPiece16& name);
- bool addResourceImpl(const ResourceNameRef& name, const ResourceId resId,
- const ConfigDescription& config, const Source& source,
- std::unique_ptr<Value> value, const char16_t* validChars,
- IDiagnostics* diag);
- bool setSymbolStateImpl(const ResourceNameRef& name, const ResourceId resId,
- const Source& source, SymbolState state, const char16_t* validChars,
- IDiagnostics* diag);
+ bool addResourceImpl(const ResourceNameRef& name, ResourceId resId,
+ const ConfigDescription& config, std::unique_ptr<Value> value,
+ const char16_t* validChars, IDiagnostics* diag);
+ bool setSymbolStateImpl(const ResourceNameRef& name, ResourceId resId,
+ const Symbol& symbol, const char16_t* validChars, IDiagnostics* diag);
};
} // namespace aapt