Skip to content

UOperatingSystemStore

#include <OperatingSystemSimulator/Public/Programs/OperatingSystemStore.h>
class UOperatingSystemStore

Defined in OperatingSystemStore.h:14

Inherits: UOperatingSystemBaseProgram

---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemStore["UOperatingSystemStore"]
  class UOperatingSystemBaseProgram["UOperatingSystemBaseProgram"]
  UOperatingSystemBaseProgram <|-- UOperatingSystemStore
---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemStore["UOperatingSystemStore"]
  class UOperatingSystemBaseProgram["UOperatingSystemBaseProgram"]
  UOperatingSystemStore *-- UOperatingSystemBaseProgram
  class UOperatingSystemStoreProgramsCollection["UOperatingSystemStoreProgramsCollection"]
  UOperatingSystemStore *-- UOperatingSystemStoreProgramsCollection
---
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()
  }

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.

ReturnNameDescription
UOperatingSystemStore
FStringGetSaveSlotName virtual const overrideGet the save slot name.
boolSubmitRatingSubmits a rating for a target program by a reviewing user.

UOperatingSystemStore()

Defined in OperatingSystemStore.h:26


virtual const override

virtual FString GetSaveSlotName() const override

Defined 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.

The save slot name as a FString.


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.

  • TargetProgram The target program to submit the rating for.

  • ReviewingUser The reviewing user providing the rating.

True if the rating submission succeeds, false otherwise.

ReturnNameDescription
floatGetAverageRating staticCalculates the average rating from the given program data.

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.

  • StoreProgramData The program data containing the review users.

The average rating of the program.

ReturnNameDescription
voidOnValidate virtual const overrideValidates the operating system store.
voidOnStart virtual overrideExecutes when the operating system store starts.

virtual const override

virtual void OnValidate(FGenericError & OutError) const override

Defined 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.

  • OutError The generic error object to hold the error information in case of validation failure.

virtual override

virtual void OnStart(FGenericError & OutError) override

Defined 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.

  • OutError The generic error object to hold the error information in case of failures.
ReturnNameDescription
TSoftObjectPtr< UOperatingSystemStoreProgramsCollection >StoreProgramsCollectionRepresents the operating system store programs collection.

TSoftObjectPtr< UOperatingSystemStoreProgramsCollection > StoreProgramsCollection

Defined in OperatingSystemStore.h:22 Represents the operating system store programs collection.

ReturnNameDescription
voidInternal_TryCreateSaveFile const
boolInternal_GetSaveFile const

const

void Internal_TryCreateSaveFile() const

Defined in OperatingSystemStore.h:91


const

bool Internal_GetSaveFile(FOperatingSystemStoreApps & OutStoreApps) const

Defined in OperatingSystemStore.h:92

ReturnNameDescription
floatInternal_GetCurrentAverageRating static

static

static float Internal_GetCurrentAverageRating(constTSet< FOperatingSystemStoreReviewUser > & ReviewUsers)

Defined in OperatingSystemStore.h:93