What can you do with Deep C/C++ Integration?

Deep C/C++ Integration allows you to use constructs declared in C/C++ header files seamlessly in your statecharts. For C, this includes:

  • Functions, including variadic parameters
  • Structs, unions and enums contained in a typedef
    • Function pointers contained in a struct can be called right from your statechart
  • Values introduced by the #define statement, e.g., #define ARRAYSIZE 20
  • Variables
  • Arrays, provided they are allocated in the header file
  • Pointers

The following C++ features are supported:

  • Classes, including their fields and functions
  • Namespaces
  • Template classes and functions
  • Functions with optional parameters

C/C++ features that are currently unsupported:

  • Structs, unions and enums that are not contained in a typedef
  • Accessing or modifying function pointer values in structs
  • Constructors and initializers
  • Memory allocation