Unify generation of class attributes.

--HG--
branch : clangtypes
Add some documentation comments.

--HG--
branch : clangtypes