#NEWLINE# @ property #NEWLINE# def enums( self ) : #NEWLINE# #INDENT# if ( self . _enums is not None ) : #NEWLINE# #INDENT# return self . _enums #NEWLINE# #UNINDENT# self . _enums = dict ( ) #NEWLINE# for element in self . root . iter ( 'enums' ) : #NEWLINE# #INDENT# namespace = element . attrib [ 'namespace' ] #NEWLINE# type_ = element . get ( 'type' ) #NEWLINE# group = element . get ( 'group' ) #NEWLINE# vendor = element . get ( 'vendor' ) #NEWLINE# comment = element . get ( 'comment' , '' ) #NEWLINE# for enum in element : #NEWLINE# #INDENT# if ( enum . tag == 'unused' ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# assert ( enum . tag == 'enum' ) #NEWLINE# name = enum . attrib [ 'name' ] #NEWLINE# self . _enums [ name ] = Enum ( name , enum . attrib [ 'value' ] , namespace , type_ , group , name , comment ) #NEWLINE# #UNINDENT# #UNINDENT# return self . _enums