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
a local clone.
dmd.dclass
Compiler implementation of the
D programming language.
Authors:
License:
Source dclass.d
Documentation https://dlang.org/phobos/dmd_dclass.html
- struct
BaseClass
; -
- bool
fillVtbl
(ClassDeclarationcd
, FuncDeclarations*vtbl
, intnewinstance
); - Fill in
vtbl
[] for base class based on member functions of classcd
.Input
vtbl
if !=NULL, fill it innewinstance
!=0 means all entries must be filled in by members ofcd
, not members of any base classes ofcd
.Returns:true
if any entries were filled in by members ofcd
(not exclusively by base classes)
- enum
ClassKind
: int; - The
ClassKind
enum is used in ClassDeclaration AST nodes to specify the linkage type of the class or if it is an anonymous class. If the class is anonymous it is also considered to be a D class.d
- the class is a
d
(efault) class cpp
- the class is a C++ interface
objc
- the class is an Objective-C class/interface
- class
ClassDeclaration
: dmd.aggregate.AggregateDeclaration; -
- bool
stack
; true
if this is a scope class- ClassKind
classKind
; - specifies whether this is a D, C++, Objective-C or anonymous class/interface
- Baseok
baseok
; - set the progress of base classes resolving
- final bool
isBaseOf2
(ClassDeclarationcd
); - Determine if 'this' is a base class of
cd
. This is used to detect circular inheritance only. - bool
isBaseOf
(ClassDeclarationcd
, int*poffset
); - Determine if 'this' is a base class of
cd
. - final const bool
isBaseInfoComplete
(); - Determine if 'this' has complete base class information. This is used to detect forward references in covariant overloads.
- final ClassDeclaration
searchBase
(Identifierident
); - Search base classes in depth-first, left-to-right order for a class or interface named '
ident
'. Stops at first found. Does not look for additional matches.Parameters:Identifier ident
identifier to search for Returns:ClassDeclaration if found,null
if not - final FuncDeclaration
findFunc
(Identifierident
, TypeFunctiontf
); - Find virtual function matching identifier and type. Used to build virtual function tables for interface implementations.Parameters:
Identifier ident
function's identifier TypeFunction tf
function's type Returns:function symbol if found,null
if notErrors prints error message if more than one match
- final const bool
isCOMclass
(); - final bool
isAbstract
(); - const int
vtblOffset
(); - Determine if slot 0 of the vtbl[] is reserved for something else. For class objects, yes, this is where the classinfo ptr goes. For COM interfaces, no. For non-COM interfaces, yes, this is where the Interface ptr goes.Returns:0 vtbl[0] is first virtual function pointer 1 vtbl[0] is classinfo/interfaceinfo pointer
- const const(char)*
kind
(); - final void
addLocalClass
(ClassDeclarations*aclasses
);
- class
InterfaceDeclaration
: dmd.dclass.ClassDeclaration; -
- bool
isBaseOf
(ClassDeclarationcd
, int*poffset
); - Determine if 'this' is a base class of
cd
. (Actually, if it is an interface supported bycd
)Output *
poffset
offset to start of class OFFSET_RUNTIME must determine offset at runtimeReturns:false
not a basetrue
is a base - const const(char)*
kind
(); - const int
vtblOffset
(); - Determine if slot 0 of the vtbl[] is reserved for something else. For class objects, yes, this is where the ClassInfo ptr goes. For COM interfaces, no. For non-COM interfaces, yes, this is where the Interface ptr goes.
Copyright © 1999-2018 by the D Language Foundation | Page generated by
Ddoc on Tue Mar 13 17:31:07 2018