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(State current, MethodKind method_kind, MemberVirtualType method_virtual_type, Flag!"hasMember" hasMember)
    @safe pure
    classifyClass
  2. State classifyClass(State current, CppClass.CppFunc p, Flag!"hasMember" hasMember)

Parameters

current State

current state of the classification.

method_kind MethodKind

kind of method

method_virtual_type MemberVirtualType

kind of "virtuality" the function is

hasMember Flag!"hasMember"

a class with any members can at the most be virtual

Return Value

Type: State

new classification state.

Meta