classifyClass

Classify a class from a current state.

Problem that this function solve: Clang have no property that classifies a class as virtual/abstract/pure.

Design: The classification is sequential according to an informal FSM. The classification only depend on the input data. No globals, no side effects.

  1. State classifyClass(in State current, in MethodKind method_kind, in MemberVirtualType method_virtual_type, Flag!"hasMember" hasMember)
    classifyClass
    @safe pure
    (
    ,,
    in MemberVirtualType method_virtual_type
    ,
    Flag!"hasMember" hasMember
    )
  2. State classifyClass(in State current, const CppClass.CppFunc p, Flag!"hasMember" hasMember)

Parameters

current
Type: State

current state of the classification.

method_kind

kind of method

method_virtual_type

kind of "virtuality" the function is

hasMember
Type: Flag!"hasMember"

a class with any members can at the most be virtual

Return Value

Type: State

new classification state.

Meta