#pragma once /// \file property_source.h /// \author Folling #include /// \addtogroup properties Properties /// @{ IKARUS_BEGIN_HEADER struct PropertySource; /// \brief Creates an blueprint property source. /// \param blueprint The blueprint to create the property source for. /// \pre \li Must not be null. /// \pre \li Must exist. /// \return The created property source or null if an error occurs. /// \remark Must be freed using #ikarus_free. IKA_API struct PropertySource * ikarus_property_source_create_blueprint(struct IkarusBlueprint * blueprint); /// \brief Creates an entity property source. /// \param entity The entity to create the property source for. /// \pre \li Must not be null. /// \pre \li Must exist. /// \return The created property source or null if an error occurs. /// \remark Must be freed using #ikarus_free. IKA_API struct PropertySource * ikarus_property_source_create_entity(struct IkarusEntity * entity); /// \brief Visits a property source, calling the appropriate callback. /// \param property_source The property source to visit. /// \pre \li Must not be null. /// \pre \li Must exist. /// \param blueprint_visitor The callback to call if the source is a blueprint, skipped if null. /// \param entity_visitor The callback to call if the source is an entity, skipped if null. /// \param user_data User data to pass to the callbacks. IKA_API void ikarus_property_source_visit( struct PropertySource * property_source, void (*blueprint_visitor)(struct IkarusBlueprint *, void *), void (*entity_visitor)(struct IkarusEntity *, void *), void * user_data ); IKARUS_END_HEADER /// @}