(Arch, Cursor, NameOverride = "")
| 177 | Arch.CurrentNamespace = Arch.CurrentNamespace + Namespace + "::" |
| 178 | |
| 179 | def HandleStructDeclCursor(Arch, Cursor, NameOverride = ""): |
| 180 | # Append namespace |
| 181 | CursorName = "" |
| 182 | StructType = Cursor.type |
| 183 | if (len(StructType.spelling) == 0): |
| 184 | CursorName = NameOverride |
| 185 | else: |
| 186 | CursorName = StructType.spelling |
| 187 | |
| 188 | if (len(CursorName) != 0): |
| 189 | Arch.NamespaceScope.append(CursorName) |
| 190 | SetNamespace(Arch) |
| 191 | |
| 192 | Struct = StructDefinition( |
| 193 | Name = CursorName, |
| 194 | Size = StructType.get_size()) |
| 195 | |
| 196 | # Handle children |
| 197 | Arch.Structs[Struct.Name] = HandleStructElements(Arch, Struct, Cursor) |
| 198 | |
| 199 | # Pop namespace off |
| 200 | if (len(CursorName) != 0): |
| 201 | Arch.NamespaceScope.pop() |
| 202 | SetNamespace(Arch) |
| 203 | |
| 204 | return Arch |
| 205 | |
| 206 | def HandleUnionDeclCursor(Arch, Cursor, NameOverride = ""): |
| 207 | # Append namespace |
no test coverage detected