Operating System Simulator Plugin
3.5.1
Unreal Engine plugin that simulates an Operating System Environment
|
#include "OperatingSystemCreditCardSetting.h"
Public Member Functions | |
FORCEINLINE bool | IsValid () const |
FORCEINLINE int64 | GenerateCardNumber () const |
FORCEINLINE int32 | GenerateCVV () const |
FOperatingSystemCreditCardSetting () | |
Public Attributes | |
FName | Name |
uint8 | bEnableCardNumberPrefix: 1 |
uint8 | CardNumberPrefix |
uint8 | CvvLength |
uint8 | ExpiryYearOffset |
TSoftObjectPtr< UObject > | Icon |
Static Public Attributes | |
static constexpr const int64 | CARD_MIN |
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. | |
static constexpr const int64 | CARD_MAX |
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. | |
static constexpr const int32 | CVV_MIN |
static constexpr const int32 | CVV_MAX |
static constexpr const uint8 | CARD_PREFIX_MIN |
Represents the minimum value for the card number prefix. | |
static constexpr const uint8 | CARD_PREFIX_MAX |
Represents credit card settings for the operating system. Each instance of this struct represents a specific credit card type, such as Mastercard or Visa.
|
inline |
Default constructor for the FOperatingSystemCreditCardSetting struct. Initializes the credit card settings with default values.
|
inline |
Generates a random credit card number.
bEnableCardNumberPrefix
variable. If bEnableCardNumberPrefix
is true, the prefix is equal to CardNumberPrefix
. If bEnableCardNumberPrefix
is false, the prefix is a random number between CARD_PREFIX_MIN
and CARD_PREFIX_MAX
. The suffix is a randomly generated 14-digit number. The prefix and suffix are combined into a string, and then converted to an integer using FCString::Atoi64()
.
|
inline |
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.
|
inline |
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:
uint8 FOperatingSystemCreditCardSetting::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)).
|
staticconstexpr |
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.
|
staticconstexpr |
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.
|
staticconstexpr |
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.
|
staticconstexpr |
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.
uint8 FOperatingSystemCreditCardSetting::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.
|
staticconstexpr |
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.
|
staticconstexpr |
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.
uint8 FOperatingSystemCreditCardSetting::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 FOperatingSystemCreditCardSetting::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> FOperatingSystemCreditCardSetting::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.
Example usage: Icon = "/Game/Textures/CardIcons/Visa_Icon"
FName FOperatingSystemCreditCardSetting::Name |
Name of this card. Like Master card, Visa etc.