cmakepp_lang/object/add_fxn
- cmakepp_lang/object/add_fxn._cpp_object_add_fxn(this name)
Register’s a member function with the object.
This function is used to add a member function to an object. The member function will override member functions in base classes with the same signature and overload member functions with the same name, but different signatures.
- Parameters:
this (obj) – The Object instance we are adding the function to.
name (desc) – The name of the function we are adding.
*args – The types of the arguments to the function.
- Returns:
name
will be set to the mangled name of the function which was added. Users should use the mangled name when implementing the function.- Return type:
desc
- Variables:
CMAKEPP_LANG_DEBUG_MODE (bool) – Used to determine if CMakePP is being run in debug mode or not.
Error Checking
If CMakePP is being run in debug mode this function will assert that it was called with the correct number and types of arguments. If this is not the case an error will be raised. These error checks are only performed if CMakePP is being run in debug mode.