summaryrefslogtreecommitdiff
path: root/tools/aapt2/Resource.h
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2015-04-10 19:43:55 -0700
committerAdam Lesinski <adamlesinski@google.com>2015-04-15 19:56:59 -0700
commit769de98f2dd41bfe39a1c9f76aefd1ad58942733 (patch)
tree3d79143b08f02dfb61158689f51e01eeb1bb371e /tools/aapt2/Resource.h
parent9310e4285b3fc951c3524d040726d1161015562c (diff)
AAPT2: Add library support
Change-Id: I307f56d9631784ab29ee4156d94886f9b2f25b30
Diffstat (limited to 'tools/aapt2/Resource.h')
-rw-r--r--tools/aapt2/Resource.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/aapt2/Resource.h b/tools/aapt2/Resource.h
index 4d2c64c0a375..f928acd7c8d7 100644
--- a/tools/aapt2/Resource.h
+++ b/tools/aapt2/Resource.h
@@ -193,8 +193,7 @@ inline ::std::ostream& operator<<(::std::ostream& out,
// ResourceType implementation.
//
-inline ::std::ostream& operator<<(::std::ostream& out,
- const ResourceType& val) {
+inline ::std::ostream& operator<<(::std::ostream& out, const ResourceType& val) {
return out << toString(val);
}
@@ -221,6 +220,14 @@ inline bool ResourceName::operator!=(const ResourceName& rhs) const {
!= std::tie(rhs.package, rhs.type, rhs.entry);
}
+inline ::std::ostream& operator<<(::std::ostream& out, const ResourceName& name) {
+ if (!name.package.empty()) {
+ out << name.package << ":";
+ }
+ return out << name.type << "/" << name.entry;
+}
+
+
//
// ResourceNameRef implementation.
//
@@ -264,8 +271,7 @@ inline bool ResourceNameRef::operator!=(const ResourceNameRef& rhs) const {
!= std::tie(rhs.package, rhs.type, rhs.entry);
}
-inline ::std::ostream& operator<<(::std::ostream& out,
- const ResourceNameRef& name) {
+inline ::std::ostream& operator<<(::std::ostream& out, const ResourceNameRef& name) {
if (!name.package.empty()) {
out << name.package << ":";
}