SweetMacabreDream/Source/SURREALISM/Public/JournalPage.h

87 lines
2.2 KiB
C++

/*!
* @author SIMAILA Djalim
*/
#pragma once
#include "CoreMinimal.h"
#include "JournalPage.generated.h"
/**
* @brief This struct represents a journal entry.
*/
USTRUCT(BlueprintType)
struct FJournalEntry
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Journal")
FString entry_name;
FString entry_description;
};
/**
* @brief This class represents a journal page.
*/
UCLASS()
class SURREALISM_API UJournalPage : public UObject
{
GENERATED_BODY()
public:
UJournalPage();
/**
* @brief Array containing all the entries of the journal page.
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Journal")
TArray<FJournalEntry> page_entries;
/**
* @brief The maximum number of entries that the journal page can contain.
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Journal")
int32 max_page_entries;
/**
* @brief This function adds an entry to the journal page.
* @param entry_name The name of the entry to add.
* @param entry_description The description of the entry to add.
*/
void add_entry(FString entry_name, FString entry_description);
/**
* @brief This function removes an entry from the journal page.
* @param entry_name The name of the entry to remove.
*/
void remove_entry(FString entry_name);
/**
* @brief This function returns the name of all the entries of the journal page.
* @return An array containing the names of all the entries of the journal page.
*/
TArray<FString> get_all_entries_names();
/**
* @brief This function returns the description of all the entries of the journal page.
* @return An array containing the descriptions of all the entries of the journal page.
*/
TArray<FString> get_all_entries_descriptions();
/**
* @brief This function returns the number of entries of the journal page.
* @return The number of entries of the journal page.
*/
int32 get_number_of_entries();
/**
* @brief This function returns the description of an entry of the journal page selected by its name.
* @param entry_name The name of the entry to get.
* @return The description of the entry.
*/
FString get_entry_description(FString entry_name);
};