FOperatingSystemCreditCard
#include <OperatingSystemSimulator/Public/Data/OperatingSystemBankTypes.h>Collaboration diagram
Section titled “Collaboration diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class FOperatingSystemCreditCard["FOperatingSystemCreditCard"]
class FOperatingSystemCreditCardSetting["FOperatingSystemCreditCardSetting"]
FOperatingSystemCreditCard *-- FOperatingSystemCreditCardSetting
Class detail
Section titled “Class detail”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class FOperatingSystemCreditCard {
+Name : FName
+CardNumber : int64
+IsValid() const bool
+HasExpired() const bool
+FOperatingSystemCreditCard()
+CreateNewCreditCard(const FOperatingSystemCreditCardSetting &In FOperatingSystemCreditCard()
+CardSetting : FOperatingSystemCreditCardSetting()
+CVV : int32
+ExpiryMonth : uint8
+ExpiryYear : int32
+FOperatingSystemCreditCard(const FOperatingSystemCreditCardSetting &Ty
}
Caller impact — IsValid
Section titled “Caller impact — IsValid”Documented call sites inside the plugin (3):
flowchart LR FOperatingSystemCreditCard__IsValid["FOperatingSystemCreditCard::IsValid"] FOperatingSystemBankUserData__FindCreditCardByName["FOperatingSystemBankUserData::FindCreditCardByName"] FOperatingSystemBankUserData__FindCreditCardByName --> FOperatingSystemCreditCard__IsValid FOperatingSystemBankUserData__FindCreditCardByNumber["FOperatingSystemBankUserData::FindCreditCardByNumber"] FOperatingSystemBankUserData__FindCreditCardByNumber --> FOperatingSystemCreditCard__IsValid UOperatingSystemBankManager__IsCreditCardValid["UOperatingSystemBankManager::IsCreditCardValid"] UOperatingSystemBankManager__IsCreditCardValid --> FOperatingSystemCreditCard__IsValid
struct FOperatingSystemCreditCardDefined in OperatingSystemBankTypes.h:281 Structure representing a credit card in the operating system.
Public Attributes
Section titled “Public Attributes”| Return | Name | Description |
|---|---|---|
FName | Name | Name of this card. Like Master card, Visa etc. |
int64 | CardNumber | The card number associated with a credit card. This variable is an int64 representing the 16-digit card number. It is used to uniquely identify a credit card and validate its existence. The card number is stored in the range between 1000000000000000 and 9000000000000000. |
FName NameDefined in OperatingSystemBankTypes.h:299 Name of this card. Like Master card, Visa etc.
CardNumber
Section titled “CardNumber”int64 CardNumberDefined in OperatingSystemBankTypes.h:308 The card number associated with a credit card. This variable is an int64 representing the 16-digit card number. It is used to uniquely identify a credit card and validate its existence. The card number is stored in the range between 1000000000000000 and 9000000000000000.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
bool | IsValid const inline | Checks if the credit card is valid. |
bool | HasExpired const inline | Checks if the credit card has expired. |
FOperatingSystemCreditCard inline | Default constructor |
IsValid
Section titled “IsValid”const inline
inline bool IsValid() constDefined in OperatingSystemBankTypes.h:377 Checks if the credit card is valid.
A credit card is considered valid if:
-
The Name property is not None.
-
The CardNumber property is greater than CARD_MIN and lesser than CARD_MAX.
-
The CVV property is within the range of CVV_MIN and CVV_MAX.
-
The ExpiryMonth property is between 1 and 12 (inclusive).
Returns
Section titled “Returns”True if the credit card is valid, false otherwise.
See also: FOperatingSystemCreditCard::Name
See also: FOperatingSystemCreditCard::CardNumber
See also: FOperatingSystemCreditCard::CVV
See also: FOperatingSystemCreditCard::ExpiryMonth
See also: FOperatingSystemCreditCardSetting
Referenced by
Section titled “Referenced by”References
Section titled “References”HasExpired
Section titled “HasExpired”const inline
inline bool HasExpired() constDefined in OperatingSystemBankTypes.h:402 Checks if the credit card has expired.
A credit card is considered expired if:
-
The credit card is not valid.
-
The ExpiryYear is less than the current year.
-
The ExpiryYear is equal to the current year and the ExpiryMonth is less than or equal to the current month.
Returns
Section titled “Returns”True if the credit card has expired, false otherwise.
See also: FOperatingSystemCreditCard::IsValid()
See also: FOperatingSystemCreditCard::ExpiryYear
See also: FOperatingSystemCreditCard::ExpiryMonth
Referenced by
Section titled “Referenced by”FOperatingSystemCreditCard
Section titled “FOperatingSystemCreditCard”inline
inline FOperatingSystemCreditCard()Defined in OperatingSystemBankTypes.h:451 Default constructor
Public Static Methods
Section titled “Public Static Methods”| Return | Name | Description |
|---|---|---|
FOperatingSystemCreditCard | CreateNewCreditCard static inline | Creates a new credit card based on the given card type. |
CreateNewCreditCard
Section titled “CreateNewCreditCard”static inline
static inline FOperatingSystemCreditCard CreateNewCreditCard(const FOperatingSystemCreditCardSetting & InCardType)Defined in OperatingSystemBankTypes.h:349 Creates a new credit card based on the given card type.
Parameters
Section titled “Parameters”InCardTypeThe credit card type to create the new card from.
Returns
Section titled “Returns”A new FOperatingSystemCreditCard struct representing the newly created credit card, or an empty FOperatingSystemCreditCard object if the given card type is not valid.
See also: FOperatingSystemCreditCardSetting
Referenced by
Section titled “Referenced by”Protected Attributes
Section titled “Protected Attributes”| Return | Name | Description |
|---|---|---|
FOperatingSystemCreditCardSetting | CardSetting | Store the settings for a specific credit card. |
int32 | CVV | The Card Verification Value (CVV) associated with a credit card. |
uint8 | ExpiryMonth | Month component of the credit card’s expiry date. Valid values range between 1 and 12. |
int32 | ExpiryYear | Represents the year component of a credit card’s expiry date. |
CardSetting
Section titled “CardSetting”FOperatingSystemCreditCardSetting CardSettingDefined in OperatingSystemBankTypes.h:293 Store the settings for a specific credit card.
See also: FOperatingSystemCreditCardSetting
int32 CVVDefined in OperatingSystemBankTypes.h:318 The Card Verification Value (CVV) associated with a credit card.
ExpiryMonth
Section titled “ExpiryMonth”uint8 ExpiryMonthDefined in OperatingSystemBankTypes.h:327 Month component of the credit card’s expiry date. Valid values range between 1 and 12.
See also: FOperatingSystemCreditCard::HasExpired()
ExpiryYear
Section titled “ExpiryYear”int32 ExpiryYearDefined in OperatingSystemBankTypes.h:338 Represents the year component of a credit card’s expiry date.
The ExpiryYear variable is an int32 representing the year of the credit card’s expiry date. It should be set to a value that is equal to or greater than the current year.
See also: FOperatingSystemCreditCard::HasExpired()
Private Methods
Section titled “Private Methods”| Return | Name | Description |
|---|---|---|
FOperatingSystemCreditCard inline explicit |
FOperatingSystemCreditCard
Section titled “FOperatingSystemCreditCard”inline explicit
inline explicit FOperatingSystemCreditCard(const FOperatingSystemCreditCardSetting & Type)Defined in OperatingSystemBankTypes.h:463