Simplify overly long fully specified type names by stripping out the current
namespace prefix if possible. Properly include "types.h" for regular
(non-interface) types. Emit full names where appropriate.
diff --git a/FQName.h b/FQName.h
index ba777d0..119a653 100644
--- a/FQName.h
+++ b/FQName.h
@@ -4,6 +4,7 @@
#include <android-base/macros.h>
#include <string>
+#include <vector>
namespace android {
@@ -33,6 +34,20 @@
bool operator<(const FQName &other) const;
+ // Returns an absolute C++ namespace prefix, i.e.
+ // ::android::hardware::Foo.
+ std::string cppNamespace() const;
+
+ // Returns a fully qualified absolute C++ type name, i.e.
+ // ::android::hardware::Foo::bar::baz.
+ std::string cppName() const;
+
+ void getPackageComponents(std::vector<std::string> *components) const;
+
+ void getPackageAndVersionComponents(
+ std::vector<std::string> *components,
+ bool cpp_compatible) const;
+
private:
bool mValid;
std::string mPackage;