cmakepp_lang/object/get_meta_attr

cmakepp_lang/object/get_meta_attr._cpp_object_get_meta_attr(this result attr)

Encapsulates the process of retrieving an object’s meta attributes.

Each Object instance has several attributes which are meant purely for use by CMakePP to make the Object work. These attributes are special and sequestered from the normal instance attributes and termed “meta-attributes”. This function is designed to encapsulate the process of retrieving a meta-attribute’s value. If an attribute exists this function will return its value, if the attribute does not exist than this function will return the empty string. At the moment there is no way to distinguish between a meta-attribute set to the empty string and a non-existing meta-attribute.

Parameters:
  • this (obj) – The object instance whose meta-attribute is being retrieved.

  • result (desc) – Name for the variable which will hold the value.

  • attr (desc) – The name of the meta-attribute we are retrieving.

Returns:

result will be set to the value of the attribute (if the attribute exists) and the empty string otherwise.

Return type:

str

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 CMakePP is run in debug mode) this function will assert that it has been called with exactly three arguments and that those arguments have the correct types. If any assertion fails an error will be raised.