主要内容

Cpp.SwitchStatement Class

Namespace: Cpp
Superclasses: AstNodeProperties

Represents the switch_statement nodes in the syntax tree of your code

Since R2026a

Description

The PQL class SwitchStatement represents the node switch_statement in the syntax tree of your code.

switch (value) {
    case 1:
        doSomething();
        break;
    default:
        break;
}

In this code, the switch_statement node corresponds to the overall switch construct in the C++ source.

Predicates

expand all

Version History

Introduced in R2026a