Skip to content

memberpointers

def MemberPointers.accessor (v : String) : String

The member function a class is given for a pointer to its data member v.

def MemberPointers.membersOf (items : List Item) (o : String) : List Member

The members of the class named o among the items, if it is one.

def MemberPointers.fieldType (items : List Item) (o : String) (v : String) : Option TypeSyntax

The type of a data member v of the class o, if o has one.

def MemberPointers.plainMethod (items : List Item) (o : String) (f : String) : Bool

Whether the class o has exactly one member function named f, and it is not virtual.

def MemberPointers.type (t : TypeSyntax) : TypeSyntax

A pointer-to-member type as a pointer to a function taking the object’s address first.

def MemberPointers.object (n : NodeId) (o : Expr) (arrow : Bool) : Expr

The object’s address a pointer to member is applied to: &o for o.*p, q itself for q->*p.

def MemberPointers.called (items : List Item) (e : Expr) : Expr

&S::m as the function it points to (a data member’s accessor); a call through o.*p as a call of p.

def MemberPointers.read (e : Expr) : Expr

o.*f that is not called: the data member, through its accessor.

def MemberPointers.taken (items : List Item) : List (String * String)

The data members whose address the items take (&S::v), each with its class.

def MemberPointers.distinct (ps : List (String * String)) : List (String * String)

The pairs without repeats, in order.

def MemberPointers.withAccessors (items : List Item) (taken : List (String * String)) (it : Item) : Item

A class given the accessors of its data members whose address is taken.

def MemberPointers.prepare (p : Program) : Program

A program with its pointers to members lowered (see the module’s description).

def MemberPointers.expression (e : Expr) : Option (CheckResult Cpp.constructs (Lifted Cpp.constructs))

What is left of a pointer to member after MemberPointers.prepare: one it does not lower, not known.