expose id getters

Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
Folling 2024-02-12 12:06:22 +01:00 committed by Folling
parent 43482aa2bc
commit e0d1d8bb6f
No known key found for this signature in database
7 changed files with 55 additions and 0 deletions

View file

@ -16,6 +16,14 @@
namespace ikarus::util {
template<typename O>
[[nodiscard]] IkarusId object_get_id(O const * object, IkarusErrorData * error_out) {
IKARUS_FAIL_IF_NULL(object, 0);
IKARUS_FAIL_IF_OBJECT_MISSING(object, 0);
return object->id;
}
template<typename O>
[[nodiscard]] IkarusProject * object_get_project(O const * object, IkarusErrorData * error_out) {
IKARUS_FAIL_IF_NULL(object, nullptr);