diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:43 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:43 -0800 |
commit | f013e1afd1e68af5e3b868c26a653bbfb39538f8 (patch) | |
tree | 7ad6c8fd9c7b55f4b4017171dec1cb760bbd26bf /tools/aapt/ResourceTable.h | |
parent | e70cfafe580c6f2994c4827cd8a534aabf3eb05c (diff) |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'tools/aapt/ResourceTable.h')
-rw-r--r-- | tools/aapt/ResourceTable.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tools/aapt/ResourceTable.h b/tools/aapt/ResourceTable.h index b36234d37cc5..fff4f49795b0 100644 --- a/tools/aapt/ResourceTable.h +++ b/tools/aapt/ResourceTable.h @@ -10,6 +10,11 @@ #include "StringPool.h" #include "SourcePos.h" +#include <set> +#include <map> + +using namespace std; + class ResourceTable; enum { @@ -136,12 +141,14 @@ public: uint32_t getResId(const String16& package, const String16& type, - const String16& name) const; + const String16& name, + bool onlyPublic = false) const; uint32_t getResId(const String16& ref, const String16* defType = NULL, const String16* defPackage = NULL, - const char** outErrorMsg = NULL) const; + const char** outErrorMsg = NULL, + bool onlyPublic = false) const; static bool isValidResourceName(const String16& s); @@ -155,6 +162,8 @@ public: status_t assignResourceIds(); status_t addSymbols(const sp<AaptSymbols>& outSymbols = NULL); + void addLocalization(const String16& name, const String8& locale); + status_t validateLocalizations(void); status_t flatten(Bundle*, const sp<AaptFile>& dest); @@ -491,7 +500,6 @@ private: String16 mAssetsPackage; sp<AaptAssets> mAssets; - DefaultKeyedVector<String16, DefaultKeyedVector<String16, uint32_t> > mPublicNames; DefaultKeyedVector<String16, sp<Package> > mPackages; Vector<sp<Package> > mOrderedPackages; uint32_t mNextPackageId; @@ -500,6 +508,9 @@ private: size_t mNumLocal; SourcePos mCurrentXmlPos; Bundle* mBundle; + + // key = string resource name, value = set of locales in which that name is defined + map<String16, set<String8> > mLocalizations; }; class ResourceFilter |