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

Struct representing a bank account in the operating system. More...

#include "OperatingSystemBankTypes.h"

Collaboration diagram for FOperatingSystemBankAccount:
[legend]

Public Member Functions

FORCEINLINE const FOperatingSystemCreditCardFindCreditCard (const FName &CardName) const
 Find the credit card with the specified card name.
 
FORCEINLINE const FOperatingSystemCreditCardFindCreditCard (const int64 &CardNumber) const
 Find the credit card with the specified card number.
 
FORCEINLINE bool IsValid () const
 
 FOperatingSystemBankAccount ()
 

Static Public Member Functions

static FORCEINLINE FOperatingSystemBankAccount CreateNewBankAccount (const FOperatingSystemBankSetting &InBankSetting, const FOperatingSystemCreditCardSetting &InCardType)
 Creates a new bank account with the given bank settings and credit card type.
 

Public Attributes

int64 AccountNumber
 The unique account number associated with a bank account. It is of type int64. This variable is used in several classes and functions in the bank system, including:
 
FDateTime CreationDate
 The creation date of the bank account. This variable represents the date and time when the bank account was created. It is of type FDateTime.
 
float RemainingFunds
 The remaining funds available in the bank account. This variable represents the amount of funds that are still available in the bank account. It is of type float. The initial value is 100.0.
 
TSet< FOperatingSystemCreditCardCreditCards
 A set of credit cards associated with a bank account. This set represents the collection of credit cards that are associated with a bank account. It is of type TSet<FOperatingSystemCreditCard>.
 
TArray< FOperatingSystemUserFundTransactionTransactionHistory
 An array representing the transaction history of a bank account. This variable represents the transaction history of a bank account. It stores the details of each fund transaction made by the user, such as the description, remarks, amount, transaction ID, transaction type, date, and closing balance. It is of type TArray<FOperatingSystemUserFundTransaction>.
 
FOperatingSystemBankSetting BankSetting
 Represents the banking settings for a specific bank account in the operating system. This variable is used to store the banking settings for a specific bank account in the operating system. It includes information such as the account number, creation date, available funds, credit cards associated, and transaction history. The BankSetting variable is of type FOperatingSystemBankSetting.
 

Detailed Description

Struct representing a bank account in the operating system.

Constructor & Destructor Documentation

◆ FOperatingSystemBankAccount()

FOperatingSystemBankAccount::FOperatingSystemBankAccount ( )
inline

Default constructor

Member Function Documentation

◆ CreateNewBankAccount()

static FORCEINLINE FOperatingSystemBankAccount FOperatingSystemBankAccount::CreateNewBankAccount ( const FOperatingSystemBankSetting & InBankSetting,
const FOperatingSystemCreditCardSetting & InCardType )
inlinestatic

Creates a new bank account with the given bank settings and credit card type.

This method creates a new bank account with the specified bank settings and credit card type. It checks if the provided bank settings and credit card type are valid before creating the new account. If either the bank settings or the credit card type is invalid, an empty bank account is returned.

Parameters
InBankSettingThe bank settings for the new account. Must be a valid FOperatingSystemBankSetting object.
InCardTypeThe credit card type for the new account. Must be a valid FOperatingSystemCreditCardSetting object.
Returns
The newly created bank account with the specified bank settings and credit card type. If either the bank settings or the credit card type is invalid, an empty bank account is returned.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindCreditCard() [1/2]

FORCEINLINE const FOperatingSystemCreditCard * FOperatingSystemBankAccount::FindCreditCard ( const FName & CardName) const
inline

Find the credit card with the specified card name.

This method searches for a credit card with the given card name in the CreditCards collection. If the card name is None, nullptr is returned. If a matching credit card is found, a pointer to it is returned. If no matching credit card is found, nullptr is returned.

Parameters
CardNameThe name of the credit card to search for. Must be a valid FName object.
Returns
A const pointer to the matching credit card, or nullptr if not found.

◆ FindCreditCard() [2/2]

FORCEINLINE const FOperatingSystemCreditCard * FOperatingSystemBankAccount::FindCreditCard ( const int64 & CardNumber) const
inline

Find the credit card with the specified card number.

This method searches for a credit card with the given card number in the CreditCards collection. If the card number is not found, nullptr is returned. If a matching credit card is found, a const pointer to it is returned. Note that this method does not modify the CreditCards collection.

Parameters
CardNumberThe card number to search for. Must be of type int64.
Returns
A const pointer to the matching credit card, or nullptr if not found.

◆ IsValid()

FORCEINLINE bool FOperatingSystemBankAccount::IsValid ( ) const
inline

Checks if the bank transaction is valid.

The IsValid method verifies if all the necessary conditions for a bank transaction to be considered valid are met. These conditions include:

  • The account number is greater than the minimum account number defined in the operating system bank settings (ACC_MIN).
  • The account number is less than the maximum account number defined in the operating system bank settings (ACC_MAX).
  • The remaining funds are greater than or equal to zero.
  • The credit cards list is not empty.
  • The bank setting is valid.
Returns
True if the bank transaction is valid, False otherwise.
Here is the caller graph for this function:

Member Data Documentation

◆ AccountNumber

int64 FOperatingSystemBankAccount::AccountNumber

The unique account number associated with a bank account. It is of type int64. This variable is used in several classes and functions in the bank system, including:

  • FOperatingSystemBankUserData class: The AccountNumber variable is used in the UpdateFunds() function to update the funds associated with a bank account.
  • UOperatingSystemBankManager class: The HasEntry() function uses the AccountNumber variable to search for a specific account entry in the bank system.
See also
FOperatingSystemBankUserData
UOperatingSystemBankManager

◆ BankSetting

FOperatingSystemBankSetting FOperatingSystemBankAccount::BankSetting

Represents the banking settings for a specific bank account in the operating system. This variable is used to store the banking settings for a specific bank account in the operating system. It includes information such as the account number, creation date, available funds, credit cards associated, and transaction history. The BankSetting variable is of type FOperatingSystemBankSetting.

◆ CreationDate

FDateTime FOperatingSystemBankAccount::CreationDate

The creation date of the bank account. This variable represents the date and time when the bank account was created. It is of type FDateTime.

◆ CreditCards

TSet<FOperatingSystemCreditCard> FOperatingSystemBankAccount::CreditCards

A set of credit cards associated with a bank account. This set represents the collection of credit cards that are associated with a bank account. It is of type TSet<FOperatingSystemCreditCard>.

◆ RemainingFunds

float FOperatingSystemBankAccount::RemainingFunds

The remaining funds available in the bank account. This variable represents the amount of funds that are still available in the bank account. It is of type float. The initial value is 100.0.

See also
FOperatingSystemBankUserData::UpdateFunds()
UOperatingSystemBankManager::TransferFundsToAnotherAccount()

◆ TransactionHistory

TArray<FOperatingSystemUserFundTransaction> FOperatingSystemBankAccount::TransactionHistory

An array representing the transaction history of a bank account. This variable represents the transaction history of a bank account. It stores the details of each fund transaction made by the user, such as the description, remarks, amount, transaction ID, transaction type, date, and closing balance. It is of type TArray<FOperatingSystemUserFundTransaction>.


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