AAPT2: Add library support

Change-Id: I307f56d9631784ab29ee4156d94886f9b2f25b30
diff --git a/tools/aapt2/Resource.h b/tools/aapt2/Resource.h
index 4d2c64c..f928acd 100644
--- a/tools/aapt2/Resource.h
+++ b/tools/aapt2/Resource.h
@@ -193,8 +193,7 @@
 // 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 @@
             != 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 @@
             != 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 << ":";
     }