Saner determination of a declared type's name (now short + full name)
at the time the type is introduced to a scope.
diff --git a/EnumType.h b/EnumType.h
index 7a174cb..2bb258c 100644
--- a/EnumType.h
+++ b/EnumType.h
@@ -8,22 +8,10 @@
namespace android {
-struct EnumValue {
- EnumValue(const char *name, const char *value = NULL);
-
- std::string name() const;
- const char *value() const;
-
-private:
- std::string mName;
- const char *mValue;
-
- DISALLOW_COPY_AND_ASSIGN(EnumValue);
-};
+struct EnumValue;
struct EnumType : public NamedType {
- EnumType(const char *name,
- std::vector<EnumValue *> *values,
+ EnumType(std::vector<EnumValue *> *values,
Type *storageType = NULL);
const ScalarType *resolveToScalarType() const override;
@@ -47,6 +35,19 @@
DISALLOW_COPY_AND_ASSIGN(EnumType);
};
+struct EnumValue {
+ EnumValue(const char *name, const char *value = NULL);
+
+ std::string name() const;
+ const char *value() const;
+
+private:
+ std::string mName;
+ const char *mValue;
+
+ DISALLOW_COPY_AND_ASSIGN(EnumValue);
+};
+
} // namespace android
#endif // ENUM_TYPE_H_