runtimetypes
cpp.RuntimeTypes.target
Section titled “cpp.RuntimeTypes.target”def RuntimeTypes.target (t : TypeSyntax) : Option StringThe class a dynamic_cast’s target type names, if it is a pointer or reference to one.
cpp.RuntimeTypes.targets
Section titled “cpp.RuntimeTypes.targets”def RuntimeTypes.targets (items : List Item) : List StringThe classes the items’ dynamic_casts name, each once (a program that casts to none costs nothing more).
cpp.RuntimeTypes.usesTypeid
Section titled “cpp.RuntimeTypes.usesTypeid”def RuntimeTypes.usesTypeid (items : List Item) : BoolWhether the items use typeid.
cpp.RuntimeTypes.asksDynamicType
Section titled “cpp.RuntimeTypes.asksDynamicType”def RuntimeTypes.asksDynamicType (items : List Item) : BoolWhether the items use typeid of an expression (whose dynamic type may be asked).
cpp.RuntimeTypes.castsReference
Section titled “cpp.RuntimeTypes.castsReference”def RuntimeTypes.castsReference (items : List Item) : BoolWhether the items dynamic_cast to a reference.
cpp.RuntimeTypes.casterName
Section titled “cpp.RuntimeTypes.casterName”def RuntimeTypes.casterName (s : String) (d : String) (byReference : Bool) : StringThe name of S’s cast to D (by pointer, or by reference).
cpp.RuntimeTypes.namerName
Section titled “cpp.RuntimeTypes.namerName”def RuntimeTypes.namerName (s : String) : StringThe name of S’s function naming the complete object’s class.
cpp.RuntimeTypes.uniqueBase
Section titled “cpp.RuntimeTypes.uniqueBase”def RuntimeTypes.uniqueBase (known : List ClassMembers) (x : String) (y : String) : BoolWhether a class has exactly one subobject of a class (or is it): paths reaching one virtual base’s subobject are one.
cpp.RuntimeTypes.dynamicField
Section titled “cpp.RuntimeTypes.dynamicField”def RuntimeTypes.dynamicField (all : List ClassMembers) (s : String) (n : NodeId) (root : List Nat) : ExprThe dynamic type’s field of this (of class s) for its own chain (its root at a path).
cpp.RuntimeTypes.onChain
Section titled “cpp.RuntimeTypes.onChain”def RuntimeTypes.onChain (all : List ClassMembers) (s : String) (root : List Nat) : List (Nat * (String * Nat))The contexts with a class S on their chain: each context’s number, its complete object’s class, and whether S is the complete object itself.
cpp.RuntimeTypes.complete
Section titled “cpp.RuntimeTypes.complete”def RuntimeTypes.complete (all : List ClassMembers) (n : NodeId) (x : String) (depth : Nat) (this : Expr) : ExprThe complete object (of class x) of the subobject this points to, depth levels below it: this itself at no
depth; up through a virtual base by the internal call that reaches it, else by a cast.
cpp.RuntimeTypes.caster
Section titled “cpp.RuntimeTypes.caster”def RuntimeTypes.caster (all : List ClassMembers) (s : String) (d : String) (root : List Nat) : ItemD *S::#cast:D(S *this): null for null, else the complete object as a D where it is one (or has one D), else
null.
cpp.RuntimeTypes.referenceCaster
Section titled “cpp.RuntimeTypes.referenceCaster”def RuntimeTypes.referenceCaster (s : String) (d : String) : ItemD &S::#castRef:D(S *this): the pointer’s cast, std::bad_cast thrown where it is null.
cpp.RuntimeTypes.className
Section titled “cpp.RuntimeTypes.className”def RuntimeTypes.className (x : String) : StringThe Itanium C++ ABI’s name of a class (a namespace’s as nested names).
cpp.RuntimeTypes.namer
Section titled “cpp.RuntimeTypes.namer”def RuntimeTypes.namer (all : List ClassMembers) (s : String) (root : List Nat) : Itemconst char *S::#typeName(S *this): the complete object’s class’s name; std::bad_typeid for null.
cpp.RuntimeTypes.related
Section titled “cpp.RuntimeTypes.related”def RuntimeTypes.related (all : List ClassMembers) (s : String) (d : String) : BoolWhether two classes have a class derived from both (or one is the other’s base): a cast between them can find an object.
cpp.RuntimeTypes.functionsUsed
Section titled “cpp.RuntimeTypes.functionsUsed”def RuntimeTypes.functionsUsed (items : List Item) : List ItemThe casts and namers, for a program that uses dynamic_cast or typeid.
cpp.RuntimeTypes.functions
Section titled “cpp.RuntimeTypes.functions”def RuntimeTypes.functions (items : List Item) : List ItemThe casts and namers of the polymorphic classes, for the targets the items name (and typeid’s when it is used).
cpp.RuntimeTypes.chosenName
Section titled “cpp.RuntimeTypes.chosenName”def RuntimeTypes.chosenName : StringThe call name() returns its string through: noting that the string is the implementation’s
([type.info]p9).
cpp.RuntimeTypes.typeClass
Section titled “cpp.RuntimeTypes.typeClass”def RuntimeTypes.typeClass : Itemstd::type_info’s class: the name kept in #nm; name() (the implementation’s string), == and != (by the
names).
cpp.RuntimeTypes.prepare
Section titled “cpp.RuntimeTypes.prepare”def RuntimeTypes.prepare (p : Program) : ProgramA program using typeid with std::type_info’s class first.
cpp.RuntimeTypes.classOf
Section titled “cpp.RuntimeTypes.classOf”def RuntimeTypes.classOf (g : Globals Cpp.constructs) (t : Ty Cpp.constructs) : Option ClassMembersThe class a checked expression’s type names, if it is one.
cpp.RuntimeTypes.information
Section titled “cpp.RuntimeTypes.information”def RuntimeTypes.information (checker : Checker Cpp.constructs) (g : Globals Cpp.constructs) (env : Env Cpp.constructs) (n : NodeId) (name : Expr) : CheckResult Cpp.constructs (Lifted Cpp.constructs)std::type_info for a name.
cpp.RuntimeTypes.identified
Section titled “cpp.RuntimeTypes.identified”def RuntimeTypes.identified (checker : Checker Cpp.constructs) (g : Globals Cpp.constructs) (env : Env Cpp.constructs) (n : NodeId) (a : Expr) (l : Lifted Cpp.constructs) : CheckResult Cpp.constructs (Lifted Cpp.constructs)typeid(a) given a checked: of a polymorphic class’s lvalue, its complete object’s class (through the class’s
namer); else the type’s.
cpp.RuntimeTypes.expression
Section titled “cpp.RuntimeTypes.expression”def RuntimeTypes.expression (types : TypeExtension Cpp.constructs) (checker : Checker Cpp.constructs) (g : Globals Cpp.constructs) (env : Env Cpp.constructs) (e : Expr) : Option (CheckResult Cpp.constructs (Lifted Cpp.constructs))C++’s dynamic_cast and typeid.