12.1. Class method macros

The CLASS_BOOST module provides macros for extending class functionality, including the [serialize_as_class] annotation for automatic serialization and common class patterns like abstract method enforcement.

All functions and symbols are in “class_boost” module, use require to get access to it.

require daslib/class_boost

12.1.1. Function annotations

class_boost.class_method

Turns a static method into a class method by adding a self argument of the class type as the first argument, and wrapping the function body in with (self) { ... }. Applied via [class_method] annotation.

class_boost.explicit_const_class_method

Same as [class_method] but marks the self parameter with explicitConst, allowing overloading of const and non-const class methods.