FOperatingSystemCreditCardSetting
#include <OperatingSystemSimulator/Public/OperatingSystemCreditCardSetting.h>struct FOperatingSystemCreditCardSettingDefined in OperatingSystemCreditCardSetting.h:14
Inherits:
FTableRowBase
Inheritance diagram
Section titled “Inheritance diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class FOperatingSystemCreditCardSetting["FOperatingSystemCreditCardSetting"]
class FTableRowBase["FTableRowBase"]
FTableRowBase <|-- FOperatingSystemCreditCardSetting
Class detail
Section titled “Class detail”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class FOperatingSystemCreditCardSetting {
+Name : FName
+bEnableCardNumberPrefix : uint8
+CardNumberPrefix : uint8
+CvvLength : uint8
+ExpiryYearOffset : uint8
+Icon : TSoftObjectPtr< UObject >
+IsValid() const bool
+GenerateCardNumber() const int64
+GenerateCVV() const int32
+FOperatingSystemCreditCardSetting()
+CARD_MIN : constexpr const int64
+CARD_MAX : constexpr const int64
+CVV_MIN : constexpr const int32
+CVV_MAX : constexpr const int32
+CARD_PREFIX_MIN : constexpr const uint8
+CARD_PREFIX_MAX : constexpr const uint8
}
Represents credit card settings for the operating system. Each instance of this struct represents a specific credit card type, such as Mastercard or Visa.
Public Attributes
Section titled “Public Attributes”| Return | Name | Description |
|---|---|---|
FName | Name | Name of this card. Like Master card, Visa etc. |
uint8 | bEnableCardNumberPrefix | Indicates whether the card number prefix is enabled. When enabled, a specific CardNumberPrefix value must be provided. Otherwise, a random prefix will be generated within the range (CARD_PREFIX_MIN (set to 10), CARD_PREFIX_MAX (set to 99)). |
uint8 | CardNumberPrefix | Represents the prefix of a credit card number. The CardNumberPrefix is a value between 10 and 99 (inclusive). It is used to specify a specific range of credit card numbers. If the CardNumberPrefix is enabled, a specific value must be provided. Otherwise, a random prefix will be generated within the valid range. |
uint8 | CvvLength | Represents the length of the CVV (Card Verification Value) for a credit card. The CVV length is either 3 or 4. It is used to specify the number of digits in the CVV code. The CVV code is a security feature of credit cards that is typically found on the back of the card. |
uint8 | ExpiryYearOffset | Represents the offset of the expiry year for a credit card. The ExpiryYearOffset is a value between 1 and 5 (inclusive). It is used to specify the number of years to add to the current year to calculate the expiry year of the credit card. For example, if ExpiryYearOffset is set to 2 and the current year is 2022, the expiry year of the credit card will be 2024. |
TSoftObjectPtr< UObject > | Icon | Represents the icon for a credit card. The icon is a soft reference to a UObject, such as a Texture or MaterialInterface. It can be displayed as a thumbnail and is used to visually represent the credit card type. |
FName NameDefined in OperatingSystemCreditCardSetting.h:20 Name of this card. Like Master card, Visa etc.
Referenced by
Section titled “Referenced by”bEnableCardNumberPrefix
Section titled “bEnableCardNumberPrefix”uint8 bEnableCardNumberPrefixDefined in OperatingSystemCreditCardSetting.h:28 Indicates whether the card number prefix is enabled. When enabled, a specific CardNumberPrefix value must be provided. Otherwise, a random prefix will be generated within the range (CARD_PREFIX_MIN (set to 10), CARD_PREFIX_MAX (set to 99)).
CardNumberPrefix
Section titled “CardNumberPrefix”uint8 CardNumberPrefixDefined in OperatingSystemCreditCardSetting.h:38 Represents the prefix of a credit card number. The CardNumberPrefix is a value between 10 and 99 (inclusive). It is used to specify a specific range of credit card numbers. If the CardNumberPrefix is enabled, a specific value must be provided. Otherwise, a random prefix will be generated within the valid range.
CvvLength
Section titled “CvvLength”uint8 CvvLengthDefined in OperatingSystemCreditCardSetting.h:47 Represents the length of the CVV (Card Verification Value) for a credit card. The CVV length is either 3 or 4. It is used to specify the number of digits in the CVV code. The CVV code is a security feature of credit cards that is typically found on the back of the card.
ExpiryYearOffset
Section titled “ExpiryYearOffset”uint8 ExpiryYearOffsetDefined in OperatingSystemCreditCardSetting.h:56 Represents the offset of the expiry year for a credit card. The ExpiryYearOffset is a value between 1 and 5 (inclusive). It is used to specify the number of years to add to the current year to calculate the expiry year of the credit card. For example, if ExpiryYearOffset is set to 2 and the current year is 2022, the expiry year of the credit card will be 2024.
TSoftObjectPtr< UObject > IconDefined in OperatingSystemCreditCardSetting.h:69 Represents the icon for a credit card. The icon is a soft reference to a UObject, such as a Texture or MaterialInterface. It can be displayed as a thumbnail and is used to visually represent the credit card type.
Example usage: Icon = “/Game/Textures/CardIcons/Visa_Icon”
See also: FOperatingSystemCreditCardSetting
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
bool | IsValid const inline | Check if the instance of the class OperatingSystemCreditCardSetting is valid. |
int64 | GenerateCardNumber const inline | Generates a random credit card number. |
int32 | GenerateCVV const inline | Generates a Card Verification Value (CVV) for the credit card. |
FOperatingSystemCreditCardSetting inline | Default constructor for the FOperatingSystemCreditCardSetting struct. Initializes the credit card settings with default values. |
IsValid
Section titled “IsValid”const inline
inline bool IsValid() constDefined in OperatingSystemCreditCardSetting.h:142 Check if the instance of the class OperatingSystemCreditCardSetting is valid.
The IsValid method checks if all the necessary properties of the credit card setting are valid according to the following conditions:
-
The Name property is not None.
-
The CardNumberPrefix is within the range specified by CARD_PREFIX_MIN and CARD_PREFIX_MAX.
-
The CvvLength is either 3 or 4.
-
The ExpiryYearOffset is within the range of 1 to 5.
Returns
Section titled “Returns”true if all the conditions are met and the credit card setting is valid, false otherwise.
GenerateCardNumber
Section titled “GenerateCardNumber”const inline
inline int64 GenerateCardNumber() constDefined in OperatingSystemCreditCardSetting.h:173 Generates a random credit card number.
Returns
Section titled “Returns”A randomly generated credit card number as an integer.
See also: bEnableCardNumberPrefix
See also: CardNumberPrefix
See also: CARD_PREFIX_MIN
See also: CARD_PREFIX_MAX
See also: GenerateRandomInt64
GenerateCVV
Section titled “GenerateCVV”const inline
inline int32 GenerateCVV() constDefined in OperatingSystemCreditCardSetting.h:189 Generates a Card Verification Value (CVV) for the credit card.
If the CVV length is 3, a random number between CVV_MIN and 999 (inclusive) is generated and returned. Otherwise, a random number between 1000 and CVV_MAX (inclusive) is generated and returned.
Returns
Section titled “Returns”The generated CVV.
FOperatingSystemCreditCardSetting
Section titled “FOperatingSystemCreditCardSetting”inline
inline FOperatingSystemCreditCardSetting()Defined in OperatingSystemCreditCardSetting.h:205 Default constructor for the FOperatingSystemCreditCardSetting struct. Initializes the credit card settings with default values.
Returns
Section titled “Returns”A new instance of FOperatingSystemCreditCardSetting with default values.
Public Static Attributes
Section titled “Public Static Attributes”| Return | Name | Description |
|---|---|---|
constexpr const int64 | CARD_MIN static constexpr | Represents the minimum value that a credit card number can have. It is a static constexpr variable of type int64. The value of CARD_MIN is 1000000000000000. |
constexpr const int64 | CARD_MAX static constexpr | Represents the maximum value that a credit card number can have. It is a static constexpr variable of type int64. The value of CARD_MAX is 9000000000000000. |
constexpr const int32 | CVV_MIN static constexpr | Represents the minimum value that a CVV (Card Verification Value) can have. It is a static constant variable of type int32. The value of CVV_MIN is 100. |
constexpr const int32 | CVV_MAX static constexpr | Represents the maximum value that a CVV (Card Verification Value) can have. |
constexpr const uint8 | CARD_PREFIX_MIN static constexpr | Represents the minimum value for the card number prefix. |
constexpr const uint8 | CARD_PREFIX_MAX static constexpr | Represents the maximum value that a credit card number prefix can have. |
CARD_MIN
Section titled “CARD_MIN”static constexpr
constexpr const int64 CARD_MIN = 1000000000000000Defined in OperatingSystemCreditCardSetting.h:76 Represents the minimum value that a credit card number can have. It is a static constexpr variable of type int64. The value of CARD_MIN is 1000000000000000.
Referenced by
Section titled “Referenced by”CARD_MAX
Section titled “CARD_MAX”static constexpr
constexpr const int64 CARD_MAX = 9000000000000000Defined in OperatingSystemCreditCardSetting.h:83 Represents the maximum value that a credit card number can have. It is a static constexpr variable of type int64. The value of CARD_MAX is 9000000000000000.
Referenced by
Section titled “Referenced by”CVV_MIN
Section titled “CVV_MIN”static constexpr
constexpr const int32 CVV_MIN = 100Defined in OperatingSystemCreditCardSetting.h:90 Represents the minimum value that a CVV (Card Verification Value) can have. It is a static constant variable of type int32. The value of CVV_MIN is 100.
Referenced by
Section titled “Referenced by”CVV_MAX
Section titled “CVV_MAX”static constexpr
constexpr const int32 CVV_MAX = 9999Defined in OperatingSystemCreditCardSetting.h:103 Represents the maximum value that a CVV (Card Verification Value) can have.
CVV_MAX is a static constant variable of type int32. The value of CVV_MAX is 9999. It is used to specify the maximum possible value of the CVV code for a credit card. The CVV code is a security feature of credit cards that is typically found on the back of the card.
See also: FOperatingSystemCreditCardSetting
See also: OperatingSystemBankTypes.h
Referenced by
Section titled “Referenced by”CARD_PREFIX_MIN
Section titled “CARD_PREFIX_MIN”static constexpr
constexpr const uint8 CARD_PREFIX_MIN = 10Defined in OperatingSystemCreditCardSetting.h:116 Represents the minimum value for the card number prefix.
The CARD_PREFIX_MIN is a static constexpr variable of type uint8. The value of CARD_PREFIX_MIN is 10. It is used to specify the minimum value that a credit card number prefix can have. The credit card number prefix is used to specify a specific range of credit card numbers.
See also: FOperatingSystemCreditCardSetting
See also: OperatingSystemCreditCardSetting.h
CARD_PREFIX_MAX
Section titled “CARD_PREFIX_MAX”static constexpr
constexpr const uint8 CARD_PREFIX_MAX = 99Defined in OperatingSystemCreditCardSetting.h:129 Represents the maximum value that a credit card number prefix can have.
CARD_PREFIX_MAX is a static constexpr variable of type uint8. The value of CARD_PREFIX_MAX is 99. It is used to specify the maximum value that a credit card number prefix can have. The credit card number prefix is used to specify a specific range of credit card numbers.
See also: FOperatingSystemCreditCardSetting
See also: OperatingSystemCreditCardSetting.h