Updated raylib-cpp header files

This commit is contained in:
2025-09-08 22:06:21 -04:00
parent a0a658ca8a
commit fff611cc72
45 changed files with 2533 additions and 2382 deletions

View File

@@ -4,6 +4,21 @@
#ifndef RAYLIB_CPP_INCLUDE_RAYLIB_CPP_UTILS_HPP_
#define RAYLIB_CPP_INCLUDE_RAYLIB_CPP_UTILS_HPP_
#ifndef GETTER
/**
* A utility to build a get method on top of a property.
*
* @param type The type of the property.
* @param method The human-readable name for the method.
* @param name The machine-readable name of the property.
*/
#define GETTER(type, method, name) \
/** Retrieves the name value for the object. @return The name value of the object. */ \
type Get##method() const { \
return name; \
}
#endif
#ifndef GETTERSETTER
/**
* A utility to build get and set methods on top of a property.
@@ -12,11 +27,12 @@
* @param method The human-readable name for the method.
* @param name The machine-readable name of the property.
*/
#define GETTERSETTER(type, method, name) \
/** Retrieves the name value for the object. @return The name value of the object. */ \
inline type Get##method() const { return name; } \
#define GETTERSETTER(type, method, name) \
GETTER(type, method, name) \
/** Sets the name value for the object. @param value The value of which to set name to. */ \
inline void Set##method(type value) { name = value; }
void Set##method(type value) { \
name = value; \
}
#endif
#endif // RAYLIB_CPP_INCLUDE_RAYLIB_CPP_UTILS_HPP_
#endif // RAYLIB_CPP_INCLUDE_RAYLIB_CPP_UTILS_HPP_