#pragma once /// \file property_scope.h /// \author Folling #include #include /// \addtogroup object_scopes ObjectScopes /// @{ IKARUS_BEGIN_HEADER /// \brief The scope of a property struct IkarusPropertyScope; /// \brief Creates a property scope from a blueprint. /// \param blueprint The blueprint the property is scoped to. /// \return The created property scope. /// \remark Must be freed with #ikarus_free. IKA_API IkarusPropertyScope * ikarus_property_scope_create_blueprint(struct IkarusBlueprint * blueprint); /// \brief Creates a property scope from an entity. /// \param entity The entity the property is scoped to. /// \return The created property scope. /// \remark Must be freed with #ikarus_free. IKA_API IkarusPropertyScope * ikarus_property_scope_create_entity(struct IkarusEntity * entity); /// \brief Converts a property scope to an object scope. /// \param scope The scope to convert. /// \return The converted scope. /// \remark Must be freed with #ikarus_free. IKA_API struct IkarusObjectScope * ikarus_property_scope_to_object_scope(IkarusPropertyScope const * scope); /// \brief Visits a property scope, calling the appropriate function. /// \param scope The scope to to visit /// \param blueprint_visitor The function to call if the property is scoped to a blueprint. /// \param entity_visitor The function to call if the property is scoped to an entity. /// \param data The data passed to the visitor functions. IKA_API void ikarus_property_scope_visit( IkarusPropertyScope * scope, void (*blueprint_visitor)(struct IkarusBlueprint *, void *), void (*entity_visitor)(struct IkarusEntity *, void *), void * data ); IKARUS_END_HEADER // @}