StructDeclaration

All struct declarations are an instance of this.

Constructors

this
this(Loc loc, Identifier id, bool inObject)
Undocumented in source.

Members

Functions

accept
void accept(Visitor v)
Undocumented in source. Be warned that the author may not have intended to support it.
finalizeSize
void finalizeSize()
Undocumented in source. Be warned that the author may not have intended to support it.
fit
bool fit(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).

isStructDeclaration
inout(StructDeclaration) isStructDeclaration()
Undocumented in source. Be warned that the author may not have intended to support it.
kind
const(char)* kind()
Undocumented in source. Be warned that the author may not have intended to support it.
search
Dsymbol search(Loc loc, Identifier ident, int flags)
Undocumented in source. Be warned that the author may not have intended to support it.
semanticTypeInfoMembers
void semanticTypeInfoMembers()
Undocumented in source. Be warned that the author may not have intended to support it.
syntaxCopy
Dsymbol syntaxCopy(Dsymbol s)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

create
StructDeclaration create(Loc loc, Identifier id, bool inObject)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

xerrcmp
FuncDeclaration xerrcmp;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
xerreq
FuncDeclaration xerreq;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.

Variables

alignment
structalign_t alignment;
Undocumented in source.
arg1type
Type arg1type;
Undocumented in source.
arg2type
Type arg2type;
Undocumented in source.
hasBlitAssign
bool hasBlitAssign;
Undocumented in source.
hasCopyCtor
bool hasCopyCtor;
Undocumented in source.
hasIdentityAssign
bool hasIdentityAssign;
Undocumented in source.
hasIdentityEquals
bool hasIdentityEquals;
Undocumented in source.
hasNoFields
bool hasNoFields;
Undocumented in source.
ispod
StructPOD ispod;
Undocumented in source.
postblit
FuncDeclaration postblit;
Undocumented in source.
postblits
FuncDeclarations postblits;
Undocumented in source.
requestTypeInfo
bool requestTypeInfo;
Undocumented in source.
xcmp
FuncDeclaration xcmp;
Undocumented in source.
xeq
FuncDeclaration xeq;
Undocumented in source.
xhash
FuncDeclaration xhash;
Undocumented in source.
zeroInit
bool zeroInit;
Undocumented in source.

Inherited Members

From AggregateDeclaration

type
Type type;
Undocumented in source.
storage_class
StorageClass storage_class;
Undocumented in source.
protection
Prot protection;
Undocumented in source.
structsize
uint structsize;
Undocumented in source.
alignsize
uint alignsize;
Undocumented in source.
fields
VarDeclarations fields;
Undocumented in source.
sizeok
Sizeok sizeok;
Undocumented in source.
deferred
Dsymbol deferred;
Undocumented in source.
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 ?

enclosing
Dsymbol enclosing;
Undocumented in source.
vthis
VarDeclaration vthis;
Undocumented in source.
vthis2
VarDeclaration vthis2;
Undocumented in source.
invs
FuncDeclarations invs;
Undocumented in source.
inv
FuncDeclaration inv;
Undocumented in source.
aggNew
NewDeclaration aggNew;
Undocumented in source.
ctor
Dsymbol ctor;
Undocumented in source.
defaultCtor
CtorDeclaration defaultCtor;
Undocumented in source.
aliasthis
AliasThis aliasthis;
Undocumented in source.
noDefaultCtor
bool noDefaultCtor;
Undocumented in source.
dtors
DtorDeclarations dtors;
Undocumented in source.
dtor
DtorDeclaration dtor;
Undocumented in source.
primaryDtor
DtorDeclaration primaryDtor;
Undocumented in source.
tidtor
DtorDeclaration tidtor;
Undocumented in source.
fieldDtor
FuncDeclaration fieldDtor;
Undocumented in source.
getRTInfo
Expression getRTInfo;
Undocumented in source.
newScope
Scope* newScope(Scope* sc)

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

setScope
void setScope(Scope* sc)
Undocumented in source. Be warned that the author may not have intended to support it.
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.

finalizeSize
void finalizeSize()
Undocumented in source.
size
d_uns64 size(Loc loc)
Undocumented in source. Be warned that the author may not have intended to support it.
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

getType
Type getType()
Undocumented in source. Be warned that the author may not have intended to support it.
isDeprecated
bool isDeprecated()
Undocumented in source. Be warned that the author may not have intended to support it.
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)

makeNested
void makeNested()
Undocumented in source. Be warned that the author may not have intended to support it.
makeNested2
void makeNested2()
Undocumented in source. Be warned that the author may not have intended to support it.
isExport
bool isExport()
Undocumented in source. Be warned that the author may not have intended to support it.
searchCtor
Dsymbol searchCtor()

Look for constructor declaration.

prot
Prot prot()
Undocumented in source. Be warned that the author may not have intended to support it.
handleType
Type handleType()
Undocumented in source. Be warned that the author may not have intended to support it.
stag
Symbol* stag;
Undocumented in source.
sinit
Symbol* sinit;
Undocumented in source.
isAggregateDeclaration
inout(AggregateDeclaration) isAggregateDeclaration()
Undocumented in source. Be warned that the author may not have intended to support it.
accept
void accept(Visitor v)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta