1 STRING_EXTENSION_LEVEL_OUTSIDE
(SBTypeEnumMember
, lldb
::eDescriptionLevelBrief
)
2 %extend lldb
::SBTypeEnumMember
{
6 '''Iterate over all members in a lldb.SBTypeEnumMemberList object.'''
7 return lldb_iter
(self
, 'GetSize'
, 'GetTypeEnumMemberAtIndex'
)
10 '''Return the number of members in a lldb.SBTypeEnumMemberList object.'''
13 name
= property
(GetName
, None
, doc
='''A read only property that returns the name for this enum member as a string.'''
)
14 type
= property
(GetType
, None
, doc
='''A read only property that returns an lldb object that represents the type
(lldb.SBType
) for this enum member.'''
)
15 signed
= property
(GetValueAsSigned
, None
, doc
='''A read only property that returns the value of this enum member as a signed integer.'''
)
16 unsigned
= property
(GetValueAsUnsigned
, None
, doc
='''A read only property that returns the value of this enum member as a unsigned integer.'''
)
21 %extend lldb
::SBTypeEnumMemberList
{
25 '''Iterate over all members in a lldb.SBTypeEnumMemberList object.'''
26 return lldb_iter
(self
, 'GetSize'
, 'GetTypeEnumMemberAtIndex'
)
29 '''Return the number of members in a lldb.SBTypeEnumMemberList object.'''
32 def __getitem__
(self
, key
):
33 num_elements
= self.GetSize
()
35 if
-num_elements
<= key
< num_elements
:
37 return self.GetTypeEnumMemberAtIndex
(key
)
38 elif type
(key
) is str
:
39 for idx in range
(num_elements
):
40 item
= self.GetTypeEnumMemberAtIndex
(idx
)