| 147 | |
| 148 | @dataclass |
| 149 | class Param: |
| 150 | """<command/param>""" |
| 151 | name: str # ex) pCreateInfo, pAllocator, pBuffer |
| 152 | alias: (str | None) |
| 153 | |
| 154 | # the "base type" - will not preserve the 'const' or pointer info |
| 155 | # ex) void, uint32_t, VkFormat, VkBuffer, etc |
| 156 | type: str |
| 157 | # the "full type" - will be cDeclaration without the type name |
| 158 | # ex) const void*, uint32_t, const VkFormat, VkBuffer*, etc |
| 159 | # For arrays, this will only display the type, fixedSizeArray can be used to get the length |
| 160 | fullType: str |
| 161 | |
| 162 | noAutoValidity: bool |
| 163 | |
| 164 | const: bool # type contains 'const' |
| 165 | length: (str | None) # the known length of pointer, will never be 'null-terminated' |
| 166 | nullTerminated: bool # If a UTF-8 string, it will be null-terminated |
| 167 | pointer: bool # type contains a pointer (include 'PFN' function pointers) |
| 168 | # Used to list how large an array of the type is |
| 169 | # ex) lineWidthRange is ['2'] |
| 170 | # ex) memoryTypes is ['VK_MAX_MEMORY_TYPES'] |
| 171 | # ex) VkTransformMatrixKHR:matrix is ['3', '4'] |
| 172 | fixedSizeArray: list[str] |
| 173 | |
| 174 | optional: bool |
| 175 | # Note: "optionalPointer" is a misleading name, this should have probably been "optionalPointedValue" |
| 176 | optionalPointer: bool # if type contains a pointer, is the pointer value optional |
| 177 | |
| 178 | externSync: ExternSync |
| 179 | externSyncPointer: (str | None) # if type contains a pointer (externSync is SUBTYPE*), |
| 180 | # only a specific member is externally synchronized. |
| 181 | |
| 182 | # C string of member, example: |
| 183 | # - const void* pNext |
| 184 | # - VkFormat format |
| 185 | # - VkStructureType sType |
| 186 | cDeclaration: str |
| 187 | |
| 188 | def __lt__(self, other): |
| 189 | return self.name < other.name |
| 190 | |
| 191 | class CommandScope(Enum): |
| 192 | NONE = auto() |