cmakepp_lang/class/attr

cmakepp_lang/class/attr.cpp_attr(type attr)

Registers a class’s attribute.

This function is used to declare a new attribute for a class.

Parameters:
  • type (class) – The name of the class getting the attribute.

  • attr (desc) – The name of the attribute

  • *args – The initial value of the attribute. If no *args are provided the attribute will be initialized to the empty string.

Variables:

CMAKEPP_LANG_DEBUG_MODE (bool) – Used to determine if CMakePP is being run in debug mode or not.

Error Checking

If CMakePP is run in debug mode (and only if) this function will assert that it is called with the correct number and types of arguments. If any of these assertions fail an error will be raised.