libikarus/include/ikarus/folders/folder.h
folling 52580a4382
finalise interface & documentation
Signed-off-by: Folling <mail@folling.io>
2025-04-15 12:10:38 +02:00

38 lines
1.3 KiB
C

#pragma once
/// \file folder.h
/// \author Folling <folling@ikarus.world>
#include <ikarus/folders/blueprint_folder.h>
#include <ikarus/folders/entity_folder.h>
#include <ikarus/folders/folder_type.h>
#include <ikarus/folders/property_folder.h>
#include <ikarus/macros.h>
IKARUS_BEGIN_HEADER
/// \defgroup folder Folders
/// \brief Folders are used to group objects together.
/// @{
/// \brief A generic folder. Similar to how Objects wrap all types of objects, Folders wrap all types of folders.
struct IkarusFolder;
/// \brief Special value for inserting objects at the end of a folder.
enum FolderPosition { FolderPosition_EndOfFolder = -1 };
/// \brief Visits a folder. Calling the appropriate function for the folder's type.
/// \param folder The folder to visit.
/// \param blueprint_visitor The function to call if the folder is a blueprint folder.
/// \param property_visitor The function to call if the folder is a property folder.
/// \param entity_visitor The function to call if the folder is an entity folder.
/// \param data The data passed to the visitor functions.
IKA_API void ikarus_folder_visit(
IkarusFolder * folder,
void (*blueprint_visitor)(IkarusBlueprintFolder *, void *),
void (*property_visitor)(IkarusPropertyFolder *, void *),
void (*entity_visitor)(IkarusEntityFolder *, void *),
void * data
);
IKARUS_END_HEADER