FOperatingSystemBankAccount
#include <OperatingSystemSimulator/Public/Data/OperatingSystemBankTypes.h>Collaboration diagram
Section titled “Collaboration diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class FOperatingSystemBankAccount["FOperatingSystemBankAccount"]
class FOperatingSystemCreditCard["FOperatingSystemCreditCard"]
FOperatingSystemBankAccount *-- FOperatingSystemCreditCard
class FOperatingSystemUserFundTransaction["FOperatingSystemUserFundTransaction"]
FOperatingSystemBankAccount *-- FOperatingSystemUserFundTransaction
class FOperatingSystemBankSetting["FOperatingSystemBankSetting"]
FOperatingSystemBankAccount *-- FOperatingSystemBankSetting
Class detail
Section titled “Class detail”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class FOperatingSystemBankAccount {
+AccountNumber : int64
+CreationDate : FDateTime
+RemainingFunds : float
+CreditCards : TSet< FOperatingSystemCreditCard() >
+TransactionHistory : TArray< FOperatingSystemUserFundTransact
+BankSetting : FOperatingSystemBankSetting()
+FindCreditCard(const FName &CardName) const const FOperatingSystemCreditCard() *
+FindCreditCard(const int64 &CardNumber) const const FOperatingSystemCreditCard() *
+IsValid() const bool
+FOperatingSystemBankAccount()
+CreateNewBankAccount(const FOperatingSystemBankSetting &InBankSe FOperatingSystemBankAccount()
+FOperatingSystemBankAccount(const FOperatingSystemBankSetting &BankSett
}
Caller impact — IsValid
Section titled “Caller impact — IsValid”Documented call sites inside the plugin (4):
flowchart LR FOperatingSystemBankAccount__IsValid["FOperatingSystemBankAccount::IsValid"] FOperatingSystemBankUserData__HasEntry["FOperatingSystemBankUserData::HasEntry"] FOperatingSystemBankUserData__HasEntry --> FOperatingSystemBankAccount__IsValid FOperatingSystemBankUserData__HasEntry --> FOperatingSystemBankAccount__IsValid UOperatingSystemBankManager__IsBankAccountValid["UOperatingSystemBankManager::IsBankAccountValid"] UOperatingSystemBankManager__IsBankAccountValid --> FOperatingSystemBankAccount__IsValid UOperatingSystemBankManager__UnregisterBankAccount["UOperatingSystemBankManager::UnregisterBankAccount"] UOperatingSystemBankManager__UnregisterBankAccount --> FOperatingSystemBankAccount__IsValid
struct FOperatingSystemBankAccountDefined in OperatingSystemBankTypes.h:479 Struct representing a bank account in the operating system.
Public Attributes
Section titled “Public Attributes”| Return | Name | Description |
|---|---|---|
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< FOperatingSystemCreditCard > | 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>. |
TArray< FOperatingSystemUserFundTransaction > | 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>. |
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. |
AccountNumber
Section titled “AccountNumber”int64 AccountNumberDefined in OperatingSystemBankTypes.h:493 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
See also: UOperatingSystemBankManager
CreationDate
Section titled “CreationDate”FDateTime CreationDateDefined in OperatingSystemBankTypes.h:501 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.
RemainingFunds
Section titled “RemainingFunds”float RemainingFundsDefined in OperatingSystemBankTypes.h:512 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()
See also: UOperatingSystemBankManager::TransferFundsToAnotherAccount()
Referenced by
Section titled “Referenced by”CreditCards
Section titled “CreditCards”TSet< FOperatingSystemCreditCard > CreditCardsDefined in OperatingSystemBankTypes.h:520 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>.
Referenced by
Section titled “Referenced by”TransactionHistory
Section titled “TransactionHistory”TArray< FOperatingSystemUserFundTransaction > TransactionHistoryDefined in OperatingSystemBankTypes.h:529 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>.
BankSetting
Section titled “BankSetting”FOperatingSystemBankSetting BankSettingDefined in OperatingSystemBankTypes.h:538 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.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
const FOperatingSystemCreditCard * | FindCreditCard const inline | Find the credit card with the specified card name. |
const FOperatingSystemCreditCard * | FindCreditCard const inline | Find the credit card with the specified card number. |
bool | IsValid const inline | Checks if the bank transaction is valid. |
FOperatingSystemBankAccount inline | Default constructor |
FindCreditCard
Section titled “FindCreditCard”const inline
inline const FOperatingSystemCreditCard * FindCreditCard(const FName & CardName) constDefined in OperatingSystemBankTypes.h:576 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
Section titled “Parameters”CardNameThe name of the credit card to search for. Must be a valid FName object.
Returns
Section titled “Returns”A const pointer to the matching credit card, or nullptr if not found.
FindCreditCard
Section titled “FindCreditCard”const inline
inline const FOperatingSystemCreditCard * FindCreditCard(const int64 & CardNumber) constDefined in OperatingSystemBankTypes.h:606 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
Section titled “Parameters”CardNumberThe card number to search for. Must be of type int64.
Returns
Section titled “Returns”A const pointer to the matching credit card, or nullptr if not found.
IsValid
Section titled “IsValid”const inline
inline bool IsValid() constDefined in OperatingSystemBankTypes.h:631 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
Section titled “Returns”True if the bank transaction is valid, False otherwise.
Referenced by
Section titled “Referenced by”References
Section titled “References”FOperatingSystemBankAccount
Section titled “FOperatingSystemBankAccount”inline
inline FOperatingSystemBankAccount()Defined in OperatingSystemBankTypes.h:667 Default constructor
Public Static Methods
Section titled “Public Static Methods”| Return | Name | Description |
|---|---|---|
FOperatingSystemBankAccount | CreateNewBankAccount static inline | Creates a new bank account with the given bank settings and credit card type. |
CreateNewBankAccount
Section titled “CreateNewBankAccount”static inline
static inline FOperatingSystemBankAccount CreateNewBankAccount(const FOperatingSystemBankSetting & InBankSetting, const FOperatingSystemCreditCardSetting & InCardType)Defined in OperatingSystemBankTypes.h:553 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
Section titled “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
Section titled “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.
Referenced by
Section titled “Referenced by”References
Section titled “References”Private Methods
Section titled “Private Methods”| Return | Name | Description |
|---|---|---|
FOperatingSystemBankAccount inline explicit |
FOperatingSystemBankAccount
Section titled “FOperatingSystemBankAccount”inline explicit
inline explicit FOperatingSystemBankAccount(const FOperatingSystemBankSetting & BankSetting)Defined in OperatingSystemBankTypes.h:677