Operating System Simulator Plugin  3.5.1
Unreal Engine plugin that simulates an Operating System Environment
Loading...
Searching...
No Matches
FOperatingSystemUser Struct Reference

Represents a user in the operating system simulator. More...

#include "OperatingSystemUser.h"

Public Member Functions

FORCEINLINE bool IsValid () const
 The user is considered valid if the username is not empty or consists of only whitespace characters.
 
FORCEINLINE bool IsRegisteredValid () const
 The user is considered valid if their username is not empty and their email and password properties are not empty.
 
FORCEINLINE bool IsCompleteProfile () const
 Checks if the user has a complete profile.
 
FORCEINLINE FOperatingSystemUniqueId GetUserUniqueId () const
 Generates a unique identifier for the user based on their username and email. The email is formatted by replacing "@" with "_" before combining it with the username.
 
FORCEINLINE void Reset ()
 Resets the user's information.
 
FORCEINLINE bool UpdateColorIfInvalid ()
 Updates the UserColor if it is invalid.
 
void UpdateDetails (const FOperatingSystemUser &NewDetails)
 Updates the details of an operating system user.
 
FORCEINLINE bool CanReceiveEmails () const
 Checks if the user can receive emails.
 
FORCEINLINE FOperatingSystemUseroperator= (const FOperatingSystemUser &Other)
 
FORCEINLINE bool operator== (const FOperatingSystemUser &Other) const
 
FORCEINLINE bool operator!= (const FOperatingSystemUser &Other) const
 
 FOperatingSystemUser ()
 
 FOperatingSystemUser (const FText &Username)
 
 FOperatingSystemUser (const FText &Username, const UObject *Icon)
 
 FOperatingSystemUser (const FText &Username, const FText &Password)
 
 FOperatingSystemUser (const FText &Username, const FText &Password, const UObject *Icon)
 
 FOperatingSystemUser (const FText &Username, const FText &Password, const FText &Email, const FText &FirstName, const FText &LastName)
 
 FOperatingSystemUser (const FText &Username, const FText &Password, const FText &Email, const FText &FirstName, const FText &LastName, const bool bCanReceiveEmails)
 
 FOperatingSystemUser (const FString &Username)
 
 FOperatingSystemUser (const FString &Username, const UObject *Icon)
 
 FOperatingSystemUser (const FString &Username, const FString &Password)
 
 FOperatingSystemUser (const FString &Username, const FString &Password, const UObject *Icon)
 
 FOperatingSystemUser (const FString &Username, const FString &Password, const FString &Email, const FString &FirstName, const FString &LastName)
 
 FOperatingSystemUser (const FString &Username, const FString &Password, const FString &Email, const FString &FirstName, const FString &LastName, const bool bCanReceiveEmails)
 

Public Attributes

FText Username
 
FText Password
 
FText Email
 
FText FirstName
 
FText LastName
 
TSoftObjectPtr< UObject > Icon
 
TSet< FName > OwnedProgramIdentifiers
 
FLinearColor UserColor
 

Protected Attributes

bool bCanReceiveEmails
 

Friends

uint32 GetTypeHash (const FOperatingSystemUser &Other)
 Computes the hash value for the specified FOperatingSystemUser object.
 

Detailed Description

Represents a user in the operating system simulator.

This struct stores information about a user, such as their username, password, email, first name, last name, and icon.

The user can be registered and have a complete profile, which are determined by the presence of the required information. The user can also receive emails if the flag is set to true.

Constructor & Destructor Documentation

◆ FOperatingSystemUser() [1/13]

FOperatingSystemUser::FOperatingSystemUser ( )
inline

◆ FOperatingSystemUser() [2/13]

FOperatingSystemUser::FOperatingSystemUser ( const FText & Username)
inlineexplicit

◆ FOperatingSystemUser() [3/13]

FOperatingSystemUser::FOperatingSystemUser ( const FText & Username,
const UObject * Icon )
inline

◆ FOperatingSystemUser() [4/13]

FOperatingSystemUser::FOperatingSystemUser ( const FText & Username,
const FText & Password )
inline

◆ FOperatingSystemUser() [5/13]

FOperatingSystemUser::FOperatingSystemUser ( const FText & Username,
const FText & Password,
const UObject * Icon )
inline

◆ FOperatingSystemUser() [6/13]

FOperatingSystemUser::FOperatingSystemUser ( const FText & Username,
const FText & Password,
const FText & Email,
const FText & FirstName,
const FText & LastName )
inline

◆ FOperatingSystemUser() [7/13]

FOperatingSystemUser::FOperatingSystemUser ( const FText & Username,
const FText & Password,
const FText & Email,
const FText & FirstName,
const FText & LastName,
const bool bCanReceiveEmails )
inline

◆ FOperatingSystemUser() [8/13]

FOperatingSystemUser::FOperatingSystemUser ( const FString & Username)
inlineexplicit

◆ FOperatingSystemUser() [9/13]

FOperatingSystemUser::FOperatingSystemUser ( const FString & Username,
const UObject * Icon )
inline

◆ FOperatingSystemUser() [10/13]

FOperatingSystemUser::FOperatingSystemUser ( const FString & Username,
const FString & Password )
inline

◆ FOperatingSystemUser() [11/13]

FOperatingSystemUser::FOperatingSystemUser ( const FString & Username,
const FString & Password,
const UObject * Icon )
inline

◆ FOperatingSystemUser() [12/13]

FOperatingSystemUser::FOperatingSystemUser ( const FString & Username,
const FString & Password,
const FString & Email,
const FString & FirstName,
const FString & LastName )
inline

◆ FOperatingSystemUser() [13/13]

FOperatingSystemUser::FOperatingSystemUser ( const FString & Username,
const FString & Password,
const FString & Email,
const FString & FirstName,
const FString & LastName,
const bool bCanReceiveEmails )
inline

Member Function Documentation

◆ CanReceiveEmails()

FORCEINLINE bool FOperatingSystemUser::CanReceiveEmails ( ) const
inline

Checks if the user can receive emails.

This method returns a boolean value indicating whether the user can receive emails or not. If the value is true, it means the user can receive emails. If the value is false, it means the user cannot receive emails.

Returns
True if the user can receive emails, false otherwise.

◆ GetUserUniqueId()

FORCEINLINE FOperatingSystemUniqueId FOperatingSystemUser::GetUserUniqueId ( ) const
inline

Generates a unique identifier for the user based on their username and email. The email is formatted by replacing "@" with "_" before combining it with the username.

Returns
The unique identifier for the user.
See also
FOperatingSystemUniqueId
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsCompleteProfile()

FORCEINLINE bool FOperatingSystemUser::IsCompleteProfile ( ) const
inline

Checks if the user has a complete profile.

Returns true if the user is registered, and if the first name and last name are not empty or whitespace. Otherwise, returns false.

Returns
True if the user has a complete profile, false otherwise.
Here is the caller graph for this function:

◆ IsRegisteredValid()

FORCEINLINE bool FOperatingSystemUser::IsRegisteredValid ( ) const
inline

The user is considered valid if their username is not empty and their email and password properties are not empty.

Returns
True if the registered user is valid, false otherwise.
Here is the caller graph for this function:

◆ IsValid()

FORCEINLINE bool FOperatingSystemUser::IsValid ( ) const
inline

The user is considered valid if the username is not empty or consists of only whitespace characters.

Returns
True if the user is valid, false otherwise.
Here is the caller graph for this function:

◆ operator!=()

FORCEINLINE bool FOperatingSystemUser::operator!= ( const FOperatingSystemUser & Other) const
inline

◆ operator=()

FORCEINLINE FOperatingSystemUser & FOperatingSystemUser::operator= ( const FOperatingSystemUser & Other)
inline

◆ operator==()

FORCEINLINE bool FOperatingSystemUser::operator== ( const FOperatingSystemUser & Other) const
inline

◆ Reset()

FORCEINLINE void FOperatingSystemUser::Reset ( )
inline

Resets the user's information.

This method sets all of the user's variables to their default values.

The variables that are reset include the username, password, email, first name, last name, and icon. The icon is reset using the Reset() method.

In addition, the list of owned program identifiers is also reset.

Here is the caller graph for this function:

◆ UpdateColorIfInvalid()

FORCEINLINE bool FOperatingSystemUser::UpdateColorIfInvalid ( )
inline

Updates the UserColor if it is invalid.

This method checks if the UserColor is invalid, i.e., equal to FLinearColor::Transparent, and if the user is valid. If both conditions are met, it generates a random color using FLinearColor::MakeRandomColor() and sets the alpha value to 1.0. It then returns true to indicate that the color was updated. If the conditions are not met, it returns false.

Returns
True if the UserColor was updated, false otherwise.
Here is the caller graph for this function:

◆ UpdateDetails()

void FOperatingSystemUser::UpdateDetails ( const FOperatingSystemUser & NewDetails)
inline

Updates the details of an operating system user.

This method updates the specified user's details by replacing the existing values with the non-empty values provided in the given NewDetails object. The user's email, password, username, first name, and last name will be updated if provided. The user's icon will also be updated if a non-null icon is provided. The user's owned program identifiers will be updated if the list is not empty.

Parameters
NewDetailsThe FOperatingSystemUser object containing the updated details.
  • NewDetails.Email: The new email address for the user (optional).
  • NewDetails.Password: The new password for the user (optional).
  • NewDetails.Username: The new username for the user (optional).
  • NewDetails.FirstName: The new first name for the user (optional).
  • NewDetails.LastName: The new last name for the user (optional).
  • NewDetails.Icon: The new icon for the user (optional).
  • NewDetails.OwnedProgramIdentifiers: The new list of owned program identifiers for the user (optional).
Note
The provided NewDetails object may have empty or null values for some properties. Only non-empty values will be used to update the user's details.
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ GetTypeHash

uint32 GetTypeHash ( const FOperatingSystemUser & Other)
friend

Computes the hash value for the specified FOperatingSystemUser object.

This method computes the hash value for the specified FOperatingSystemUser object by combining the hash values of its individual member variables. The hash value is computed by performing a bitwise XOR operation on the hash values of the username, password, email, first name, and last name.

Parameters
OtherThe FOperatingSystemUser object for which to compute the hash value.
Returns
The computed hash value for the specified FOperatingSystemUser object.

Member Data Documentation

◆ bCanReceiveEmails

bool FOperatingSystemUser::bCanReceiveEmails
protected

Determines whether the operating system user is able to receive emails. If the value is true, the user can receive emails. If the value is false, the user cannot receive emails.

Usage:

  • This variable can be accessed and modified using the bCanReceiveEmails property.
  • The value can be set to true or false to enable or disable email reception for the user.
  • The value can be read to determine if the user can receive emails.
Note
The default value for this variable is true.

◆ Email

FText FOperatingSystemUser::Email

Stores the email of the operating system user. The email is used for communication purposes, such as sending and receiving emails.

Usage:

  • The email can be accessed and modified using this variable.
  • The email is publicly accessible and can be read or written to.

◆ FirstName

FText FOperatingSystemUser::FirstName

Stores the first name of the operating system user. The first name is typically a string of characters used to identify a person.

Usage:

  • The first name can be accessed and modified using this variable.
  • The first name is publicly accessible and can be read or written to.
  • This variable is used in conjunction with other variables to form a complete user profile.

◆ Icon

TSoftObjectPtr<UObject> FOperatingSystemUser::Icon

Represents an icon associated with the user for visual representation. The icon is a SoftObjectPtr that can refer to either a Texture or a MaterialInterface.

Usage:

  • The icon can be accessed and modified using this variable.
  • The icon is publicly accessible and can be read or written to.

◆ LastName

FText FOperatingSystemUser::LastName

Stores the last name of the operating system user. The last name is typically a string of characters used to identify a person.

Usage:

  • The last name can be accessed and modified using this variable.
  • The last name is publicly accessible and can be read or written to.
  • This variable is used in conjunction with other variables to form a complete user profile.

◆ OwnedProgramIdentifiers

TSet<FName> FOperatingSystemUser::OwnedProgramIdentifiers

Set of programs this user owns. These are the program identifiers and not program names.

◆ Password

FText FOperatingSystemUser::Password

Stores the password of the operating system user. The password is used for authentication purposes to verify the identity of the user.

Usage:

  • The password can be accessed and modified using this variable.
  • The password is publicly accessible and can be read or written to.

◆ UserColor

FLinearColor FOperatingSystemUser::UserColor

Stores the color associated with the user. It is expressed as an FLinearColor,.

Usage:

  • The UserColor can be accessed and modified using this variable.
  • The UserColor is publicly accessible and can be read or written to.
  • The UserColor can be updated using the UpdateColorIfInvalid() function.
See also
FOperatingSystemUser::UpdateColorIfInvalid()

◆ Username

FText FOperatingSystemUser::Username

Stores the username of the operating system user. The username is a string of characters that uniquely identifies the user and is used for authentication purposes.

Usage:

  • The username can be accessed and modified using this variable.
  • The username is publicly accessible and can be read or written to.

The documentation for this struct was generated from the following file: