(Arch, Cursor, NameOverride = "")
| 205 | Arch.CurrentNamespace = Arch.CurrentNamespace + Namespace + "::" |
| 206 | |
| 207 | def HandleStructDeclCursor(Arch, Cursor, NameOverride = ""): |
| 208 | # Append namespace |
| 209 | CursorName = "" |
| 210 | StructType = Cursor.type |
| 211 | if (len(StructType.spelling) == 0): |
| 212 | CursorName = NameOverride |
| 213 | else: |
| 214 | CursorName = StructType.spelling |
| 215 | |
| 216 | if (len(CursorName) != 0): |
| 217 | Arch.NamespaceScope.append(CursorName) |
| 218 | SetNamespace(Arch) |
| 219 | |
| 220 | Struct = StructDefinition( |
| 221 | Name = CursorName, |
| 222 | Size = StructType.get_size()) |
| 223 | |
| 224 | # Handle children |
| 225 | Arch.Structs[Struct.Name] = HandleStructElements(Arch, Struct, Cursor) |
| 226 | |
| 227 | # Pop namespace off |
| 228 | if (len(CursorName) != 0): |
| 229 | Arch.NamespaceScope.pop() |
| 230 | SetNamespace(Arch) |
| 231 | |
| 232 | return Arch |
| 233 | |
| 234 | def HandleUnionDeclCursor(Arch, Cursor, NameOverride = ""): |
| 235 | # Append namespace |
no test coverage detected