View source code
Display the source code in dmd/aggregate.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Module dmd.aggregate

Defines a Dsymbol representing an aggregate, which is a struct, union or class.

Specification

Structs, Unions, Class.

Documentation

https://dlang.org/phobos/dmd_aggregate.html

Coverage

https://codecov.io/gh/dlang/dmd/src/master/src/dmd/aggregate.d

Functions

NameDescription
alignmember(alignment, memalignsize, offset) Do byte or word alignment as necessary. Align sizes of 0, as we may not know array sizes yet.
apply(symbol, fp, ctx) Iterate this dsymbol or members of this scoped dsymbol, then call fp with the found symbol and params.
placeField(nextoffset, memsize, memalignsize, alignment, aggsize, aggalignsize, isunion) Place a field (mem) into an aggregate (agg), which can be a struct, union or class
toChars(c) Give a nice string for a class kind for error messages

Classes

NameDescription
AggregateDeclaration Abstract aggregate as a common ancestor for Class- and StructDeclaration.

Structs

NameDescription
MangleOverride If an aggregate has a pargma(mangle, ...) this holds the information to mangle.

Enums

NameDescription
ClassKind The ClassKind enum is used in AggregateDeclaration AST nodes to specify the linkage type of the struct/class/interface or if it is an anonymous class. If the class is anonymous it is also considered to be a D class.

Authors

Walter Bright

License

Boost License 1.0