Annotation Type Const


A shortcut annotation to Cast that simply adds const to the parameter type, function, or class.

  • For a parameter type, the first element is for a value like const char* and the second for a pointer like char const *.
  • For a function, the first, second, and third ones are used. The first two are applied to the return value/pointer. The third one determines whether the function is const or not. For backward compatibility, we keep the third element empty.
  • For a class, only the first one is used, and if it is true, it means all the functions are const. Can also be declared on a FunctionPointer in the case of const functions.

See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean[]
    If true, applies const to the value and to the pointer, respectively.
  • Element Details

    • value

      boolean[] value
      If true, applies const to the value and to the pointer, respectively.
      Default:
      {true, false}