parameters: (self)
return_statement: return self._enum_value
docstring: Return the value of an enum constant.
docstring_summary: Return the value of an enum constant.
docstring_tokens: Return the value of an enum constant .
function: def enum_value(self):
          """Return the value of an enum constant."""
          if not hasattr(self, '_enum_value'):
              assert self.kind == CursorKind.ENUM_CONSTANT_DECL
              # Figure out the underlying type of the enum to know if it
              # is a signed or unsigned quantity.
              underlying_type = self.type
              if underlying_type.kind == TypeKind.ENUM:
                  underlying_type = underlying_type.get_declaration().enum_type
              if underlying_type.kind in (TypeKind.CHAR_U,
                                          TypeKind.UCHAR,
                                          TypeKind.CHAR16,
                                          TypeKind.CHAR32,
                                          TypeKind.USHORT,
                                          TypeKind.UINT,
                                          TypeKind.ULONG,
                                          TypeKind.ULONGLONG,
                                          TypeKind.UINT128):
                  self._enum_value = \
                    conf.lib.clang_getEnumConstantDeclUnsignedValue(self)
              else:
                  self._enum_value = conf.lib.clang_getEnumConstantDeclValue(self)
          return self._enum_value
function_tokens: def enum_value ( self ) : if not hasattr ( self , '_enum_value' ) : assert self . kind == CursorKind . ENUM_CONSTANT_DECL # Figure out the underlying type of the enum to know if it # is a signed or unsigned quantity. underlying_type = self . type if underlying_type . kind == TypeKind . ENUM : underlying_type = underlying_type . get_declaration ( ) . enum_type if underlying_type . kind in ( TypeKind . CHAR_U , TypeKind . UCHAR , TypeKind . CHAR16 , TypeKind . CHAR32 , TypeKind . USHORT , TypeKind . UINT , TypeKind . ULONG , TypeKind . ULONGLONG , TypeKind . UINT128 ) : self . _enum_value = conf . lib . clang_getEnumConstantDeclUnsignedValue ( self ) else : self . _enum_value = conf . lib . clang_getEnumConstantDeclValue ( self ) return self . _enum_value