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

Structure representing a credit card in the operating system. More...

#include "OperatingSystemBankTypes.h"

Collaboration diagram for FOperatingSystemCreditCard:
[legend]

Public Member Functions

FORCEINLINE bool IsValid () const
 
FORCEINLINE bool HasExpired () const
 
 FOperatingSystemCreditCard ()
 

Static Public Member Functions

static FORCEINLINE FOperatingSystemCreditCard CreateNewCreditCard (const FOperatingSystemCreditCardSetting &InCardType)
 

Public Attributes

FName Name
 
int64 CardNumber
 

Protected Attributes

FOperatingSystemCreditCardSetting CardSetting
 
int32 CVV
 
uint8 ExpiryMonth
 
int32 ExpiryYear
 

Detailed Description

Structure representing a credit card in the operating system.

Constructor & Destructor Documentation

◆ FOperatingSystemCreditCard()

FOperatingSystemCreditCard::FOperatingSystemCreditCard ( )
inline

Default constructor

Member Function Documentation

◆ CreateNewCreditCard()

static FORCEINLINE FOperatingSystemCreditCard FOperatingSystemCreditCard::CreateNewCreditCard ( const FOperatingSystemCreditCardSetting & InCardType)
inlinestatic

Creates a new credit card based on the given card type.

Parameters
InCardTypeThe credit card type to create the new card from.
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
Here is the caller graph for this function:

◆ HasExpired()

FORCEINLINE bool FOperatingSystemCreditCard::HasExpired ( ) const
inline

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
True if the credit card has expired, false otherwise.
See also
FOperatingSystemCreditCard::IsValid()
FOperatingSystemCreditCard::ExpiryYear
FOperatingSystemCreditCard::ExpiryMonth
Here is the caller graph for this function:

◆ IsValid()

FORCEINLINE bool FOperatingSystemCreditCard::IsValid ( ) const
inline

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
True if the credit card is valid, false otherwise.
See also
FOperatingSystemCreditCard::Name
FOperatingSystemCreditCard::CardNumber
FOperatingSystemCreditCard::CVV
FOperatingSystemCreditCard::ExpiryMonth
FOperatingSystemCreditCardSetting
Here is the caller graph for this function:

Member Data Documentation

◆ CardNumber

int64 FOperatingSystemCreditCard::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.

◆ CardSetting

FOperatingSystemCreditCardSetting FOperatingSystemCreditCard::CardSetting
protected

Store the settings for a specific credit card.

See also
FOperatingSystemCreditCardSetting

◆ CVV

int32 FOperatingSystemCreditCard::CVV
protected

The Card Verification Value (CVV) associated with a credit card.

Remarks
Valid CVV values range between 100 and 999.

◆ ExpiryMonth

uint8 FOperatingSystemCreditCard::ExpiryMonth
protected

Month component of the credit card's expiry date. Valid values range between 1 and 12.

See also
FOperatingSystemCreditCard::HasExpired()

◆ ExpiryYear

int32 FOperatingSystemCreditCard::ExpiryYear
protected

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()

◆ Name

FName FOperatingSystemCreditCard::Name

Name of this card. Like Master card, Visa etc.


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