StructDeclaration

All struct declarations are an instance of this.

extern (C++)
class StructDeclaration : AggregateDeclaration {
bool zeroInit;
bool hasIdentityAssign;
bool hasBlitAssign;
bool hasIdentityEquals;
bool hasNoFields;
FuncDeclarations postblits;
FuncDeclaration postblit;
bool hasCopyCtor;
FuncDeclaration xeq;
FuncDeclaration xcmp;
FuncDeclaration xhash;
extern (C++) __gshared
FuncDeclaration xerreq;
extern (C++) __gshared
FuncDeclaration xerrcmp;
structalign_t alignment;
StructPOD ispod;
Type arg1type;
Type arg2type;
bool requestTypeInfo;
}

Members

Functions

fit
bool fit(const ref Loc loc, Scope* sc, Expressions* elements, Type stype)

Fit elements[] to the corresponding types of the struct's fields.

isPOD
bool isPOD()

Determine if struct is POD (Plain Old Data).

Inherited Members

From AggregateDeclaration

classKind
ClassKind classKind;

specifies whether this is a D, C++, Objective-C or anonymous struct/class/interface

cppmangle
CPPMANGLE cppmangle;

Specify whether to mangle the aggregate as a class or a struct This information is used by the MSVC mangler Only valid for class and struct. TODO: Merge with ClassKind ?

newScope
Scope* newScope(Scope* sc)

Create a new scope from sc. semantic, semantic2 and semantic3 will use this for aggregate members.

determineFields
bool determineFields()

Find all instance fields, then push them into fields.

nonHiddenFields
size_t nonHiddenFields()
determineSize
bool determineSize(Loc loc)

Collect all instance fields, then determine instance size.

checkOverlappedFields
bool checkOverlappedFields()

Calculate fieldi.overlapped and overlapUnsafe, and check that all of explicit field initializers have unique memory space on instance.

fill
bool fill(Loc loc, Expressions* elements, bool ctorinit)

Fill out remainder of elements[] with default initializers for fields[].

alignmember
void alignmember(structalign_t alignment, uint size, uint* poffset)

Do byte or word alignment as necessary. Align sizes of 0, as we may not know array sizes yet.

placeField
uint placeField(uint* nextoffset, uint memsize, uint memalignsize, structalign_t alignment, uint* paggsize, uint* paggalignsize, bool isunion)

Place a member (mem) into an aggregate (agg), which can be a struct, union or class

setDeprecated
void setDeprecated()

Flag this aggregate as deprecated

isNested
bool isNested()

Returns true if there's an extra member which is the 'this' pointer to the enclosing context (enclosing aggregate or function)

searchCtor
Dsymbol searchCtor()

Look for constructor declaration.

Meta