Add support for enumerations
Merge pull request #5094 from wmtan/SupportEnums

Support enums