class Elaborated
Represents an elaborated type (e.g., struct, union, enum with an elaborated type specifier). Elaborated types may include type qualifiers and nested name specifiers.
Definitions
def named_type
Get the named type that this elaborated type refers to.
Signature
-
returns
Type The underlying named type.
Implementation
def named_type
Type.create Lib.get_named_type(@type), @translation_unit
end
def anonymous?
Check if this is an anonymous elaborated type.
Example anonymous union where u is an elaborated type:
typedef struct { union { int idata; } u; } SomeStruct;
Signature
-
returns
Boolean True if this elaborated type is anonymous.
Implementation
def anonymous?
self.declaration.anonymous?
end
def pointer?
Check if this elaborated type is a pointer in its canonical form.
Signature
-
returns
Boolean True if the canonical type is a pointer.
Implementation
def pointer?
self.canonical.is_a?(Pointer)
end