UOperatingSystemStore
#include <OperatingSystemSimulator/Public/Programs/OperatingSystemStore.h>class UOperatingSystemStoreDefined in OperatingSystemStore.h:14
Inherits:
UOperatingSystemBaseProgram
Inheritance diagram
Section titled “Inheritance diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemStore["UOperatingSystemStore"]
class UOperatingSystemBaseProgram["UOperatingSystemBaseProgram"]
UOperatingSystemBaseProgram <|-- UOperatingSystemStore
Collaboration diagram
Section titled “Collaboration diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemStore["UOperatingSystemStore"]
class UOperatingSystemBaseProgram["UOperatingSystemBaseProgram"]
UOperatingSystemStore *-- UOperatingSystemBaseProgram
class UOperatingSystemStoreProgramsCollection["UOperatingSystemStoreProgramsCollection"]
UOperatingSystemStore *-- UOperatingSystemStoreProgramsCollection
Class detail
Section titled “Class detail”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemStore {
+UOperatingSystemStore()
+GetSaveSlotName() const override FString()
+SubmitRating(const TSoftClassPtr< UOperatingSystemBasePr bool()
+GetAverageRating(const FOperatingSystemStoreProgramData &Sto float()
+OnValidate(FGenericError &OutError) const override void()
+OnStart(FGenericError &OutError) override void()
+StoreProgramsCollection : TSoftObjectPtr()< UOperatingSystemStoreP
+Internal_TryCreateSaveFile() const void()
+Internal_GetSaveFile(FOperatingSystemStoreApps &OutStoreApps) co bool()
+Internal_GetCurrentAverageRating(const TSet< FOperatingSystemStoreReviewUser float()
}
Caller impact — GetSaveSlotName
Section titled “Caller impact — GetSaveSlotName”Documented call sites inside the plugin (3):
flowchart LR UOperatingSystemStore__GetSaveSlotName["UOperatingSystemStore::GetSaveSlotName"] UOperatingSystemStore__Internal_GetSaveFile["UOperatingSystemStore::Internal_GetSaveFile"] UOperatingSystemStore__Internal_GetSaveFile --> UOperatingSystemStore__GetSaveSlotName UOperatingSystemStore__Internal_TryCreateSaveFile["UOperatingSystemStore::Internal_TryCreateSaveFile"] UOperatingSystemStore__Internal_TryCreateSaveFile --> UOperatingSystemStore__GetSaveSlotName UOperatingSystemStore__SubmitRating["UOperatingSystemStore::SubmitRating"] UOperatingSystemStore__SubmitRating --> UOperatingSystemStore__GetSaveSlotName
Caller impact — Internal_GetCurrentAverageRating
Section titled “Caller impact — Internal_GetCurrentAverageRating”Documented call sites inside the plugin (3):
flowchart LR UOperatingSystemStore__Internal_GetCurrentAverageRating["UOperatingSystemStore::Internal_GetCurrentAverageRating"] UOperatingSystemStore__GetAverageRating["UOperatingSystemStore::GetAverageRating"] UOperatingSystemStore__GetAverageRating --> UOperatingSystemStore__Internal_GetCurrentAverageRating UOperatingSystemStore__Internal_TryCreateSaveFile["UOperatingSystemStore::Internal_TryCreateSaveFile"] UOperatingSystemStore__Internal_TryCreateSaveFile --> UOperatingSystemStore__Internal_GetCurrentAverageRating UOperatingSystemStore__SubmitRating["UOperatingSystemStore::SubmitRating"] UOperatingSystemStore__SubmitRating --> UOperatingSystemStore__Internal_GetCurrentAverageRating
Represents the operating system store programs collection.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
UOperatingSystemStore | ||
FString | GetSaveSlotName virtual const override | Get the save slot name. |
bool | SubmitRating | Submits a rating for a target program by a reviewing user. |
UOperatingSystemStore
Section titled “UOperatingSystemStore”UOperatingSystemStore()Defined in OperatingSystemStore.h:26
References
Section titled “References”bRequiresDataDataClassGetSettingsIconObjectIdentifierSettingsClassSpaceRequiredInMBStoreProgramsCollection
GetSaveSlotName
Section titled “GetSaveSlotName”virtual const override
virtual FString GetSaveSlotName() const overrideDefined in OperatingSystemStore.h:36 Get the save slot name.
This function retrieves the save slot name for the operating system store. The save slot name is retrieved from the Identifier member variable of the class.
Returns
Section titled “Returns”The save slot name as a FString.
Referenced by
Section titled “Referenced by”References
Section titled “References”Reimplements
Section titled “Reimplements”SubmitRating
Section titled “SubmitRating”bool SubmitRating(constTSoftClassPtr< UOperatingSystemBaseProgram > & TargetProgram, constFOperatingSystemStoreReviewUser & ReviewingUser)Defined in OperatingSystemStore.h:64 Submits a rating for a target program by a reviewing user.
This function adds the reviewing user’s rating to the target program’s reviews. If the target program or the reviewing user is not valid, an error notification is added to the operating system and the function returns false. The average rating for the target program is updated based on all the reviews, and the updated store apps data is written to the save file.
Parameters
Section titled “Parameters”-
TargetProgramThe target program to submit the rating for. -
ReviewingUserThe reviewing user providing the rating.
Returns
Section titled “Returns”True if the rating submission succeeds, false otherwise.
References
Section titled “References”AddNotificationApplicationErrorGetOperatingSystemGetSaveSlotNameGetSettingsInternal_GetCurrentAverageRatingInternal_GetSaveFileMAKE_ERRORReviewUsersWriteStructToJson
Public Static Methods
Section titled “Public Static Methods”| Return | Name | Description |
|---|---|---|
float | GetAverageRating static | Calculates the average rating from the given program data. |
GetAverageRating
Section titled “GetAverageRating”static
static float GetAverageRating(constFOperatingSystemStoreProgramData & StoreProgramData)Defined in OperatingSystemStore.h:48 Calculates the average rating from the given program data.
This function takes the review users data of a program from the operating system store, and returns the average rating of the program.
Parameters
Section titled “Parameters”StoreProgramDataThe program data containing the review users.
Returns
Section titled “Returns”The average rating of the program.
References
Section titled “References”Protected Methods
Section titled “Protected Methods”| Return | Name | Description |
|---|---|---|
void | OnValidate virtual const override | Validates the operating system store. |
void | OnStart virtual override | Executes when the operating system store starts. |
OnValidate
Section titled “OnValidate”virtual const override
virtual void OnValidate(FGenericError & OutError) const overrideDefined in OperatingSystemStore.h:78 Validates the operating system store.
This function checks if the store programs collection is null. If it is null, an error is assigned to the OutError parameter and the function returns. Otherwise, it loads the store programs collection and calls the Validate function on it, passing the OutError parameter.
Parameters
Section titled “Parameters”OutErrorThe generic error object to hold the error information in case of validation failure.
References
Section titled “References”GetSettingsMAKE_ERRORStoreProgramsCollection
Reimplements
Section titled “Reimplements”OnStart
Section titled “OnStart”virtual override
virtual void OnStart(FGenericError & OutError) overrideDefined in OperatingSystemStore.h:87 Executes when the operating system store starts.
This function is called when the operating system store starts. It internally tries to create a save file.
Parameters
Section titled “Parameters”OutErrorThe generic error object to hold the error information in case of failures.
References
Section titled “References”Reimplements
Section titled “Reimplements”Private Attributes
Section titled “Private Attributes”| Return | Name | Description |
|---|---|---|
TSoftObjectPtr< UOperatingSystemStoreProgramsCollection > | StoreProgramsCollection | Represents the operating system store programs collection. |
StoreProgramsCollection
Section titled “StoreProgramsCollection”TSoftObjectPtr< UOperatingSystemStoreProgramsCollection > StoreProgramsCollectionDefined in OperatingSystemStore.h:22 Represents the operating system store programs collection.
Referenced by
Section titled “Referenced by”Private Methods
Section titled “Private Methods”| Return | Name | Description |
|---|---|---|
void | Internal_TryCreateSaveFile const | |
bool | Internal_GetSaveFile const |
Internal_TryCreateSaveFile
Section titled “Internal_TryCreateSaveFile”const
void Internal_TryCreateSaveFile() constDefined in OperatingSystemStore.h:91
Referenced by
Section titled “Referenced by”References
Section titled “References”DoesFileExistsGetSaveSlotNameGetSettingsInternal_GetCurrentAverageRatingStoreProgramStoreProgramsCollectionWriteStructToJson
Internal_GetSaveFile
Section titled “Internal_GetSaveFile”const
bool Internal_GetSaveFile(FOperatingSystemStoreApps & OutStoreApps) constDefined in OperatingSystemStore.h:92
Referenced by
Section titled “Referenced by”References
Section titled “References”Private Static Methods
Section titled “Private Static Methods”| Return | Name | Description |
|---|---|---|
float | Internal_GetCurrentAverageRating static |
Internal_GetCurrentAverageRating
Section titled “Internal_GetCurrentAverageRating”static
static float Internal_GetCurrentAverageRating(constTSet< FOperatingSystemStoreReviewUser > & ReviewUsers)Defined in OperatingSystemStore.h:93